RE: Is it a good idea to avoid the use of xsp ?

2002-09-12 Thread Leigh Dodds



If you strictly 
enforce that your XSP pages don't contain Java code, and 
only use custom 
tags (Logicsheets) then you don't necessarily have a 
problem.
 
Your efforts here 
should focus on creating a useful set of Logicsheets, but 
ones that have a 
declarative approach, rather than ending up with a series 
of procedural 
statements. 
 
The alternative 
approach is to rely more heavily on your pipeline components 

(Actions and 
Transformers). You're unlikely to use XSP pages here, but may 

have them in 
limited form, e.g. to parameterise your XML generation to add 

information from 
the request/session/etc. Often here the XML you're feeding 
into the pipeline 
provides cues to the downstream components. See the 
SQLTransformer for 
example.
 
I think the best 
advice I would give at the moment is to choose ONE of these 

approaches rather 
than a mix-and-match situation. If you do then your application 

is partly 
specified in the sitemap (pipeline structures) and partly in XSP pages 

(XML + 
Logicsheets) which isn't nice for maintainance: everything isn't in a single 

place.
 
The interesting 
aspect to all this is that if you look a bit closer they're actually 

equivalent:
 
When an XSP page 
is transformed into Java code, Cocoon determines the 
correct logic 
sheet transform to apply for each of your tags. This is repeated 

until all thats 
left are XSP elements. At that point the final transformation is 

carried out to 
generate Java code. This is then compiled and execute. So 
you have a process 
which: determines the code required for this task, 
then executes 
it.
 
When a Pipeline is 
triggered in the pipeline, Cocoon builds up the Pipeline 
components 
(perhaps affected by various Actions along the way). Once the 

pipeline is built 
its then executed.
 
So a useful 
question to ask is: which approach give you the most 
flexibility?
 
The advantages of 
putting things in the sitemap is that you're beginning to 
approach the "Holy 
Grail" of computing: component based development. Throw 
together a few 
pipeline components and you've got an application. 
Fantastic.
 
But, personally 
(and this is probably Cocoon heresy!), I think that once you start introducing 

fairly specific 
Actions and Transformers -- i.e. ones that have limited reuse, or may 

be used only in 
one 
pipeline -- you're possibly going down the wrong path: there's little 

value in having 
these as components other than Java code, particularly because 

the sitemap gets 
so complicated that its difficult to see whats going on.
 
So far I've tended 
to use the sitemap for only doing the association between 
requests/processing/response rather than defining the processing 
steps.
 
I'd be interested 
in what others think.
 
L.
 
 
-Original Message-From: Gernot 
Koller [mailto:[EMAIL PROTECTED]]Sent: 12 September 2002 
13:49To: [EMAIL PROTECTED]Subject: Is it a good 
idea to avoid the use of xsp ?

  Hi!
  First, thanks for your very quick replies to my last question!
  After quite some time discussing and evaluating we made a decision in favor 
  of cocoon as presentation framework. One major argument for cocoon and against 
  struts was that in jsp a strict seperation of logic (Java code) and 
  presentation is not always encouraged. There was also fear that the same 
  issues might apply to xsp and therefore the decision was made to use cocoon 
  but to avoid the use of xsp.
  I'm very new to cocoon and by now only have a very vague idea about xsp and 
  issues that might arise using xsp. So what do you think ? Is it a bad idea to 
  use cocoon but not use xsp ? Is it generally possible to compare jsp and xsp 
  in that way? Or are these fears inappropiate?
  thanks,
  Gernot
   --DI Gernot 
  Kollermailto:[EMAIL PROTECTED]phone:+43-676-340 55 52
  
  
  Do you Yahoo!?Yahoo! News - 
  Today's headlines


Re: Is it a good idea to avoid the use of xsp ?

2002-09-12 Thread Lajos Moczar

Hi Gernot -

Whether one method is a better or worse idea than another is largely 
dependent on how you implement it. Yes, XSPs do somewhat violate 
Separation of Concerns. And yes, you can compare XSPs to JSPs in terms 
of pitfalls.

The fact is, that there are some things you can only do with XSPs. My 
own personal preference is to first look at alternatives to XSPs (like 
using SQLTransformer instead of XSP + ESQL logicsheet). Then, if I do 
use an XSP, I try to use logicsheets wherever possible. If I have 
 blocks, I keep them TO A MINIMUM. If have more than say 2 
