Mohan Kishore wrote:
Actually imho, a pretty important distinction. The whole MVC pattern is based
on the controller delegating the flow FROM controller TO the view. If we have
the views again delegating flow amongst themselves, the role of controller
seems compromised...(poor thing, it will go out of control :)

When a page says


<logic:forward forward="welcome"/>

it's not deciding where to go. It's asking the controller "where's the welcome forward", and the controller returns the appropriate URI. The html:link tag does the same thing.

If you want to talk strict MVC, the taglibs are rife with these type of "voilations". (And I use the term loosely.) Most of the linking tags can take a page parameter, which is a system URI. In a strict MVC environment, the pages shouldn't know anything at all about the system URIs.

While we try to encourage best practices, Struts was never a strict MVC/Model 2 framework. We have lots and lots of tags that help people cross over from the Model 1 side. Scuttling these would just make migrating more difficult.

IMHO, the role of Struts is to provide a practical, standards-based Model 2 framework that *encourages* best practices. We shouldn't be preaching MVC for MVC's sake.

MVC is a useful paradigm, but, honestly, most of us are not really using a textbook MVC architechture. Most of us are using the layers pattern. When you combine layers with the Struts controller and taglibs, it looks a lot like MVC. But more often than not, to describe what a lot of us doing, you need to stretch the MVC paradigm a country mile.

-Ted.


-- Ted Husted, Struts in Action <http://husted.com/struts/book.html>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to