Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : Structuring of application state objects

$
0
0
A few thoughts ...

1. I would not use the DOM to declare dependencies (data-module="core/controls/exampleControl"). This prevents you from making a build that packages several dependencies for faster loading.

2.  I typically create an observe and pass computes based upon its state to other modules.  http://bitovi.com/blog/2013/02/weekly-widget-paginated-grid.html shows pageCount / page being passed as a compute.  You can pass computes that work as getter / setters too.  This allows you to model the state as an observe, but your lower-level views don't have to know anything about the observe's structures.


Viewing all articles
Browse latest Browse all 3491

Trending Articles