-
Notifications
You must be signed in to change notification settings - Fork 0
Ideal responsibilities
Tenor Biel edited this page Jan 27, 2016
·
2 revisions
- Knowing how to interact with the API server, including
- Supplying authentication keys
- Inferring the API server URL from config context
- Delegating to models to validate data before sending it to a server/database; conditionally raising
ValidationError
(or justTypeError
) - Delegating to models to parse JSON responses from the server/database
- Deriving targeting information (exa. current order ID from route information)
- Using context information to fetch initial data from the API server (this may or may delegate to a service class)
- Being basic structures to represent data from the API server
- Parsing JSON responses from the API server
- Providing fine-tuned schemas for specific parts of the UI
- Binding UI actions to service methods
- Handling transition states (loading, saving, error, ...)
- Being the source-of-truth for instances of specific resources