I see. Thanks.

Karl


On Mar 7, 2012, at 4:52 PM, Peter Ginneberge wrote:

What he was asking was where does certain logic go, such as: where do you check whether an email address is valid.

So if only the view cares about the valid email address, you can do so in the view, otherwise move the logic to the controller. It also depends on how strict you are about what a view can / cannot do.

Some people (and frameworks) prefer to have no logic whatsoever in the view (dumb view) and have all the logic in the controller or in a go-between pattern: Observer / Mediator / Presenter - whichever fits their need.
For instance PureMVC and RobotLegs use Mediators:
http://puremvc.org/component/option,com_wrapper/Itemid,34/
http://www.robotlegs.org/diagram/

regards,
Muzak

----- Original Message ----- From: "Karl DeSaulniers" <k...@designdrumm.com >
To: "Flash Coders List" <flashcoders@chattyfig.figleaf.com>
Sent: Wednesday, March 07, 2012 9:15 PM
Subject: Re: [Flashcoders] MVC style Correction


So a view can possibly have its own MVC within it? As long as the view is the only one using the data?
View Controller
View Model
View View
Or am I interp. this incorrectly?
Best,
Karl
On Mar 7, 2012, at 10:29 AM, John McCormack wrote:
Issues which have not been resolved has to do with how the logic is distributed amongst MVC partners.

So if anyone comes across an example in which they are uncertain, please let us hear about it.

On that subject, the book by Joel Hooks' and Lindsey Fallow: "ActionScript Developers Guide to RobotLegs":
http://shop.oreilly.com/product/0636920021216.do

says...

"As to whether checking an email address is valid view logic or application logic, there's no fixed answer. A good filter is that if only the view classes care about this logic, it belongs in your view layer. If other parts of the application need to be checked or informed, it's controller code."

John

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Karl DeSaulniers
Design Drumm
http://designdrumm.com

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to