actually--giving this more thought...
the command is the wrapper around the whole maverick work unit--it wraps the
entire controller -> view -> transform chain. when you specify a command you
are specifying the entire work unit.
a controller is more akin to a view than a command in that the controller is
just one step in the processing of the command.
in fact, it is completely valid to have a command with no controller:
<command name="foo">
<view path="makeFO.jsp">
<transform type="fop"/>
</view>
</command>
--jim
----- Original Message -----
From: "jim moore" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 23, 2003 12:49 PM
Subject: Re: [Mav-user] Commands vs. Controllers
> > 1. Browser requests an URL (eg. http://localhost/test.m)
> > 2. In maveric terminology it appears that test.m is actually
> > mapped to a "test" command.
> > 3. Maverick dispatches the request to appropriate Controller
> > that takes care of command execution. Controller also takes
> > care of the flow (eg. returns a view or executes another
> > command).
> >
> > Any controller can serve multiple commands. So commands are just
> > placeholders for specific URLs.
>
>
> this is a good way to look at it--you could easily have a general purpose
> controller that could you would reuse in different situations--something
as
> simple as:
>
> <command name="report">
> <controller class="foo.ReportCreator"/>
> <view path="report.jsp"/>
> </command>
>
> <command name="pdfReport">
> <controller class="foo.ReportCreator"/>
> <view path="pdf/report.jsp">
> <transform type="fop"/>
> </view>
> </command>
>
> <command name="excelReport">
> <controller class="foo.ReportCreator"/>
> <view path="excel/report.jsp"/>
> </command>
>
> obviously this could also be done as:
>
> <command name="report">
> <controller class="foo.ReportCreator"/>
> <view name="standard" path="report.jsp"/>
> <view name="pdf" path="pdf/report.jsp">
> <transform type="fop"/>
> </view>
> <view name="excel" path="excel/report.jsp"/>
> </command>
>
> but the point is it is your choice as to how you want to organize your
apps.
>
> --jim
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: INetU
> Attention Web Developers & Consultants: Become An INetU Hosting Partner.
> Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
> INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
> [INVALID FOOTER]
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
[INVALID FOOTER]