tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thiago H de Paula Figueiredo" <thiag...@gmail.com>
Subject Re: Speed up page compiling
Date Wed, 09 Jan 2013 12:18:07 GMT
On Wed, 09 Jan 2013 06:24:19 -0200, Michael Wyraz  
<michael.wyraz@evermind.de> wrote:

> Hi,


> I had a closer look to the problem (reported by some of our developers):
> There are a few really big pages. Formerly these where separate pages  
> but since we changed everything to ajax navigation, these pages are  
> consolidated to one page.

Howard is way more suited for saying that than me, but I really think  
you've just described the source of your problem: you have a very huge  
page that contains your whole application. It's not just an  
über-component, which is a Tapestry anti-pattern, it's an über-page, which  
is an anti-pattern too. When you change something, you end up making  
Tapestry reload not just one page, but the whole application, as the  
application is inside one page.

There's absolutely no need to consolidate all pages into one for what  
you're doing. Just put different stuff wrapped in blocks, put these blocks  
in different pages, use ComponentSource to get a page instance, getBlock()  
to get the block, the Delegate component or event handler return value to  
render the block, Environment to pass information to the blocks. This  
isn't the only solution (maybe you could @InjectPage the pages, set  
properties on them and use getBody() or getBlock() instead of  
ComponentSource and Environment, but I haven't tested that_, but it's  
basically what the BeanModel-based components (Grid, BeanEditor,  
BeanEditForm, BeanDisplay) do.

Thiago H. de Paula Figueiredo

To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org

View raw message