Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a service that manages entities via redux that abstracts the redux logic #2

Open
msivri opened this issue Mar 26, 2019 · 0 comments
Assignees
Labels
feature New feature or request overview Overview of early desired features
Milestone

Comments

@msivri
Copy link
Contributor

msivri commented Mar 26, 2019

Need to create a service that can be inherited by other services to manage entities via redux, mainly ngrx. The definitions are as the following:

  • Entity: Typescript class objects that are are passed around the client and the web API. Usually a view model. Can also manage foreign relationships.
  • Entity Service: A service with the generic type Entity that manages CRUD for the entity.
  • Entity Actions: Handles dispatching actions for the Entity Service.
  • Entity Reducer: Handles transformations to the Entity.
  • Entity Effects: Processes actions that are dispatched and parses results.
  • Entity Mapper: Maps API response to the correct entities and dispatches actions to perform CRUD operations to the relating entities.
  • Entity Data Service: Performs API operations that include GET, ADD, UPDATE, DELETE and uses fluent API to build requests.

Also need helper decorators and pipes:

  • @EntityFK: Used by entity properties to identity foreign keys that relate to another entity. Helps filtering in the UI via pipes.
  • FilterEntityByFK and FirstEntityByFK Pipe: Used by the UI to filter observable entities by their FK given the foreign entity type. Useful for nested observables.

Main dependencies:

  • Angular
  • NGRX: simplifies redux
  • classTransformer: Converts plain javascript objects to entity classes.
@msivri msivri self-assigned this Mar 26, 2019
@msivri msivri added overview Overview of early desired features feature New feature or request labels Mar 26, 2019
@msivri msivri pinned this issue Mar 26, 2019
@msivri msivri added this to the alpha milestone Mar 27, 2019
@aleGuardiola aleGuardiola self-assigned this Mar 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request overview Overview of early desired features
Projects
None yet
Development

No branches or pull requests

2 participants