Code Monkey home page Code Monkey logo

fusionandcortex's Introduction

Proof of concept project combining Stl.Fusion and Cortex.Net.

See the project Blazorise. It is an adaptation of Fusion's Blazorise todo list sample.

Key Benefits

  • End-to-end Real Time, from database to multiple hosts and multiple Blazor clients; thanks to Fusion.
  • The Cortex Store architecture enables:
    • Isolation of UI state and update logic into an observable model.
    • Efficient rendering without the need to implement Blazor's ShouldComponentRender nor to strategically call StateHasChanged.
    • This translates to good scalability of complex user interfaces. All components can be simple, 'Pure'; free of complex code and side-effects or inter-component rendering dependencies. All logic is testable and delegated away into the Actions in the stores.
    • Testing the stores is a good substitute for testing the actual Blazor components and much easier.

Done:

  • created observable stores: AppStore and TodoPageStore
  • AppStore has a simple timer and shows as a clock in the main layout
  • TodoPageStore contains the client-side state for the todo page, such as current page size and page marker. It also contains a Fusion LiveState reference that is subscribed to changes impacting the TodoPageResponse. This DTO contains the currently visible todo-items and it is auto-requeried by Fusion when update command commands are executed that affect related data in the database.
  • Extracted all logic from the todopage.razor and TodoItem.razor, making it a render-only component
  • Testers still to be implemented.

Issues and Todos:

  1. When more than 5 (the default page size) todo's exist, The MORE button appears. It invalidates the LiveState which should trigger a recompute/fetch of the TodoPageResponse. However, this somehow is broken. Adding or updating an item will subsequently retrigger and show the increased page size. Needs analysis.
  2. WebAssembly mode fails on DI injecting ISessionProvider into the TodoPageStore. Needs analysis. Debug output: Cannot resolve scoped service 'Stl.Fusion.Authentication.ISessionProvider' from root provider.
  3. The Fusion Auth state is not yet live-plugged to the TodoPageStore, hence after login, the Todolist does not immediately appear yet.
  4. Fusion query and command errors are not tested and probably not working yet in the TodoPageStore

fusionandcortex's People

Contributors

alexyakunin avatar dependabot-preview[bot] avatar hypercodeplace avatar leonardo-ferreira avatar pintrarakha-st avatar riesvriend avatar themodem avatar tyrrrz avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

alexyakunin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.