Hi, I''m using prototype/Scriptaculous in my open source project JSControlsTags http://jscontrolstags.sourceforge.net/ I''m Struts user and in the new version Struts2, the framework integrate AJAX with dojo and not with Prototype/Scriptaculous. I asked in the Struts forum, why Struts2 integrate by default dojo and not scriptaculous. Here Struts answer : ------------------------ 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 don''t know what I must answer to Struts forum to use scriptaculous. I find that sriptaculous have a lot of effects (drag/drop) and widget (like tafeltree) more pleasant than dojo. But if there is not solutions with portlet environnment, I should use dojo, and I find it''s shame. Thank you for your answer. Regards Angelo --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Martin Bialasinski
2006-Nov-05 09:54 UTC
Re: Why Struts2 use dojo instead of Scriptaculous?
On 11/5/06, Angelo zerr <angelo.zerr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > 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.This is very true.> I don''t know what I must answer to Struts forum to use scriptaculous.They have compelling reason to use Dojo, and given their environment, it is a good decision, IMHO. Prototype is not made for this kind of usage. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Thank you Martin for your answer. I find Prototype very good, but it''s really shame that it cannot be used into portlet environnment. I will study dojo to see, if it''s easy for me to migrate my JSControlsTags widget Scriptaculous into dojo. Thank again. regards Angelo 2006/11/5, Martin Bialasinski <klingeling-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> > > On 11/5/06, Angelo zerr <angelo.zerr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > 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. > > This is very true. > > > I don''t know what I must answer to Struts forum to use scriptaculous. > > They have compelling reason to use Dojo, and given their environment, > it is a good decision, IMHO. Prototype is not made for this kind of > usage. > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Jean-Philippe Encausse
2006-Nov-05 15:07 UTC
Re: Why Struts2 use dojo instead of Scriptaculous?
> 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 don''t agree with that. Yes prototype didn''t use scope for it''s objects BUT in any generic portal solution you must make choice of ONE main javascript library. Why ? because If each portlet includes it''s own libraries the portal will be a big mess with many code executing and initialising many stuff. So yes in theory that''s true and that''s a good reason. But in real life you have to pay attention to portlets in your portal if you don''t want to have a slow and messy portal. So you should not use different kind of "main" librairies. Now Prototype + Scriptaculous or Dojo thats a good question ... On 11/5/06, Angelo zerr <angelo.zerr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Thank you Martin for your answer. > I find Prototype very good, but it''s really shame that it cannot be used > into portlet environnment. > I will study dojo to see, if it''s easy for me to migrate my JSControlsTags > widget Scriptaculous into dojo. > > Thank again. > > regards Angelo > > 2006/11/5, Martin Bialasinski <klingeling-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>: > > > > On 11/5/06, Angelo zerr <angelo.zerr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > 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. > > > > This is very true. > > > > > I don''t know what I must answer to Struts forum to use scriptaculous. > > > > They have compelling reason to use Dojo, and given their environment, > > it is a good decision, IMHO. Prototype is not made for this kind of > > usage. > > > > > > > > > > >-- Jean-Philippe Encausse - R&D Jalios SA Jp [at] encausse.net - http://www.encausse.com - http://www.jalias.com GTalk: jp.encausse [at] gmail.com - SMS: sms [at] jp.encausse.net Mob: +33 6 82 12 56 99 Jalios: +33 1 39 23 92 83 Tel: +33 1 39 18 90 15 Do it Once, Use it Twice ~ Do it Twice, Make It Once --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Am 05.11.2006 um 10:19 schrieb Angelo zerr:> Especially in a portlet environment, where you aren''t in complete > control of the full page, this can lead to some very unexpected > consequences...Basically it boils down to the overall approach on developing web apps, that is a component-based approach or a custom code thing. Prototype, script.aculo.us (and Rails of course) are heavily optimized towards developer productivitiy and happyness when doing custom stuff. To sum it up, one could say, "we need less time implementing custom code with these frameworks, than other people spend on configuring their components". Of course that might not always be true, but we''re trying hard to achieve that, and I think we''re successful with this. ;) Best, Thomas --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---