This is kind of a thread hijack, Vincent. Indeed, there's a mess in the JS as well, as in the whole skin (the view part of XWiki). Two years ago there was no framework used, while last year we found prototype, scriptaculous, rico and our own AJAX wrapper + DHTML functions. And now we're going to add JQuery and Dojo, too. Here's my view on the matter: - Scriptaculous isn't used. We should seek if there are any references to it, and remove it. - Our own implementation should be pruned, meaning that we need to identify which functions are needed and are not provided by another framework, rewritten using a framework, and the stuff we don't need should be removed. - Rico is used mainly because when Marta added some skin dynamic features, it was already there, and she didn't feel like adding another fwk or writing her own implementation. If we decide to replace it with another fwk, then the only problem is that skins based on the current finch or albatross won't be easily upgradeable. - Prototype is used by Rico. I don't think we're using it very much, so it can be removed. - JQuery looks like a smaller alternative for simple skin needs. Either we keep Rico, or we switch to JQuery, it's just a matter of choice. - Dojo should be used for things that require complex interaction; it isn't needed for small things like the accordions or collapseable panels. But for a collaborative graphical editor, it's better to use it than make our own methods. So Dojo has its uses, and JQuery/Rico/Prototype has other uses. However, it includes the basic functionalities as a subset, and even some useful widgets. So the only reason why we should not switch completely to Dojo is that it takes longer to download and it requires more startup time. In conclusion, we can add Dojo for the advanced editor, and keep only one of Rico/JQuery/Prototype for simple skin needs. Sergiu On 5/22/07, Vincent Massol <[email protected]> wrote:
Sorry I haven't checked your proposal yet. However the mention of "Dojo" made me think. We're currently using Prototype in XWiki and I was tempted to add JQuery as there is a plugin I'm interested in using. Now you mention Dojo. That's starting to make a lot of framework in the same space :-)
So my question to all of us: - do we mind? - is it ok to include several dhtml/ajax fwk? Isn't it going to weight too much? Can we selectively decide to include only some fwk (somehow)? - will we be having compatibility issues? (fwiw I've checked and it seems jquery can be used with prototype if we're careful enough (http://docs.jquery.com/Using_jQuery_with_Other_Libraries)
I personally haven't used these fwks so I don't have any recommendation at all. Funnily I've just come across this article this morning (http://www.mrbool.com/articles/viewcomp.asp?comp=5311) but it didn't really help...
WDYT?
Thanks -Vincent