i just wanted to get some opinions on it really and see if others were having the same problem etc... the problem that patrick described is exactly the thing that was bugging me... i wanted to add links and i had to shoe horn them in rather than use the predefined component and it just felt wrong because that is what a component based architecture is for surely!
however there are lots of people who seem to say they just get used to the tapestry way of doing things... fair enough. i can accept that the framework doesnt work in the same way as others do, and like mike said there are a LOT of things to like about tapestry, and the pros definately outweigh the cons. ill be interested to see how it develops in 4.1... until then i'll just keep posting messages about not being able to add components dynamically every few weeks :P On 1/26/06, Stephen Todd <[EMAIL PROTECTED]> wrote: > > It seems to me that this same issue seems to repeat itself every > couple weeks. I also had asked about this functionality a month ago. > The solutions all seemed to be workarounds for this design bug. Some > reason there are some here that seem hold on to this idea of static > structure dynamic content as if it were some sacred golden calf. It > seems like it is such a talked about feature and something that is so > expected that it seems strange that there is such a great resistance > to the idea. > > I'm no expert in Tapesty—really I am a new user. Over Christmas I > delved into the code to see what it would take. My schedule tightened > up so that I haven't given it much time since. My understanding is > that everything is cached associated to the page and the structure is > created in memory when the page is loaded. This is to improve > performance I presume so the page and components aren't read all the > time from file. > > I would say a solution would be to just pool all the components, have > a service to get a component from the pool. If the component isn't in > the pool, then load it and all its children. If a component is > desired dynamically then it could load when requested from the pool > (and then it would also be pooled). Then make everything components > and provide hooks to get at the page attributes. > > That may be completely worthless, but I think it is time to (re)visit > the idea dynamic structures in tapestry. > > Stephen > > On Jan 26, 2006, at 9:22 AM, Richard Kirby wrote: > > > Hello, > > > > gaz jones wrote: > >> ivano: i think you slightly missunderstood my example, maybe it wasnt > >> particularly clear. i would not be developing a componet to > >> display a link > >> that i would like to use in a page, i would be developing a > >> component that > >> inherits from AbstractComponent and needs to have links to other > >> pages > >> inside of it. now i would assume that i could use the components > >> that have > >> already been written to do this -> PageLink for example but i > >> cannot because > >> they cannot be instantiate directly in code. so i am forced to repeat > >> functionality that PageLink provides within my own component. > >> which leads me > >> to think, this is not a true component based framework. > >> > > It would be unusual to inherit from AbstractComponent and want to > > output significant amounts of HTML. Instead inherit from > > BaseComponent and provide a html template, and then adding a link > > using the existing PageLink component is trivial. > > > >> imo that is a major disadvantage, as it prevents you from dynamically > >> creating components that are made up of _other_ components when > >> you inherit > >> from AbstractComponet - that is a REAL pain. and something you can > >> do easily > >> in other component based frameworks. > >> > > However, I suspect that you want to create components on the fly, > > and you are right, Tapestry does not do this. Components (and > > pages) are statically defined, but dynamic in execution (e.g. using > > conditionals, and runtime determination of Blocks to render, but > > all the Blocks must be predefined). You can choose to say that > > Tapestry is not really component based because of this lack of > > feature if you like, others may disagree. > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
