:) On 29 March 2010 18:03, Dave Watts <[email protected]> wrote:
> > there is plenty of commentary out there to suggest that the controller is > > largely unnecessary and that the views can do it all as encapsulated > objects > > (i've even read something by someone much smarter than me [ > > http://c2.com/cgi-bin/wiki?MvcIsNotObjectOriented] that suggested that > the c > > in mvc was anti-oop) but for me the benefit for the controller is that i > can > > create functionality separate from design. > > I don't think it's really "anti-OOP" as much as irrelevant to OOP. The > controller has nothing to do with your object domain model, it's just > a mechanism to get messages from views to models or other views, and > vice-versa. > > > if you look at the html / php / mysql model, mvc has a very natural flow > - > > the mysql database and the php interact much like the controller (php) > and > > the model (mysql) and the result is then fed to the views (the served > html > > page). > > Strictly speaking, that's not how most web application developers > categorize the components of an MVC design (despite what the Wikipedia > page says). PHP (or whatever application server you're using) would > serve both as the controller and the views, and perhaps even the model > as well. PHP itself doesn't really encourage this sort of separation > (although it doesn't prevent it either), but for example, in a Java > web app you might use JSP for your views, and a single servlet as a > controller, and beans as your model. And of course, JSPs, servlets and > beans are all just Java code. But, generally speaking, views are > responsible for their own rendering, which typically requires > server-side logic. If the view isn't responsible for its own rendering > (which would be the case in a static HTML view, then the design > pattern in question might better be described as Model-View-Presenter > (MVP): > > http://en.wikipedia.org/wiki/Model_View_Presenter > > Now, this doesn't take into consideration the use of client-side > functionality and where that fits, but that presumably would just be > additional view logic. > > Dave Watts, CTO, Fig Leaf Software > http://www.figleaf.com/ > http://training.figleaf.com/ > > Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on > GSA Schedule, and provides the highest caliber vendor-authorized > instruction at our training centers, online, or onsite. > _______________________________________________ > Flashcoders mailing list > [email protected] > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

