You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Bertrand Delacretaz <bd...@codeconsult.ch> on 2003/06/08 13:18:48 UTC

Re: Cocoon: presentation tier + J2EE EJB business tier --- a valid performant architecture?

Le Samedi, 7 juin 2003, à 19:06 Europe/Zurich, Steve Brackenbury a 
écrit :
> ...Also, my development team is experienced with XSL.  I'm concerned 
> about how they will react to XSL.  They are experienced JSP 
> developers.  What kind of balking might I encounter?  How can I get 
> them to give XSL a fair assessment?  Any tips on convincing them of 
> the benefits?...

I assume you mean "not experienced".

I've been doing quite a lot of XSLT in the last two years, also 
mentoring several programmers coming from various backgrounds. It has 
been a success for people who were open-minded about accepting comments 
and adapt their way of working to what XSLT does best, and a failure 
with people who tried to write (for example) java-like code in XSLT, 
without taking advantage of specific XSLT features and way of working.

What I like in XSLT is that it is very concise if written correctly (in 
terms of number of constructs - of course the XML syntax is a pain), 
often writing a few templates does the job *but* it might take a lot of 
reflexion to write them. As always, building simple things takes a lot 
of brainpower.

For me the move from java to XSLT is similar to moving to an 
object-oriented language from a procedural one: you have to change your 
state of mind, if you keep on working "the old way" with the new tool 
it fails.

So I'd say the advantages are that you will write much less XSLT code 
than java code to achieve the same results (which means less code to 
test and maintain), but unless your people are willing to learn XSLT 
properly and understand "the XSLT way" they might be frustrated by the 
results.

Compared to JSP, I think XSLT's advantages are mostly in the ability to 
generate different formats (HTML, HTML+CSS, SVG, PDF, RTF, WAP, etc.) 
with similar tools and reusable chunks of XSLT code. If your app 
produces only HTML the difference in maintainability might not be so 
important.

Hope this helps,
--
   Bertrand Delacretaz
   independent consultant, Lausanne, Switzerland
   http://cvs.apache.org/~bdelacretaz/


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: Cocoon: presentation tier + J2EE EJB business tier --- a

Posted by Upayavira <uv...@upaya.co.uk>.
 
> I came across an article by Ovidiu Predescu 
> (http://www.webweavertech.com/ovidiu/weblog/index.html)  discussing a
> topic originated by Eric van der Vlist
> (http://www.xml.com/pub/a/2000/07/26/xslt/xsltstyle.html) which
> appears to address this design approach.  Are you familiar with this
> pattern?  What are your thoughts?

Very interesting reading. And, this approach can be extended, to ease the lives of 
Dreamweaver-bound designers.

Why use your own XML markup to add your XSLT elements? Why not use a 
combination of HTML and CSS? For example:

<div class="repeat-books">
   <tr>
     <td>
        <span id="book-title">Book Title</span>
     </td>
     <td>
        <span id="book-author">Book Author</span>
     </td>
     <td>
        <span id="book-price">Book Price</span>
     </td>
  </tr>
</div>

Then, your div[@class='repeat-books'] node gets replaced with an xsl:for-each, and 
your span[@id='book-title'] with an xsl:value-of, etc. The text within the spans will be 
discarded, and is provided simply for the designer's convenience.

Then, you use an HTML generator followed by an XSLT transform to make your 
XSLT stylesheet ready for use.

Now that strikes me as clever, and really useful.

What do the rest of you think?

Regards, Upayavira


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: Cocoon: presentation tier + J2EE EJB business tier --- a valid performant architecture?

Posted by Steve Brackenbury <s....@sympatico.ca>.
At 01:18 PM 6/8/2003 +0200, Bertrand Delacretaz wrote:
>Le Samedi, 7 juin 2003, à 19:06 Europe/Zurich, Steve Brackenbury a écrit :
>>...Also, my development team is experienced with XSL.  I'm concerned 
>>about how they will react to XSL.  They are experienced JSP 
>>developers.  What kind of balking might I encounter?  How can I get them 
>>to give XSL a fair assessment?  Any tips on convincing them of the benefits?...
>
>I assume you mean "not experienced".

Sorry for the typo.  Yes, I meant *not* experienced.

< portions of reply deleted>

>Compared to JSP, I think XSLT's advantages are mostly in the ability to 
>generate different formats (HTML, HTML+CSS, SVG, PDF, RTF, WAP, etc.) with 
>similar tools and reusable chunks of XSLT code. If your app produces only 
>HTML the difference in maintainability might not be so important.

I'm hoping to partition the responsibility of page design layout and 
content assembly as much as possible.  We may out-source the page 
layout/design for our project to an external group.  I'd like to take an 
approach whereby developers are really merging content from the business 
model with a template page created by a page designer.  The designer should 
not have to know about XSL details.

I came across an article by Ovidiu Predescu 
(http://www.webweavertech.com/ovidiu/weblog/index.html)  discussing a topic 
originated by Eric van der Vlist 
(http://www.xml.com/pub/a/2000/07/26/xslt/xsltstyle.html) which appears to 
address this design approach.  Are you familiar with this pattern?  What 
are your thoughts?

Because the developers are inexperienced with XSL.  I'd really like to 
establish some "patterns-of'-usage" up front before development 
starts.  I'm hoping this will simplify things and as you pointed out in 
your post Bertrand, will help focus developers on using XSL in the way it 
was intended.

If you have any suggestions on XSL tutorials, patterns or resources you can 
recommend, I would be grateful.

>Hope this helps,
>--
>   Bertrand Delacretaz
>   independent consultant, Lausanne, Switzerland
>   http://cvs.apache.org/~bdelacretaz/
Yes it does.  Thanks for taking the time to share your experience.

regards,

...Steve

Steve Brackenbury
Toronto, ON, CANADA
email:    s.brackenbury@sympatico.ca




---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org