PureMVC Architects Lounge

PureMVC Manifold => Multicore Version => Topic started by: saad on February 13, 2014, 02:20:40



Title: equivalent of initializeModel and initializeView in ApplicationFacade
Post by: saad on February 13, 2014, 02:20:40
is there an equivalent of initializeModel and initializeView in ApplicationFacade for the JS port? (http://puremvc.org/pages/docs/AS3/standard/framework_asdoc/org/puremvc/as3/patterns/facade/Facade.html)

I see a startup function in the demo examples that registers the commands and then fires the notification instead of initializeController?

https://github.com/PureMVC/puremvc-js-demo-reversetext/blob/master/src/ApplicationFacade.js

how this works out in the JS port?


Title: Re: equivalent of initializeModel and initializeView in ApplicationFacade
Post by: puremvc on March 06, 2014, 02:47:57
The initializeController() method is present, but it was deemed just as easy for the startup() method to register the StartupCommand and then trigger it.

In this particular application, the methodology of putting the registration of commands into a sub command of StatupCommand was implemented, which is an alternate way of doing things that reduces the number of classes the Facade has to know.