Thank you for your answers. I undrestand better why Struts2 use dojo. I think It's very important to explain in the Struts2 documentation the dojo choice (portlet environment,...), because a lot of people use prototype/scriptaculous (like AjaxTags).
I forwarded your mail into Rails forums, to see if there is a solution to use prototype into environnment portlet. If I have not a solution I will try new version of dojo to see how it works. But it seems that Scriptaculous effect is better than dojo like drag/drop. In my open source project, I use a great treeview tafeltree based on Srciptaculous) see demo at : http://jscontrolstags.sourceforge.net/controls/treeview/treeview.html There is a lot of functionnality, like open with AJAX, drag/drop, copy tree node, edit node,... I must study dojo before. Thank you again 2006/11/5, Musachy Barroso <[EMAIL PROTECTED]>:
I had never used Dojo before I started playing with struts. The thing I didn't liked was the lack of documentation, but with 0.4 they improved it a lot (http://dojotoolkit.org/api/?). Another thing is that everything seems to change really fast, but it is shaping out, and the namespaces are a welcomed addition. When my patch gets through I will start working on the documentation of the widgets that are already implemented, and start working on the autocomplete widget. So Angelo, if you decide to take Dojo for a spin, there are plenty of things to do over here :) musachy On 11/4/06, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > > On Sat, November 4, 2006 5:29 pm, Martin Cooper wrote: > > It's not a question of which one has the most widgets. Prototype, and > > hence > > script.aculo.us, is fragile, especially in a portlet environment, so we > > cannot, in good conscience, encourage people to use that to build robust > > enterprise-ready applications. Since Struts supports portlet > development, > > we > > don't want to have to say "oh, but you shouldn't use our AJAX tags if > > you're > > building portlets". > > Many people are rather fond of Prototype, so I think it might be a good > thing to explain why Martin calls it "fragile", for those that might not > be aware... > > Prototype modifies some intrinsic Javascript objects. Arrays for example > have some additional methods, among other things. Some of this can > conceivably (and in practice sometimes) break other code that depends on > those intrinsic objects working a certain way. Especially in a portlet > environment, where you aren't in complete control of the full page, this > can lead to some very unexpected consequences... it would really suck to > create a portlet that your company gives to its clients that you've tested > every which way you can and found it to work, then find it breaks in your > clients' portals because they have some portlet you don't and which > doesn't play nice with these changes Prototype makes. > > Another problem with Prototype is that it isn't properly (or at least > fully) namespaced... for example, Prototype defines a Field and Form > object in global scope (well, it DID... I haven't looked to see if recent > versions may have corrected this). Especially these two examples, which > are clearly pretty common names that other developers may choose as well, > can easily lead to conflicts. Again, in a portal environment, where you > aren't developing a complete page and therefore can't be sure what might > be present on the page at any given time, you can run into some big > problems because of this. > > I don't think anyone is saying Prototype is inherently bad... if you are > writing a typical webapp where you are in control of the entire page, you > can quite easily work around these issues, or never run into them in the > first place, and be perfectly happy with Prototype, and to be sure, many > people are (as well as scriptaculous, and others that use Prototype). In > a portal environment though, the rules of the game are quite different, > and Prototype can lead to issues because of these two points. > > > I'm not sure why you say you can't write valid XHTML with Dojo; you can. > > There are three ways of adding Dojo widgets to your apps. Yes, not all > of > > them will give you XHTML that will validate, but at least one of them > > does. > > I think Angelo is clearly referring to the markup approach to widget > creation... correct me if I'm wrong Martin, but isn't it in fact true that > with that approach you cannot write valid XHTML because of widgetId, > dojoType, etc? Of course your right, that's not the only way to use > widgets... but you mentioned three ways... out of curiosity, what's the > third, aside from markup and programmatic creation? > > > And as for effects, they're getting better all the time. Have you tried > > 0.4yet? > > Indeed... with Dojo, it's important to realize that it's still relatively > early in its lifecycle... with each new versions comes pretty big > improvements... I looked at it for the first time roughly a year or so > ago, and it looked interesting, but very immature (I in fact wrote a > warning because of this in my AJAX book)... note that this isn't just a > quality of code concern, or a functionality concern, it also includes > documentation, support, examples, etc... looking at it now though, you can > see a really vast improvement compared to where it was just a short time > ago... there's still things to not be thrilled with, but most people tend > to agree that the pluses outweigh the minuses by a good margin at this > point. > > > Martin Cooper > > Frank > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "Hey you! Would you help me to carry the stone?" Pink Floyd