such blocks, I typically make my own logicsheet. The extra time it takes 
to do this is well worth the savings in administration later on.

Bottom line: there is no right or wrong way in Cocoon. Pick you 
approach, especially if you are comfortable with it. Just develop your 
own best practices to help you code cleanly and in a way that can easily 
be maintained later on.

Regards,

Lajos

-- 
galatea.com
Cocoon training, consulting & support

Gernot Koller wrote:

> Hi!
> 
> First, thanks for your very quick replies to my last question!
> 
> After quite some time discussing and evaluating we made a decision in 
> favor of cocoon as presentation framework. One major argument for cocoon 
> and against struts was that in jsp a strict seperation of logic (Java 
> code) and presentation is not always encouraged. There was also fear 
> that the same issues might apply to xsp and therefore the decision was 
> made to use cocoon but to avoid the use of xsp.
> 
> I'm very new to cocoon and by now only have a very vague idea about xsp 
> and issues that might arise using xsp. So what do you think ? Is it a 
> bad idea to use cocoon but not use xsp ? Is it generally possible to 
> compare jsp and xsp in that way? Or are these fears inappropiate?
> 
> thanks,
> 
> Gernot
> 
>  
> 
> 
> 
> --
> DI Gernot Koller
> mailto:[EMAIL PROTECTED]
> phone:+43-676-340 55 52
> 
> 
> 
> Do you Yahoo!?
> Yahoo! News  - Today's headlines






-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Re: Is it a good idea to avoid the use of xsp ?

2002-09-12 Thread Koen Pellegrims

On Thu, 12 Sep 2002, Gernot Koller wrote:

>
> Hi!
>
> First, thanks for your very quick replies to my last question!
>
> After quite some time discussing and evaluating we made a decision in favor of 
>cocoon as presentation framework. One major argument for cocoon and against struts 
>was that in jsp a strict seperation of logic (Java code) and presentation is not 
>always encouraged. There was also fear that the same issues might apply to xsp and 
>therefore the decision was made to use cocoon but to avoid the use of xsp.
>
> I'm very new to cocoon and by now only have a very vague idea about xsp and issues 
>that might arise using xsp. So what do you think ? Is it a bad idea to use cocoon but 
>not use xsp ? Is it generally possible to compare jsp and xsp in that way? Or are 
>these fears inappropiate?
>
In general, it doesn't matter what thechnology you use. XSP does not
provide separation of logic and presentation, the use of XML does this.
If you use JSP to generate XML and generate HTML from that XML you will
have the same degree of separation as with XSP.
The main advantage between JSP and XSP is that XSP encourages the
generation of valid XML.

> thanks,
>
> Gernot
>
>
>
>
> --
> DI Gernot Koller
> mailto:[EMAIL PROTECTED]
> phone:+43-676-340 55 52
>
>
> -
> Do you Yahoo!?
> Yahoo! News - Today's headlines


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Re: Is it a good idea to avoid the use of xsp ?

2002-09-12 Thread Barbara Post



AFAICS XSP is a bit similar to JSP in a way, 
so you will rather use Actions etc. They were introduced in C 2.0 to replace 
XSPs, when one wants ;-)
 
I personnally don't use and don't need XSP, but 
then I use a lot of transformers...
 
Babs

  - Original Message - 
  From: 
  Gernot Koller 
  
  To: [EMAIL PROTECTED] 
  
  Sent: Thursday, September 12, 2002 2:49 
  PM
  Subject: Is it a good idea to avoid the 
  use of xsp ?
  
  Hi!
  First, thanks for your very quick replies to my last question!
  After quite some time discussing and evaluating we made a decision in favor 
  of cocoon as presentation framework. One major argument for cocoon and against 
  struts was that in jsp a strict seperation of logic (Java code) and 
  presentation is not always encouraged. There was also fear that the same 
  issues might apply to xsp and therefore the decision was made to use cocoon 
  but to avoid the use of xsp.
  I'm very new to cocoon and by now only have a very vague idea about xsp and 
  issues that might arise using xsp. So what do you think ? Is it a bad idea to 
  use cocoon but not use xsp ? Is it generally possible to compare jsp and xsp 
  in that way? Or are these fears inappropiate?
  thanks,
  Gernot
   --DI Gernot 
  Kollermailto:[EMAIL PROTECTED]phone:+43-676-340 55 52
  
  
  Do you Yahoo!?Yahoo! News - 
  Today's headlines