At 10:01 AM 4/20/01 -0700, Perrin Harkins wrote:
>On Fri, 20 Apr 2001, Francesco Pasqualini wrote:
> > But are there in the mod_perl architecture some guidelines and/or
> > frameworks that encourages the MVC design patern ? I think that
> > Apache::ASP could be (for example) the right tool, adding the
> > "forward" feature.
>
>The forward feature looks like an ordinary include to me.  Is there any
>real difference between that and the Apache::ASP version?
>
>$Response->Include("filename.inc", @args);

I don't know what Apache::ASP is doing in this case, but the Forward in 
JSPs is not a simple include.

A forward is literally forwarding the request from one JSP to another JSP 
page. As long as the previous JSP page has not output any data (and is pure 
model/controller code) then the forward can be made to any JSP page that 
has its own content-type and data to display.

This is how a pure JSP app can be made MVC. You write beans which represent 
the model, one JSP for the main app controller which dynamically determines 
the actual full display JSP (the view) to forward to.

A simple include would not care, for example, if the content-type or a 
header in the first page had already been output. In the case of JSP, if 
the content gets commited in one page, forward is a directive that will no 
longer work I believe.

Later,
     Gunther

Reply via email to