-
Notifications
You must be signed in to change notification settings - Fork 132
Home
Shaoquan Chen edited this page Jan 12, 2016
·
7 revisions
- View (MVVC) layer - where angular directive, controllers are defined.
- Model layer - where business data objects are defined with methods to retrieve/update the data.
- API layer - where API objects are defined, which handle http request.
Between layers, each layer can only access the layer directly under it. This means
OK
- Model layer -> API layer
- View (MVVC) layer -> Model layer
NOT OK
- View (MVVC) layer -> API layer
- Model layer -> View (MVVC) layer
- API layer -> View (MVVC) layer / Model layer
Event bus cross all the layers. Each layer can access the event bus. Event bus provides a loose-coupling approach to allow communications between:
- View (MVVC) layer -> API layer
- Model layer -> View (MVVC) layer
- API layer -> View (MVVC) layer / Model layer