On 1/27/06, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
>
> Struts best practices suggest that an action handles a request (with
> or without input data), while a JSP page is simply a data-aware HTML.
> Look at it this way: by calling an action instead of calling JSP
> directly you are asking for a resource to render itself according to
> its current state. If you called JSP directly, you would be asking to
> display a specific view of a resource, while this view may not
> correspond to resource state anymore.
>
> If you have 1:1 relationship between actions and pages, using JSP
> directly is basically the same thing, but you need to initialize your
> backing bean... sorry, your actionform or fromever you pull the data,
> anyway. This also works, if your resource can have several states, but
> views for all states are defined in one JSP page as subviews.


"render" ... "backing bean" .... hmm, those terms sound familiar :-)


The "view helper" approach described here is not popular among Struts
> users, but is used in other frameworks like Stripes.


Depends on which portion of the audience you are talking about.  Shale's
view controllers are very much aligned with the view helper design pattern,
and it's one of the standard patterns that works well for JavaServer Faces
in general.

Michael J.


Craig

Reply via email to