app_framework_component 0.0.3 copy "app_framework_component: ^0.0.3" to clipboard
app_framework_component: ^0.0.3 copied to clipboard

MyCS application feature and business logic componenet framework

Application Framework Component #

MyCS application framework component implements core foundational classes that provides framework for building:

  • application features
  • managing state and data services
  • handling of notifications

The Feature framework #

The following sequence diagram outlines the life-cycle of a feature.

sequenceDiagram
    App Main->>FeatureRegistry: FeatureRegistry.intialize(&configLoaderFn)
    
    rect rgb(112,128,144)
    note right of App Main: feature registration and initialization
    activate App Main
        create participant Feature
        Note right of Feature: This is an implementation<br/>of the Feature class and it<br/>implements the feature's<br/> scope, state and anchors<br/>for UI hooks.
        App Main->>Feature: feature=Feature()
        App Main->>FeatureRegistry: register(feature)
        activate FeatureRegistry
        FeatureRegistry->>FeatureRegistry: config=load feature configuration
        FeatureRegistry->>Feature: initialize(config, registered features)
        FeatureRegistry->>FeatureRegistry: add feature to list of registered features
        FeatureRegistry-->>App Main: 
        deactivate FeatureRegistry
    deactivate App Main
    end

    rect rgb(112,128,144)
    note right of App Main: feature ux
    activate App Main
        create participant FeatureContainer
        App Main->>FeatureContainer: feature=FeatureContainer()
        Note right of FeatureContainer: This is an implementation<br/>of the FeatureContainer widget<br/> that implements UI hooks for<br/> features. It queries features for<br/> anchors that can then be<br/> rendered into the container.
        rect rgb(80,128,144)
        Note left of FeatureContainer: initState()
            FeatureContainer->>FeatureRegistry: anchors = getAnchors(hookName)
            activate FeatureRegistry
                FeatureRegistry->>FeatureRegistry: 
                FeatureRegistry->>FeatureContainer: 
            deactivate FeatureRegistry
        end
        rect rgb(80,128,144)
        Note left of FeatureContainer: build(context)
            FeatureContainer->>FeatureContainer: build(container, anchors)
            activate FeatureContainer
            Note left of FeatureContainer: FeatureContainer implementations'<br/>Widget build override should add<br/>the feature anchors to its UI
            deactivate FeatureContainer
        end
    deactivate App Main
    end

Getting Started #

Install #

Add the plugin as a dependency to you Flutter app's pubspec.yaml.

dependencies:
  .
  .
  app_framework_component: ^0.0.2
  .
  .

Business Logic Component

Implementing a Feature

Integrating Notifications