You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Danny Waldmann <wa...@isogmbh.de> on 2008/01/02 08:14:11 UTC

Apache Lenya and Tapestry 4


Hi! 

I got a question. Maybe, you could help me. 

We want to integrate an Apache Tapestry 4 (similar to JSF) Web Application
with Apache Lenya. The goal is, that the Apache Tapestry 4 Web Application
is able to get content like pictures or text from the Apache Lenya
repository and that the author can edit a website and add and modify
content. 

Tapestry uses HTML Templates. 

My question is, do you see a way to do this with Apache Lenya and 
When yes, how you would do this? 

Thanks in advance. 




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


AW: AW: Apache Lenya and Tapestry 4

Posted by Danny Waldmann <wa...@isogmbh.de>.

Thank's again for the answers so far.
To clarify some things: 

> As I understand it, the Tapestry site is a dynamic application - IMO 
> combining dynamic webapps with CMSs for static content is a quite 
> typical approach.

Tapestry consists basically out of three things: 

- Page Class
- HTML Template
- Page Specification 

In the HTML Template you would find something like that: 

<p>Now is <span jwcid="now">8:27, the 1st of April 2007</span>.</p>

jwcid means Java Web Component ID. If the code is running this part 
will be replaced by the component with the name "now" 

The pace specification looks like that: 

<page-specification class="com.devshed.tapestry.first.Home">
<component id="now" type="Insert">
<binding name="value" value="currentDate"/>
</component>
</page-specification>

"com.devshed.tapestry.first.Home" is the Java Class associated with the
component. 
The component is specified with: 

<component id="now" type="Insert">
<binding name="value" value="currentDate"/>
</component>

The Java class itself then has a method: 

public Date getCurrentDate() {
return new Date();
 }

That's the basic idea. 
Maybe this helps to clarify the things a bit. 


-----Ursprüngliche Nachricht-----
Von: news [mailto:news@ger.gmane.org] Im Auftrag von Andreas Hartmann
Gesendet: Donnerstag, 3. Januar 2008 10:11
An: user@lenya.apache.org
Betreff: Re: AW: Apache Lenya and Tapestry 4

Jörn Nettingsmeier schrieb:
> Andreas Hartmann wrote:
>> If you want WYSIWYG across multiple applications, I'd recommend the
>> following basic principles:
>>
>> - Keep the templates as simple as possible.
>> - Avoid duplicating template logic. If you have to duplicate them, try
>>   to generate them automatically from a single source (meta templates).
>> - Do everything you can in CSS. CSS can be shared.
>>
>> In your specific case, I'd try to strip down the Tapestry templates to a
>> very basic XHTML structure, which can be duplicated in the Lenya
>> application with low maintainance costs.
> 
> why would anyone want to do that? if you are prepared to touch and
> refactor existing templates, why not just migrate to lenya (or another
> CMS) entirely? or is there something special that only tapestry can do?

As I understand it, the Tapestry site is a dynamic application - IMO 
combining dynamic webapps with CMSs for static content is a quite 
typical approach. But of course I can't tell if it makes sense in this 
special scenario here.

-- Andreas


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: AW: Apache Lenya and Tapestry 4

Posted by Andreas Hartmann <an...@apache.org>.
Jörn Nettingsmeier schrieb:
> Andreas Hartmann wrote:
>> If you want WYSIWYG across multiple applications, I'd recommend the
>> following basic principles:
>>
>> - Keep the templates as simple as possible.
>> - Avoid duplicating template logic. If you have to duplicate them, try
>>   to generate them automatically from a single source (meta templates).
>> - Do everything you can in CSS. CSS can be shared.
>>
>> In your specific case, I'd try to strip down the Tapestry templates to a
>> very basic XHTML structure, which can be duplicated in the Lenya
>> application with low maintainance costs.
> 
> why would anyone want to do that? if you are prepared to touch and
> refactor existing templates, why not just migrate to lenya (or another
> CMS) entirely? or is there something special that only tapestry can do?

As I understand it, the Tapestry site is a dynamic application - IMO 
combining dynamic webapps with CMSs for static content is a quite 
typical approach. But of course I can't tell if it makes sense in this 
special scenario here.

