Skip to content
February 27, 2011 / Danii Oliver

Working in MVCS to trace information

In Pure MVCS timing is everything. In Flex depending on how you set up your views, when injecting classes into another you must be careful where and when you call for parameters.

If called at the incorrect time you will get errors. For instance, if you call in onRegister( ); to be given the index of Child not currently viewable – although you are calling from its mediator – or you call for in in the Event of another Model you will get an error.
The trick to working in Pure MVCS is to be very clinical. It is the perfect programming design pattern for those of us with germ-phobia. The idea is to not let variables (set in the Model) and Events cross the boundaries of their class and methods even if they are working together. Think of construction unions. Electricians’ unions will not work at the same time the Plumbing unions are on sight nor will you see the Masonry union on sight with the Iron union.
Yet and still they seemingly come together at run-time to create a great piece of architecture. The final result is a functioning program that need not rip the entire structure apart to update or fix. You just call the proper Mediator for the appropriate view when needed. To find information about the View simply ask in the view.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: