Content
View differences
Updated by Aleix Suau over 5 years ago
The state management of this component is very difficult to understand:
* Lack of a unidirectional data flow:
* Almost every component is subscribing to the board$ observable.
* This leads to the need of checking if the resource is cached (CachableAPIV3Resource.stale(id) || force)
* Inheritance/Typings are confusing: this.apiV3Service.boards.id(id).requireAndStream() calls CachableAPIV3Resource.requireAndStream which calls this.load. this.load points to the class CachableAPIV3Resource but the one that is called is APIv3BoardPath.
* Multiple components related but not integrated
* BoardPartitionedPageComponent
* BoardsMenuComponent
* BoardFilterComponent
* BoardListContainerComponent
* BoardListComponent
* BoardActionsRegistryService
* Functionality spread: Sometimes we call it through the BoardService and others directly through the APIV3 (this.apiV3Service.boards.id(id))
* Patterns mixing:
* Inheritance
* Dependency injection for components (parents)
* ViewChildren to access child
* Input / Outputs
* Improvement suggestions:
* Extract the use cases and scenarios
* Try to concentrate the state management on
* The parent component
* The BoardsService
* Try to integrate the flow of all the components/services
* Lack of a unidirectional data flow:
* Almost every component is subscribing to the board$ observable.
* This leads to the need of checking if the resource is cached (CachableAPIV3Resource.stale(id) || force)
* Inheritance/Typings are confusing: this.apiV3Service.boards.id(id).requireAndStream() calls CachableAPIV3Resource.requireAndStream which calls this.load. this.load points to the class CachableAPIV3Resource but the one that is called is APIv3BoardPath.
* Multiple components related but not integrated
* BoardPartitionedPageComponent
* BoardsMenuComponent
* BoardFilterComponent
* BoardListContainerComponent
* BoardListComponent
* BoardActionsRegistryService
* Functionality spread: Sometimes we call it through the BoardService and others directly through the APIV3 (this.apiV3Service.boards.id(id))
* Patterns mixing:
* Inheritance
* Dependency injection for components (parents)
* ViewChildren to access child
* Input / Outputs
* Improvement suggestions:
* Extract the use cases and scenarios
* Try to concentrate the state management on
* The parent component
* The BoardsService
* Try to integrate the flow of all the components/services