cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira ...@upaya.co.uk>
Subject Re: Using JXTemplates\JXForms at the same time?
Date Fri, 30 Apr 2004 11:57:59 GMT
Derek Hohls wrote:

>Sorry, yes you will!,
>
Great!

> and thanks for making sense of this - 
>
You're welcome.

>obviously some "use cases" highlighting why JXTemplate
>is "recommended" (as opposed to XSP, which I think I 
>'grok') will be helpful.  
>
I'm not really in a position to give a comparison - I've never used XSP 
(I hacked one in the Lucene block once, but that was it).

I didn't ever use XSP, because its approach felt wrong. Mixing code with 
markup is something I've always disliked. And the implementation based 
upon stylesheets producing java code, I never liked either.

I prefer JXTemplate because it remains declarative. However, you can 
access javabeans from it, which means you can embed within your template 
calls to methods that _do_ things, e.g: #{httpTool/serverStatus}

public class HttpTool {
    public int getServerStatus() {
        HTTPClient client = new SomeHTTPClient();
        client.makeRequest();
        return client.getStatusCode();
    }
}

It just seems to separate things out more elegantly than XSP does.

The one downside I see to JXTemplate is that it isn't cached, whereas it 
is possible to make an XSP page that is cached.

Does that help?

Regards, Upayavira

>I guess the beauty of Cocoon is
>that it does not force a single path on you; as long as
>we can be clear as to what the pros and cons of the
>path options are, its OK.
>  
>

>Derek
>
>PS can JXTemplate do everything XSP can, and then some,
>or is it the other way around?
>
>  
>
>>>>uv@upaya.co.uk 2004/04/30 01:16:33 PM >>>
>>>>        
>>>>
>Derek Hohls wrote:
>
>  
>
>>Can either Thomas or Ugo why explain why JXTemplate
>>is needed for building a form - can this not be done via
>>XSP or XSLT?
>> 
>>
>>    
>>
>Does it have to be Thomas or Ugo? Will I do? ;-)
>
>JXTemplate is a 'template' language. As is XSP. So, you could use XSP
>in 
>place of JXTemplate. Either of them accesses some in memory objects and
>
>fills in gaps in a template. But XSLT is a transformation language - it
>
>therefore can't access those in memory objects. In this case, the in 
>memory objects are the form data.
>
>Generally though, JXTemplate I believe is more recommended, but XSP 
>should certainly be able to do it.
>
>Good enough?
>
>Regards, Upayavira
>
>
>  
>
>>Thanks
>>Derek
>>
>>Oh, and is there an example of the approach you adopt?
>>
>> 
>>
>>    
>>
>>>>>u.cei@cbim.it 2004/04/30 11:10:18 AM >>>
>>>>>       
>>>>>
>>>>>          
>>>>>
>>Thomas Kjeldahl Nilsson wrote:
>> 
>>
>>    
>>
>>>  Question: Can I use some combination of JXForm\JXTemplate for
>>>   
>>>
>>>      
>>>
>>this?
>> 
>>
>>    
>>
>>>  The problem is that I need JXTemplate for conditionals in
>>>   
>>>
>>>      
>>>
>>building
>> 
>>
>>    
>>
>>>  the markup and content of the xml\html, but also I'd like to use
>>>  JXForms for the forms\interactive content.
>>>   
>>>
>>>      
>>>
>>JXForms is dead. Since you are starting a new project, I suggest you 
>>grab 2.1.5-dev from CVS and start working with "Cocoon Forms" (which
>>was 
>>called "Woody" in 2.1.4). This is *THE* only officially supported
>>    
>>
>forms
>  
>
>>framework in Cocoon. Planned release date for 2.1.5 is around May
>>14th.
>>
>>And yes, you can use it together with JXTemplate. I do it all the
>>time.
>>
>>	Ugo
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
>>For additional commands, e-mail: users-help@cocoon.apache.org 
>>
>>
>> 
>>
>>    
>>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
>For additional commands, e-mail: users-help@cocoon.apache.org 
>
>
>  
>



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


Mime
View raw message