Hello,

First, Kudos and many thanks for putting Wicket together. It looks very interesting.

I am researching component frameworks for an application, and have started looking into Wicket. Tapestry 3.1 is top of my list at the moment but I am just starting with some research on Wicket.

I wanted to add my opinions to the discussion on Javascript + css, as this is a basic requirement I have.

I am a Wicket newb - literally just downloaded it with Maven today, so if I say something dumb, my apologies.

I think the ability for a component to contribute CSS to head, and Javascript to body initialization is a fundamental feature. Tapestry does not do a great job of this, so I think Wicket starting on the right foot would be a boon.

To make full use of DHTML, a component developer should be able to render the text for css/jscript *dynamically*. Many users won't use this, but for those who need this (raises hand) it will be indispensible. It will allow for the creation of very cool components.

So here's my newb suggestion for your 1.0 release:

In short, provide the API hooks for component contributions to HEAD and BODY, and worry about the nitty gritty of script parsing later.

As an off the top of my head example (and with ignorance of the API - but I'm sure you'll get my meaning), lets say you had an interface called Contribution that had just one operation toString(), and let's say you added two methods to Component like:
addHeadContribution(Contribution c);
addBodyInitContribution(Contribution c);


Then, later when you want to add further functionality you can provide new subinterfaces and implementations for Contribution, like ScriptContribution and CSSContribution that do fancier processing.

This will provide backward compatibility for users who start using it right away, but provide an extension point for advanced functionality later.

Any solution that allows early birds to start doing cool things, while maintaining backward compatibility is what I am after.


FWIW, this is how I am handling this in Tapestry currently.

I don't use script specifications (too clunky) I load groovy scripts with groovestry and use the api to add the stuff like so:

Body body = Body.get(cycle);
body.addInitializationScript();
body.addBodyScript();

I added a hack to allow something similar to be done for CSS.


regards, Evan.



Martijn Dashorst wrote:
Just to put some oil on the fire: A List Apart has a nice article on using javascript to add javascript functionality to components:
http://www.alistapart.com/articles/scripttriggers/


Martijn



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click



------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Wicket-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to