This has been an on-going discussion, typically 
involving Richard Lewis-Shell.

Tapestry makes just a few assumptions, one of which is 
that, one a page is loaded, the construction of the page 
is static ... no new components will be added or 
removed, even the bindings are expected to not change.

Problems abound when you abandon this model.

For example, how do you integrate the component into the 
HTML template of its container?  HTML templates are read 
an organized the first time a component renders.  In 
this step (see BaseComponent.renderComponent()) the 
template for the component is analyzed ... it finds the 
list of "outermost" elements (elements are static HTML 
blocks or components) and assigns some elements as 
wrapped by components.

Where would a new component fit into this mass?  How 
would you identify where it and its chunks of HTML (and 
embedded components) go?

Next:  once you've modified *a* page, what do you do 
with any other pages in the page pool?  Pages are 
supposed to be interchangable, but now you have a 
special "one off" page instance that doesn't quite match 
the others.

If the "one off" page is discarded, how do you recreate 
it?  If the HttpSession moves to another server within 
the cluster, how do you recreate it?

Basically, the functionality you want bends Tapestry 
until it snaps.  The Delegator and InsertBlock 
components provide the functionality you need.

There has been some work done where entire pages are 
dynamically constructed, possibly driven by external 
(i.e., database) data.  Tapestry provides the correct 
hooks for this to occur.  In this model, the page names 
are uniqued in some way (perhaps a database primary key 
is attached), so any server in the cluster can recreate 
the page's complete specification from the shared 
external data.  

It's tricky, but doable.  There are big walls between 
areas of functionality in Tapestry to support this kind 
of thing ... page pooling is seperate from page loading 
is seperate from page specification and templates.  From 
the start, I knew that completely static applications 
would be insufficient, but if you want to do very hard 
things, you have to expect to write at least a little 
code yourself.


--
[EMAIL PROTECTED]

http://tapestry.sf.net
> Hi all,
> Is there any way to dynamically load a component on the fly?
> As I quickly scan thru the API, I see all required methods are available, 
> but the question is - how will this dynamic loading fit into the overall 
> process/render cycle?
> 
> I guess Block/InsertBlock components should be used instead of dynamic 
> loading at run time..is it?
> 
> thanks
> 
> 
> 
> 
> _________________________________________________________________
> Chat with friends online, try MSN Messenger: http://messenger.msn.com
> 
> 
> _______________________________________________________________
> 
> Hundreds of nodes, one monster rendering program.
> Now that�s a super model! Visit http://clustering.foundries.sf.net/
> _______________________________________________
> Tapestry-developer mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/tapestry-developer

_______________________________________________________________

Hundreds of nodes, one monster rendering program.
Now that�s a super model! Visit http://clustering.foundries.sf.net/
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer

Reply via email to