You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Couball, James" <Ja...@cotelligent.com> on 2002/02/04 20:12:44 UTC

Extending Struts (was: Boost Struts with XSLT and XML - JavaWorld .com)

I have been lurking for a couple of months now and have seen many useful
extensions to the Struts framework.  I am curious to understand what thought
has gone into better understand how Struts can be extended in common ways
such that:

(1) Extensions are an add-on/plug-in rather than a rewrite of the Struts
classes.

And

(2) non-overlapping extensions are compatible.  For example, wouldn't expect
Velocity and XSLT extensions to work together but might expect different
classes of extensions to work together.

Can the types of extensions be classified?  For example, the XSLT extension
talked about in the JavaWorld article could be a "View" extension.

Should the framework be separated out into "core" and "extension" pieces?
For example, maybe the custom taglibs should be considered part of the JSP
Extension.  And the JSP Extension considered a "View" extension that follows
certain rules that other View extensions (such as Velocity and XSLT) must
follow.

Thank you,
James.





-----Original Message-----
From: Ted Husted [mailto:husted@apache.org] 
Sent: Monday, February 04, 2002 9:51 AM
To: Struts Users Mailing List
Subject: Re: Boost Struts with XSLT and XML - JavaWorld.com


Vaughan Jackson wrote:
> 
> A couple of naive questions.
> 
> 1. Given that the authors of the article mention that the
>    Cocoon framework uses XML and XSLT to generate HTML
>    (among other formats), I assume their motivation
>    for using Struts is to gain the MVC framework. Is this
>    correct? Does Velocity also have the same deficiency
>    compared with Struts?


It's said that Velocity enforces MVC better than JSPs.



> 2. Is there any possibility that something like this
>    may become a formal extension to Struts?

Definately. 



-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Java Web Development with Struts.
-- Tel +1 585 737-3463.
-- Web http://www.husted.com/struts/

--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Extending Struts (was: Boost Struts with XSLT and XML - JavaWorld.com)

Posted by Ted Husted <hu...@apache.org>.
"Couball, James" wrote:
> 
> I have been lurking for a couple of months now and have seen many useful
> extensions to the Struts framework.  I am curious to understand what thought
> has gone into better understand how Struts can be extended in common ways
> such that:
> 
> (1) Extensions are an add-on/plug-in rather than a rewrite of the Struts
> classes.

Craig and Oleg are doing some work along those lines via the Commons
Services component 

http://cvs.apache.org/viewcvs/jakarta-commons-sandbox/services/




> 
> And
> 
> (2) non-overlapping extensions are compatible.  For example, wouldn't expect
> Velocity and XSLT extensions to work together but might expect different
> classes of extensions to work together.

I believe both of these would be. The model is that the ActionServlet
forwards the request to another servlet (via the container). The second
servlet then finishes the response cycle, building on what the Action
and ActionServlet started. So, you could use a Velocity template in one
requesst, and XLST document the next, and then back to JSPs. 



> Can the types of extensions be classified?  For example, the XSLT extension
> talked about in the JavaWorld article could be a "View" extension.
> 
> Should the framework be separated out into "core" and "extension" pieces?
> For example, maybe the custom taglibs should be considered part of the JSP
> Extension.  And the JSP Extension considered a "View" extension that follows
> certain rules that other View extensions (such as Velocity and XSLT) must
> follow.

Yes. At some point, I'd like to get the taglibs moved out into a
seperate JAR to help clarify this point. This would be slightly more
important if more people where using alternative presentation devices
and didn't need the JSP tags at all. But right now, we are all still
recovering from suddenly needing so many Commons JARs :o)

-Ted.



> Thank you,
> James.
> 
> -----Original Message-----
> From: Ted Husted [mailto:husted@apache.org]
> Sent: Monday, February 04, 2002 9:51 AM
> To: Struts Users Mailing List
> Subject: Re: Boost Struts with XSLT and XML - JavaWorld.com
> 
> Vaughan Jackson wrote:
> >
> > A couple of naive questions.
> >
> > 1. Given that the authors of the article mention that the
> >    Cocoon framework uses XML and XSLT to generate HTML
> >    (among other formats), I assume their motivation
> >    for using Struts is to gain the MVC framework. Is this
> >    correct? Does Velocity also have the same deficiency
> >    compared with Struts?
> 
> It's said that Velocity enforces MVC better than JSPs.
> 
> > 2. Is there any possibility that something like this
> >    may become a formal extension to Struts?
> 
> Definately.
> 
> -- Ted Husted, Husted dot Com, Fairport NY USA.
> -- Java Web Development with Struts.
> -- Tel +1 585 737-3463.
> -- Web http://www.husted.com/struts/
> 
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>