-- Andreas


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: AW: Apache Lenya and Tapestry 4

Posted by Jörn Nettingsmeier <ne...@apache.org>.
Andreas Hartmann wrote:
> If you want WYSIWYG across multiple applications, I'd recommend the
> following basic principles:
> 
> - Keep the templates as simple as possible.
> - Avoid duplicating template logic. If you have to duplicate them, try
>   to generate them automatically from a single source (meta templates).
> - Do everything you can in CSS. CSS can be shared.
> 
> In your specific case, I'd try to strip down the Tapestry templates to a
> very basic XHTML structure, which can be duplicated in the Lenya
> application with low maintainance costs.

why would anyone want to do that? if you are prepared to touch and
refactor existing templates, why not just migrate to lenya (or another
CMS) entirely? or is there something special that only tapestry can do?


-- 
Jörn Nettingsmeier

"One of my most productive days was throwing away 1000 lines of code."
  - Ken Thompson.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: AW: Apache Lenya and Tapestry 4

Posted by Andreas Hartmann <an...@apache.org>.
Danny Waldmann schrieb:

>> Your authors can edit the website contents with Lenya, I don't think it 
>> would be useful to add another Tapestry-based layer on top of the 
>> authoring environment.
> 
> Thanks for your answer. Yes, we don't want to do that. A main problem that 
> I'm seeing right now is that Lenya is using it's own XML based Template
> mechanism whereas Tapestry is using our HTML Templates. How, in this
> scenario the author is going to see what the layout is look like? Because he
> sees the content together with the Lenya XML based Templates right?

If you want WYSIWYG across multiple applications, I'd recommend the 
following basic principles:

- Keep the templates as simple as possible.
- Avoid duplicating template logic. If you have to duplicate them, try
   to generate them automatically from a single source (meta templates).
- Do everything you can in CSS. CSS can be shared.

In your specific case, I'd try to strip down the Tapestry templates to a 
very basic XHTML structure, which can be duplicated in the Lenya 
application with low maintainance costs.

Do you already know which editor you want to use? (BXE, Kupu, ...)


>> A central question is how to design 
>> the interface between your application and Lenya. Do you want to use 
>> something like HTTP to achieve a loose coupling, or do you want to 
>> integrate the apps more tightly, e.g. using SAX to get the XML content?
> 
> At this point our wishes are very small. We only want to fetch content from
> the Apache Lenya repository and want that a editor (our clients) can access
> Apache Lenya and modify texts, pictures and the like on some websites. At
> the moment we put that content in the apache web server and 
> access it from our tapestry web app. Now we have thought of using a web
> content management system for that purpose. This will allow our clients to 
> edit the content directly. 
> 
> Can you think of a possible solution for that scenario? 

If you can implement a caching mechanism in your Tapestry application, 
the easiest way would probably be to fetch XHTML snippets from Lenya 
over HTTP and pass them through your final rendering steps. I'm not 
familiar with the Tapestry rendering mechanism - if you need more 
details about the integration, you'd have to give me a little introduction.

-- Andreas


> 
> Thanks in advance. 
> 
> 
> Hi Danny,
> 
> Danny Waldmann schrieb:
>> We want to integrate an Apache Tapestry 4 (similar to JSF) Web Application
>> with Apache Lenya. The goal is, that the Apache Tapestry 4 Web Application
>> is able to get content like pictures or text from the Apache Lenya
>> repository and that the author can edit a website and add and modify
>> content. 
>>
>> Tapestry uses HTML Templates. 
>>
>> My question is, do you see a way to do this with Apache Lenya and 
>> When yes, how you would do this? 
> 
> it's hard to answer your question without knowing some more details.
> 
> Your authors can edit the website contents with Lenya, I don't think it 
> would be useful to add another Tapestry-based layer on top of the 
> authoring environment.
> 
> As far as the Tapestry web application is concerned: You can fetch 
> content from the Lenya application in various formats, Lenya was 
> designed for this usage scenario. A central question is how to design 
> the interface between your application and Lenya. Do you want to use 
> something like HTTP to achieve a loose coupling, or do you want to 
> integrate the apps more tightly, e.g. using SAX to get the XML content? 
> Some aspects to keep in mind are performance/caching, flexibility, 
> reusability etc.
> 
> -- Andreas
> 
> 


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


