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]