Last active
November 27, 2018 12:58
-
-
Save freddi301/b7bb826795c27094ae5ee52ebf8f2110 to your computer and use it in GitHub Desktop.
Frontend Architecture
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
view: | |
component: composition of | |
helper: prepare data for template so no code goes into the tempalte | |
template: does only view, can dispatch events | |
container: composition of | |
injector: grabs data from state | |
wireframe: conecptual representation of ui, it's a projections of data to display and possible actions | |
domain: | |
data: typeos of data in the domain (anemic value objects) | |
state: structure od underivable domain data that represents the state of the world | |
event: used to trigger state transitions | |
common data: | |
tasks | |
async data | |
projections: pure functions given domain data returns domain data | |
transitions: given an event and state returns next state | |
common projections: | |
localization (label, language) => text (goes into helper) | |
authorization (state, user) => actions (goes into injector) | |
theming (theme) => Map<Container, Component> | |
state and transitions should represent a finite state machine that tells: | |
flow of the application | |
what the user sees now | |
what the user can do | |
template(helper(wireframe(injector(state)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment