You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jeff Turner <je...@socialchange.net.au> on 2001/09/18 06:41:00 UTC

Re: XSPs vs JSPs

On Mon, Sep 17, 2001 at 03:12:45PM +0800, Damian_Kwok@singaporeair.com.sg wrote:
> 
>    Hi,
>    I can't seem to find much information on using JSPs with Cocoon -
>    seems to me that this would be very useful since we already have a
>    fair amount of JSPs, and it's an easier sell to management who is
>    unwilling to commit to a relatively new technology (XSP).
>    my questions is, are there any limitations with regards to using JSPs
>    with Cocoon?  e.g. will we be able to use all the JSP tag libraries we
>    already have?  and will there be any dependency/integration issues
>    based on the app server we're using (we're using weblogic 6.1) ?
>    finally, what are people's thoughts on the general issue of XSPs vs
>    JSPs?

I use JSPs and XSPs in the same app all the time. You only want to call
a JSP through Cocoon if you are you generating XML with your JSP, which
you then want to style. Otherwise, you're giving up
platform-independence and performance for no good reason.

>    From what I gathered, XSPs enforce a clean separation of
>    presentation/content/logic by design, whereas for JSPs you can do that
>    too but it's really up to developer discipline.

That's what the advertising leads one to believe, and that was the
original intention, but it's not true ;) XSP doesn't *enforce* clean
separation. Ideally, an XSP page contains content, and placeholders
where the logic should go. The logic is then isolated into logicsheets,
which are applied to the "content" XSP, replacing the placeholders with
generated content.  But XSP still has a <xsp:logic> tag, where XSP
writers are free to mix content with logic, just like JSP's <% %> tags.

The developers are well aware of this, and there have been intermittent
discussions on cocoon-dev about replacing XSP with something better.

For now, I'd say stick to JSP, and only use XSP when you really need to.
Also consider the many excellent JSP taglibs available [1]. You might
also want to look at Struts [2], which has a "workflow" proposal, the
result of which will make the Struts' config file rather similar in
concept to Cocoon's sitemap.

--Jeff

[1] http://jakarta.apache.org/taglibs/
[2] http://jakarta.apache.org/struts/


>    Damian

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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


Re: XSPs vs JSPs

Posted by Jeff Turner <je...@socialchange.net.au>.
On Mon, Sep 17, 2001 at 09:44:12PM -0700, Thomas Patterson wrote:
> I abhore both JSP and XSP and instead have relied solely on XML/XSLT and
> feel that I am far happier for it.  The developers stick to creating XML and
> the GUI folks can work their magic with XSLT.  Hell, I can even fairly
> easily port everything from Java to Microsoft's toolset if needed since it
> readily supports XML/XSLT.

That's the spirit ;) Keep it simple if at all possible.

Since the original poster asked "JSP or XSP", I'm bound to say that JSP
is much simpler, because there's no setting-up to be done (works out the
box with Tomcat, no jars to conflict), there's no XML syntax to fight,
no namespaces to forget or mistype.. 

--Jeff

> -Tom
> 

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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


Re: XSPs vs JSPs

Posted by Thomas Patterson <tp...@telisphere.com>.
I abhore both JSP and XSP and instead have relied solely on XML/XSLT and
feel that I am far happier for it.  The developers stick to creating XML and
the GUI folks can work their magic with XSLT.  Hell, I can even fairly
easily port everything from Java to Microsoft's toolset if needed since it
readily supports XML/XSLT.

-Tom


----- Original Message -----
From: "Jeff Turner" <je...@socialchange.net.au>
To: <co...@xml.apache.org>
Sent: Monday, September 17, 2001 9:41 PM
Subject: Re: XSPs vs JSPs


> On Mon, Sep 17, 2001 at 03:12:45PM +0800, Damian_Kwok@singaporeair.com.sg
wrote:
> >
> >    Hi,
> >    I can't seem to find much information on using JSPs with Cocoon -
> >    seems to me that this would be very useful since we already have a
> >    fair amount of JSPs, and it's an easier sell to management who is
> >    unwilling to commit to a relatively new technology (XSP).
> >    my questions is, are there any limitations with regards to using JSPs
> >    with Cocoon?  e.g. will we be able to use all the JSP tag libraries
we
> >    already have?  and will there be any dependency/integration issues
> >    based on the app server we're using (we're using weblogic 6.1) ?
> >    finally, what are people's thoughts on the general issue of XSPs vs
> >    JSPs?
>
> I use JSPs and XSPs in the same app all the time. You only want to call
> a JSP through Cocoon if you are you generating XML with your JSP, which
> you then want to style. Otherwise, you're giving up
> platform-independence and performance for no good reason.
>
> >    From what I gathered, XSPs enforce a clean separation of
> >    presentation/content/logic by design, whereas for JSPs you can do
that
> >    too but it's really up to developer discipline.
>
> That's what the advertising leads one to believe, and that was the
> original intention, but it's not true ;) XSP doesn't *enforce* clean
> separation. Ideally, an XSP page contains content, and placeholders
> where the logic should go. The logic is then isolated into logicsheets,
> which are applied to the "content" XSP, replacing the placeholders with
> generated content.  But XSP still has a <xsp:logic> tag, where XSP
> writers are free to mix content with logic, just like JSP's <% %> tags.
>
> The developers are well aware of this, and there have been intermittent
> discussions on cocoon-dev about replacing XSP with something better.
>
> For now, I'd say stick to JSP, and only use XSP when you really need to.
> Also consider the many excellent JSP taglibs available [1]. You might
> also want to look at Struts [2], which has a "workflow" proposal, the
> result of which will make the Struts' config file rather similar in
> concept to Cocoon's sitemap.
>
> --Jeff
>
> [1] http://jakarta.apache.org/taglibs/
> [2] http://jakarta.apache.org/struts/
>
>
> >    Damian
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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