AW: Apache Lenya and Tapestry 4

Posted by Danny Waldmann <wa...@isogmbh.de>.

-----Ursprüngliche Nachricht-----
Von: news [mailto:news@ger.gmane.org] Im Auftrag von Andreas Hartmann
Gesendet: Mittwoch, 2. Januar 2008 10:35
An: user@lenya.apache.org
Betreff: Re: Apache Lenya and Tapestry 4



> Your authors can edit the website contents with Lenya, I don't think it 
> would be useful to add another Tapestry-based layer on top of the 
> authoring environment.

Thanks for your answer. Yes, we don't want to do that. A main problem that 
I'm seeing right now is that Lenya is using it's own XML based Template
mechanism whereas Tapestry is using our HTML Templates. How, in this
scenario the author is going to see what the layout is look like? Because he
sees the content together with the Lenya XML based Templates right? 

> A central question is how to design 
> the interface between your application and Lenya. Do you want to use 
> something like HTTP to achieve a loose coupling, or do you want to 
> integrate the apps more tightly, e.g. using SAX to get the XML content?

At this point our wishes are very small. We only want to fetch content from
the Apache Lenya repository and want that a editor (our clients) can access
Apache Lenya and modify texts, pictures and the like on some websites. At
the moment we put that content in the apache web server and 
access it from our tapestry web app. Now we have thought of using a web
content management system for that purpose. This will allow our clients to 
edit the content directly. 

Can you think of a possible solution for that scenario? 

Thanks in advance. 


Hi Danny,

Danny Waldmann schrieb:
> We want to integrate an Apache Tapestry 4 (similar to JSF) Web Application
> with Apache Lenya. The goal is, that the Apache Tapestry 4 Web Application
> is able to get content like pictures or text from the Apache Lenya
> repository and that the author can edit a website and add and modify
> content. 
> 
> Tapestry uses HTML Templates. 
> 
> My question is, do you see a way to do this with Apache Lenya and 
> When yes, how you would do this? 

it's hard to answer your question without knowing some more details.

Your authors can edit the website contents with Lenya, I don't think it 
would be useful to add another Tapestry-based layer on top of the 
authoring environment.

As far as the Tapestry web application is concerned: You can fetch 
content from the Lenya application in various formats, Lenya was 
designed for this usage scenario. A central question is how to design 
the interface between your application and Lenya. Do you want to use 
something like HTTP to achieve a loose coupling, or do you want to 
integrate the apps more tightly, e.g. using SAX to get the XML content? 
Some aspects to keep in mind are performance/caching, flexibility, 
reusability etc.

-- Andreas


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Apache Lenya and Tapestry 4

Posted by Andreas Hartmann <an...@apache.org>.
Hi Danny,

Danny Waldmann schrieb:
> We want to integrate an Apache Tapestry 4 (similar to JSF) Web Application
> with Apache Lenya. The goal is, that the Apache Tapestry 4 Web Application
> is able to get content like pictures or text from the Apache Lenya
> repository and that the author can edit a website and add and modify
> content. 
> 
> Tapestry uses HTML Templates. 
> 
> My question is, do you see a way to do this with Apache Lenya and 
> When yes, how you would do this? 

it's hard to answer your question without knowing some more details.

Your authors can edit the website contents with Lenya, I don't think it 
would be useful to add another Tapestry-based layer on top of the 
authoring environment.

As far as the Tapestry web application is concerned: You can fetch 
content from the Lenya application in various formats, Lenya was 
designed for this usage scenario. A central question is how to design 
the interface between your application and Lenya. Do you want to use 
something like HTTP to achieve a loose coupling, or do you want to 
integrate the apps more tightly, e.g. using SAX to get the XML content? 
Some aspects to keep in mind are performance/caching, flexibility, 
reusability etc.

-- Andreas


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org