Michael Jouravlev ha scritto:
On 9/7/06, Antonio Petrelli <[EMAIL PROTECTED]> wrote:
Michael Jouravlev ha scritto:
> Using actions is a totally legitimate way to build composite page.

I disagree, to build composite pages I will use "composite view" pattern
implementation, such as Tiles and Sitemesh.
I think that using actions as a way to build composite page breaks the
MVC pattern, because actions are not designed for this use.

Is this the only argument you have, "because actions are not designed
for this use"? You can do better than that ;-)

Eheh obviously, I must say that I was a bit lazy writing this sentence :-P
What I meant is that there are better solutions for composite pages than using actions, because they do not give the developer any help in doing it. What users normally do is to forward (or redirect) using 'return mapping.findForward("myForward")', and actions are easy to write when you mean to do it. You (I should say we all) seldom send the response directly, and it's easier, in these cases, using special actions (such as using DownloadAction). I think it's easier to write a JSP page with some <tiles:insert> and <tiles:put> tags than writing horrible (from my POV) "req.getRequestDispatcher().include".

But I think that private actions could be useful, e.g. using them together with Tiles for composing pages, but using another action to compose the page itself, well, I think you can do better than that :-D

Ciao
Antonio


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

Reply via email to