i don't know ajax super-well yet, but i think our approach in integrating ajax into wicket is going to be taking the same approach as we've taken with every other technology used in wicket: find the minimum building blocks to put into the core and then let everyone build whatever they want on top of that. you've identified a couple of important building blocks from the programmer's perspective:
- requests to re-render components causing client-side dom updates - requests to components for arbitrary, dom-updating javascript
however, i don't necessarily think even most of this is really wicket's business. there's this "ajax engine" that lives on the client and talks to the server. that's more of a technique than a specific technology right now and i imagine there will be a /lot/ of ajax engines out there and very little standardization. this is the web, after all! so i think to support "ajax" and implement something like client-side dom updates, wicket needs to delegate all of the ajax / JS work to people that are working on ajax engines by providing them the right integration hooks. wicket needs to provide a hook, for example, that will re-render a component. that would be core to wicket's support of ajax in general. it also needs to provide componentized JS support because JS is core to ajax (although JS is also core to other things, so our JS integration needs to be pretty generic). on the other hand, how an ajax engine interacts with the DOM on the client side and how requests from an ajax engine are processed on the server side is really pretty far outside the scope of wicket.
so long as a given ajax engine can implement a server-side stub that adds ajax special sauce to wicket components easily, i think we're in the right ballpark. although ajax is exciting, we want to be very careful not to overreach in terms of wicket's scope. as i say in the wicket vision statement, wicket is about "enabling component-oriented, programmatic manipulation of markup". wicket is not an all-encompassing presentation layer technology. and i think it's probably not an ajax engine. i want wicket to stay focused and not drift off course to slowly become something else. losing focus is a great way to fail.
so i think wicket ought to let you work with any 3rd party ajax engine and not tie you to one in particular. i think it's okay if there's a little glue that has to be written for each ajax engine that works with wicket, so long as wicket itself doesn't need to be modified to do it. from the sound of it, this synchronization manager you're talking about is really part of an ajax engine and therefore should not be part of wicket. we provide nice component objects in wicket that work with markup. decorating those with JS synchronized ajax is the business of an ajax project, not wicket.
all this said, i think we can provide all the necessary hooks to create advanced ajax engines, including engines that have features like the echo2 synchronization manager. and probably a lot of things we haven't thought of yet. as someone at sun used to say "innovation happens elsewhere". we need to take that to heart in wicket and let ajax innovation occur elsewhere and leverage it via integration.
if you think i'm wrong about this, please argue with me/us. at wicket, we're always open to discussion!
jon
Cameron Braid wrote:
I'd be keen to find out more about the AJAX expreiments. I've been looking at the echo2 source code - they can dynamically update any component using JavaScript + XmlHTTP. One way is by fetching the latest HTML for the component from the server and replacing it into the current DOM. However they have implemented a Syncronization manager that allows the components to sync them selves however they see fit - i.e. you could render the component's state to a javascript literal then build the new html on the client etc..
I would like to know the direction that wicket is likely to take to support this style of integration.
Cameron.
-----Original Message----- From: [EMAIL PROTECTED] [mailto:wicket-develop- [EMAIL PROTECTED] On Behalf Of Eelco Hillenius Sent: Monday, 4 April 2005 6:21 PM Cc: [email protected] Subject: Re: [Wicket-develop] CSS resource files?
See the wiki: http://wicket.sourceforge.net/wiki/doku.php?id=user:include_css_references _for_components for one way to do this.
And if you *really* need to include dynamic CSS, take a look at how the guys from DWR (http://eireneh.thorubio.org/dwr/) do it. Basically, the include *.js files in their generated pages, but then at the server side, they interpred the js request, and generated the contents on the fly. You could do the same with Wicket, by using resources. In fact, I think Johan is playing with this right now for his - private - AJAX experiments.
Eelco
Gili wrote:
-------------------------------------------------------I tried using class Label to construct the CSS statement dynamically, but Label escapes HTML reserved characters so that method does not work...
Eelco, how are you handling this problem...?
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
------------------------------------------------------- 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
------------------------------------------------------- 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
