design patterns - 'Intended to be' way to initialize a goog.ui.Control model? -
I find it amazing that the Google Closure Library not only provides functionality, but to build a solid architecture of a method and components A guide for getModel and
defines setModel
goog.ui.Control
goog.ui.Component . . I think its purpose is MVC :
- is the controller
goog.ui.Control
Goog.ui.ControlRenderer
Model is
goog.ui.Control.model_ property
This model in the entire library Could not find an example of the usage. I believe it keeps for complex modules which Google uses for itself, however, this idea prevents it from being interesting.
Now, this question is oriented: you
goog.ui.Control : inside the constructor? Should it be given as a parameter for control? Should it be set out from an initial form?
Goog.ui.Control exits
goog. Ui.Component , which has a method. This is not a specific use in the library - the details in the docs
"The arbitrary data associated with the component is given as an object." Such as meta-data "
after you set, before calling upon setmodel but before render, so that your
render /
createDom methods
model_ can use the property.
Comments
Post a Comment