This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Need 3 good reasons why XSLT is better than JSP+Velocity


> > Here are some reasons to stick with JSPs:
> > 1. The data needs to have "business logic" processing done as it's
used
> > to generate a web page -- things like calling Java classes (or COM
> > components, etc.)
> 
> I would argue that if you really have this requirement and you really
> can't figure out how to push it out of the presentation layer (with 
> XML/XSLt it's usually pretty easy) then you may have a need for XSLt 
> extensions.  I do not think that it is a reason to stick with JSP's.
> 

Yeah, this is the point, though -- XSLT is good when you are going from
the data layer pretty directly to the presentation layer.  If you need
to do a bunch of "procedural code" things between the data and
presentation layer, you probably want to use a procedural language.  Of
course, it is possible to have the business-logic tier produce XML that
then gets transformed with XSLT to become the presentation, but once you
are already using a procedural template like ASP or JSP, it is much less
attractive to be adding an extra step of complexity when you could just
as easily produce the XHTML directly from the JSP.  And if the business
and presentation are on different physical tiers, you would be taking a
serious scalability hit for dubious added value.  It is also *possible*
to call the business logic from within XSLT extensions or script blocks,
but in my opinion this violates the spirit of XSLT and is in any case
much less productive way to do business logic -- we have modern object
oriented languages and lots of experience doing it other ways, and using
those tools will result in faster, more stable code.

Attachment: smime.p7s
Description: application/pkcs7-signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]