Hi *, we are using prototype in Apache MyFaces as our javascript library of choice. Recently, there has been much discussion on our mailing list as to the usability of prototype in a dynamic environments where several javascript libraries are used. The critics of prototype argue that the prototype objects are not namespaced - and that prototype extends basic javascript-objects with method names that could easily be duplicated by another framework. Is there a line of defense for prototype here that I can use? I really don''t want to move everything over to dojo or some other library... regards, Martin
I indeed ran into the namespace problem... But I really don''t think you need to abandon prototype because of it... You just need to develop and apply a sound process for handling all your jScript libraries. I used prototype as my baseline library. For any other frameworks that get added to my projects I first check for any possible namespace collisions (I always check new libraries for faulty code and optimization points anyway so this is a fairly easy step, albeit tedious). If the new library has any namespace contention problems, I simply rename those functions and/or apply a new namespace (if possible). If the function is in complete conflict with prototype or another library (or is redundant), I have no problems just removing it altogether, carefully making sure nothing gets broken and fixing anything that does. This can definitely lead to small problems with maintenance and upgrades of these other libraries, but I''ve only really run into 1 instance of a namespace collision. When it comes to javascript libraries though, I really have no problems customizing them to fit my implementation needs... just some food for thought. Remember, no matter how complex and object oriented we make these libraries, they are still just scripts (not compiled optimized binaries), so they are flexible and malleable. Do what you need to do to them to make the whole thing work for you. -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Martin Marinschek Sent: Tuesday, January 03, 2006 10:51 AM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: [Rails-spinoffs] Status of Prototype Hi *, we are using prototype in Apache MyFaces as our javascript library of choice. Recently, there has been much discussion on our mailing list as to the usability of prototype in a dynamic environments where several javascript libraries are used. The critics of prototype argue that the prototype objects are not namespaced - and that prototype extends basic javascript-objects with method names that could easily be duplicated by another framework. Is there a line of defense for prototype here that I can use? I really don''t want to move everything over to dojo or some other library... regards, Martin _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs The information transmitted in this electronic mail is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers.
---------- Forwarded message ---------- From: Martin Marinschek <martin.marinschek-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Date: Jan 3, 2006 6:25 PM Subject: Re: [Rails-spinoffs] Status of Prototype To: Ryan Gahl <Ryan.Gahl-nlycWCgr5/vuufBYgWm87A@public.gmane.org> But that''s really a maintenance nightmare for you then, right? Shouldn''t the problem be easy to solve by adding some prefix to all object names and method names, and have all javascript libraries do that? Additionally, I am talking here as a committer to a web-development framework, and I really think we can''t force our users through this maintenance nightmare... Plus, our users brought up portlets as a topic as well - there is no way of ensuring this kind of compatibility in an environment like that, right? regards, Martin On 1/3/06, Ryan Gahl <Ryan.Gahl-nlycWCgr5/vuufBYgWm87A@public.gmane.org> wrote:> I indeed ran into the namespace problem... But I really don''t think you > need to abandon prototype because of it... You just need to develop and > apply a sound process for handling all your jScript libraries. I used > prototype as my baseline library. For any other frameworks that get > added to my projects I first check for any possible namespace collisions > (I always check new libraries for faulty code and optimization points > anyway so this is a fairly easy step, albeit tedious). If the new > library has any namespace contention problems, I simply rename those > functions and/or apply a new namespace (if possible). If the function is > in complete conflict with prototype or another library (or is > redundant), I have no problems just removing it altogether, carefully > making sure nothing gets broken and fixing anything that does. > > This can definitely lead to small problems with maintenance and upgrades > of these other libraries, but I''ve only really run into 1 instance of a > namespace collision. When it comes to javascript libraries though, I > really have no problems customizing them to fit my implementation > needs... just some food for thought. Remember, no matter how complex and > object oriented we make these libraries, they are still just scripts > (not compiled optimized binaries), so they are flexible and malleable. > Do what you need to do to them to make the whole thing work for you. > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of > Martin Marinschek > Sent: Tuesday, January 03, 2006 10:51 AM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: [Rails-spinoffs] Status of Prototype > > Hi *, > > we are using prototype in Apache MyFaces as our javascript library of > choice. Recently, there has been much discussion on our mailing list > as to the usability of prototype in a dynamic environments where > several javascript libraries are used. > > The critics of prototype argue that the prototype objects are not > namespaced - and that prototype extends basic javascript-objects with > method names that could easily be duplicated by another framework. > > Is there a line of defense for prototype here that I can use? I really > don''t want to move everything over to dojo or some other library... > > regards, > > Martin > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > The information transmitted in this electronic mail is intended only for the > person or entity to which it is addressed and may contain confidential, > proprietary, and/or privileged material. Any review, retransmission, > dissemination or other use of, or taking of any action in reliance upon, > this information by persons or entities other than the intended recipient > is prohibited. If you received this in error, please contact the sender and > delete the material from all computers. > >-- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
I just saw that we kind of moved off the list, so I resent our conversation to the list ;) As I see it (and I am by no means an expert, so correct me if I''m wrong) - conflicts (except some code does something really stupid) can only arise if 1) the same names are used for custom added methods of existing classes 2) the same names are used for classes 3) existing methods are overwritten with new functionality I''d say that 3) is no problem with prototype, right? So there remains 1 & 2, which could be fixed by adding a prefix to the extension method and class names, if I see it right. e.g.: protoType_ That would get rid of all maintenance problems - how would it hinder encapsulation, reusability and inheritance? Additionally, I wonder how other js-libraries (e.g. dojo) handle things - obviously, there are less problems with those libraries, I''ve been told on our mailing list. regards, Martin On 1/3/06, Ryan Gahl <Ryan.Gahl-nlycWCgr5/vuufBYgWm87A@public.gmane.org> wrote:> Well I guess if you''re going to use any library that makes any kind of > changes whatsoever to the built-in javascript objects via prototype > hacks, then you must take this level of due diligence in making sure > that one library does not conflict with another. If all your libraries > simply define their own custom objects and the only issue is that some > of those objects are named similarly, then yes, by all means affix a > namespace prefix and be done with it. However, if you choose to use > prototype.js or (as I said) any other frameworks that modify the actual > prototypes of built in javascript objects, then it is not as simple as > applying a prefix. In that case you MUST be very aware of what each > library is doing (as you should anyway), and take good care to resolve > those conflicts. Remember, what you''re doing when you choose to use > prototype.js (or a similar framework) is simulate a class-based object > oriented language by hacking the semantics of a prototype-based object > oriented language. Any way around it, we are hacking. As hackers, we > have made the decision to sacrifice some things (maintenance ease), to > gain some things (encapsulation, reusability, easier inheritance based > programming). Until a new version of javascript is released that is > fully type-safe and class-based (maybe never?), these are our options... > > -----Original Message----- > From: Martin Marinschek [mailto:martin.marinschek-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org] > Sent: Tuesday, January 03, 2006 11:25 AM > To: Ryan Gahl > Subject: Re: [Rails-spinoffs] Status of Prototype > > But that''s really a maintenance nightmare for you then, right? > > Shouldn''t the problem be easy to solve by adding some prefix to all > object names and method names, and have all javascript libraries do > that? > > Additionally, I am talking here as a committer to a web-development > framework, and I really think we can''t force our users through this > maintenance nightmare... Plus, our users brought up portlets as a > topic as well - there is no way of ensuring this kind of compatibility > in an environment like that, right? > > regards, > > Martin > > On 1/3/06, Ryan Gahl <Ryan.Gahl-nlycWCgr5/vuufBYgWm87A@public.gmane.org> wrote: > > I indeed ran into the namespace problem... But I really don''t think > you > > need to abandon prototype because of it... You just need to develop > and > > apply a sound process for handling all your jScript libraries. I used > > prototype as my baseline library. For any other frameworks that get > > added to my projects I first check for any possible namespace > collisions > > (I always check new libraries for faulty code and optimization points > > anyway so this is a fairly easy step, albeit tedious). If the new > > library has any namespace contention problems, I simply rename those > > functions and/or apply a new namespace (if possible). If the function > is > > in complete conflict with prototype or another library (or is > > redundant), I have no problems just removing it altogether, carefully > > making sure nothing gets broken and fixing anything that does. > > > > This can definitely lead to small problems with maintenance and > upgrades > > of these other libraries, but I''ve only really run into 1 instance of > a > > namespace collision. When it comes to javascript libraries though, I > > really have no problems customizing them to fit my implementation > > needs... just some food for thought. Remember, no matter how complex > and > > object oriented we make these libraries, they are still just scripts > > (not compiled optimized binaries), so they are flexible and malleable. > > Do what you need to do to them to make the whole thing work for you. > > > > -----Original Message----- > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of > > Martin Marinschek > > Sent: Tuesday, January 03, 2006 10:51 AM > > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > Subject: [Rails-spinoffs] Status of Prototype > > > > Hi *, > > > > we are using prototype in Apache MyFaces as our javascript library of > > choice. Recently, there has been much discussion on our mailing list > > as to the usability of prototype in a dynamic environments where > > several javascript libraries are used. > > > > The critics of prototype argue that the prototype objects are not > > namespaced - and that prototype extends basic javascript-objects with > > method names that could easily be duplicated by another framework. > > > > Is there a line of defense for prototype here that I can use? I really > > don''t want to move everything over to dojo or some other library... > > > > regards, > > > > Martin > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > The information transmitted in this electronic mail is intended only > for the > > person or entity to which it is addressed and may contain > confidential, > > proprietary, and/or privileged material. Any review, retransmission, > > dissemination or other use of, or taking of any action in reliance > upon, > > this information by persons or entities other than the intended > recipient > > is prohibited. If you received this in error, please contact the > sender and > > delete the material from all computers. > > > > > > > -- > > http://www.irian.at > > Your JSF powerhouse - > JSF Consulting, Development and > Courses in English and German > > Professional Support for Apache MyFaces > >-- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Ok, I see what you''re saying now. So in the prototype.js library, the first extension (which ironically happens to be Object.extend), would in your model change from "Object.extend = ..." to "Object.protoType_extend = ..." or something like that, right? I think that is a fine solution to your dilemma. You are, however, still changing a 3rd party library and thusly upgrading to future versions will require re-changing these definitions. I think others have used that idea with success though. But that goes back to my first comment, in that you are developing a process to manage your libraries. Mine is slightly different, but the point is that some level of manual upkeep is almost always going to be required in this new age of web development until such a day as a good type-safe (and possibly compiled) javascript VM is supplied to us by the powers that be. -----Original Message----- From: Martin Marinschek [mailto:martin.marinschek-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org] Sent: Tuesday, January 03, 2006 12:35 PM To: Ryan Gahl Cc: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails-spinoffs] Status of Prototype I just saw that we kind of moved off the list, so I resent our conversation to the list ;) As I see it (and I am by no means an expert, so correct me if I''m wrong) - conflicts (except some code does something really stupid) can only arise if 1) the same names are used for custom added methods of existing classes 2) the same names are used for classes 3) existing methods are overwritten with new functionality I''d say that 3) is no problem with prototype, right? So there remains 1 & 2, which could be fixed by adding a prefix to the extension method and class names, if I see it right. e.g.: protoType_ That would get rid of all maintenance problems - how would it hinder encapsulation, reusability and inheritance? Additionally, I wonder how other js-libraries (e.g. dojo) handle things - obviously, there are less problems with those libraries, I''ve been told on our mailing list. regards, Martin On 1/3/06, Ryan Gahl <Ryan.Gahl-nlycWCgr5/vuufBYgWm87A@public.gmane.org> wrote:> Well I guess if you''re going to use any library that makes any kind of > changes whatsoever to the built-in javascript objects via prototype > hacks, then you must take this level of due diligence in making sure > that one library does not conflict with another. If all your libraries > simply define their own custom objects and the only issue is that some > of those objects are named similarly, then yes, by all means affix a > namespace prefix and be done with it. However, if you choose to use > prototype.js or (as I said) any other frameworks that modify theactual> prototypes of built in javascript objects, then it is not as simple as > applying a prefix. In that case you MUST be very aware of what each > library is doing (as you should anyway), and take good care to resolve > those conflicts. Remember, what you''re doing when you choose to use > prototype.js (or a similar framework) is simulate a class-based object > oriented language by hacking the semantics of a prototype-based object > oriented language. Any way around it, we are hacking. As hackers, we > have made the decision to sacrifice some things (maintenance ease), to > gain some things (encapsulation, reusability, easier inheritance based > programming). Until a new version of javascript is released that is > fully type-safe and class-based (maybe never?), these are ouroptions...> > -----Original Message----- > From: Martin Marinschek [mailto:martin.marinschek-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org] > Sent: Tuesday, January 03, 2006 11:25 AM > To: Ryan Gahl > Subject: Re: [Rails-spinoffs] Status of Prototype > > But that''s really a maintenance nightmare for you then, right? > > Shouldn''t the problem be easy to solve by adding some prefix to all > object names and method names, and have all javascript libraries do > that? > > Additionally, I am talking here as a committer to a web-development > framework, and I really think we can''t force our users through this > maintenance nightmare... Plus, our users brought up portlets as a > topic as well - there is no way of ensuring this kind of compatibility > in an environment like that, right? > > regards, > > Martin > > On 1/3/06, Ryan Gahl <Ryan.Gahl-nlycWCgr5/vuufBYgWm87A@public.gmane.org> wrote: > > I indeed ran into the namespace problem... But I really don''t think > you > > need to abandon prototype because of it... You just need to develop > and > > apply a sound process for handling all your jScript libraries. Iused> > prototype as my baseline library. For any other frameworks that get > > added to my projects I first check for any possible namespace > collisions > > (I always check new libraries for faulty code and optimizationpoints> > anyway so this is a fairly easy step, albeit tedious). If the new > > library has any namespace contention problems, I simply rename those > > functions and/or apply a new namespace (if possible). If thefunction> is > > in complete conflict with prototype or another library (or is > > redundant), I have no problems just removing it altogether,carefully> > making sure nothing gets broken and fixing anything that does. > > > > This can definitely lead to small problems with maintenance and > upgrades > > of these other libraries, but I''ve only really run into 1 instanceof> a > > namespace collision. When it comes to javascript libraries though, I > > really have no problems customizing them to fit my implementation > > needs... just some food for thought. Remember, no matter how complex > and > > object oriented we make these libraries, they are still just scripts > > (not compiled optimized binaries), so they are flexible andmalleable.> > Do what you need to do to them to make the whole thing work for you. > > > > -----Original Message----- > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of > > Martin Marinschek > > Sent: Tuesday, January 03, 2006 10:51 AM > > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > Subject: [Rails-spinoffs] Status of Prototype > > > > Hi *, > > > > we are using prototype in Apache MyFaces as our javascript libraryof> > choice. Recently, there has been much discussion on our mailing list > > as to the usability of prototype in a dynamic environments where > > several javascript libraries are used. > > > > The critics of prototype argue that the prototype objects are not > > namespaced - and that prototype extends basic javascript-objectswith> > method names that could easily be duplicated by another framework. > > > > Is there a line of defense for prototype here that I can use? Ireally> > don''t want to move everything over to dojo or some other library... > > > > regards, > > > > Martin > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > The information transmitted in this electronic mail is intended only > for the > > person or entity to which it is addressed and may contain > confidential, > > proprietary, and/or privileged material. Any review,retransmission,> > dissemination or other use of, or taking of any action in reliance > upon, > > this information by persons or entities other than the intended > recipient > > is prohibited. If you received this in error, please contact the > sender and > > delete the material from all computers. > > > > > > > -- > > http://www.irian.at > > Your JSF powerhouse - > JSF Consulting, Development and > Courses in English and German > > Professional Support for Apache MyFaces > >-- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Furthermore, to drive my point home, if I didn''t use prototype.js in my projects, my maintenance issues would REALLY be a nightmare. So actually, when I stated earlier that we are sacrificing ease of maintenance for encapsulation (etc..), I wasn''t entirely correct. Honestly, I believe we''ve gained a lot in the area of ease of maintenance if you look at all the derived code. A little bit of up-front effort is required to keep all the frameworks jiving with each other, but the benefits, IMHO, far outweigh that aspect. -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Ryan Gahl Sent: Tuesday, January 03, 2006 1:13 PM To: mmarinschek-1oDqGaOF3Lkdnm+yROfE0A@public.gmane.org Cc: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: RE: [Rails-spinoffs] Status of Prototype Ok, I see what you''re saying now. So in the prototype.js library, the first extension (which ironically happens to be Object.extend), would in your model change from "Object.extend = ..." to "Object.protoType_extend = ..." or something like that, right? I think that is a fine solution to your dilemma. You are, however, still changing a 3rd party library and thusly upgrading to future versions will require re-changing these definitions. I think others have used that idea with success though. But that goes back to my first comment, in that you are developing a process to manage your libraries. Mine is slightly different, but the point is that some level of manual upkeep is almost always going to be required in this new age of web development until such a day as a good type-safe (and possibly compiled) javascript VM is supplied to us by the powers that be. -----Original Message----- From: Martin Marinschek [mailto:martin.marinschek-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org] Sent: Tuesday, January 03, 2006 12:35 PM To: Ryan Gahl Cc: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails-spinoffs] Status of Prototype I just saw that we kind of moved off the list, so I resent our conversation to the list ;) As I see it (and I am by no means an expert, so correct me if I''m wrong) - conflicts (except some code does something really stupid) can only arise if 1) the same names are used for custom added methods of existing classes 2) the same names are used for classes 3) existing methods are overwritten with new functionality I''d say that 3) is no problem with prototype, right? So there remains 1 & 2, which could be fixed by adding a prefix to the extension method and class names, if I see it right. e.g.: protoType_ That would get rid of all maintenance problems - how would it hinder encapsulation, reusability and inheritance? Additionally, I wonder how other js-libraries (e.g. dojo) handle things - obviously, there are less problems with those libraries, I''ve been told on our mailing list. regards, Martin On 1/3/06, Ryan Gahl <Ryan.Gahl-nlycWCgr5/vuufBYgWm87A@public.gmane.org> wrote:> Well I guess if you''re going to use any library that makes any kind of > changes whatsoever to the built-in javascript objects via prototype > hacks, then you must take this level of due diligence in making sure > that one library does not conflict with another. If all your libraries > simply define their own custom objects and the only issue is that some > of those objects are named similarly, then yes, by all means affix a > namespace prefix and be done with it. However, if you choose to use > prototype.js or (as I said) any other frameworks that modify theactual> prototypes of built in javascript objects, then it is not as simple as > applying a prefix. In that case you MUST be very aware of what each > library is doing (as you should anyway), and take good care to resolve > those conflicts. Remember, what you''re doing when you choose to use > prototype.js (or a similar framework) is simulate a class-based object > oriented language by hacking the semantics of a prototype-based object > oriented language. Any way around it, we are hacking. As hackers, we > have made the decision to sacrifice some things (maintenance ease), to > gain some things (encapsulation, reusability, easier inheritance based > programming). Until a new version of javascript is released that is > fully type-safe and class-based (maybe never?), these are ouroptions...> > -----Original Message----- > From: Martin Marinschek [mailto:martin.marinschek-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org] > Sent: Tuesday, January 03, 2006 11:25 AM > To: Ryan Gahl > Subject: Re: [Rails-spinoffs] Status of Prototype > > But that''s really a maintenance nightmare for you then, right? > > Shouldn''t the problem be easy to solve by adding some prefix to all > object names and method names, and have all javascript libraries do > that? > > Additionally, I am talking here as a committer to a web-development > framework, and I really think we can''t force our users through this > maintenance nightmare... Plus, our users brought up portlets as a > topic as well - there is no way of ensuring this kind of compatibility > in an environment like that, right? > > regards, > > Martin > > On 1/3/06, Ryan Gahl <Ryan.Gahl-nlycWCgr5/vuufBYgWm87A@public.gmane.org> wrote: > > I indeed ran into the namespace problem... But I really don''t think > you > > need to abandon prototype because of it... You just need to develop > and > > apply a sound process for handling all your jScript libraries. Iused> > prototype as my baseline library. For any other frameworks that get > > added to my projects I first check for any possible namespace > collisions > > (I always check new libraries for faulty code and optimizationpoints> > anyway so this is a fairly easy step, albeit tedious). If the new > > library has any namespace contention problems, I simply rename those > > functions and/or apply a new namespace (if possible). If thefunction> is > > in complete conflict with prototype or another library (or is > > redundant), I have no problems just removing it altogether,carefully> > making sure nothing gets broken and fixing anything that does. > > > > This can definitely lead to small problems with maintenance and > upgrades > > of these other libraries, but I''ve only really run into 1 instanceof> a > > namespace collision. When it comes to javascript libraries though, I > > really have no problems customizing them to fit my implementation > > needs... just some food for thought. Remember, no matter how complex > and > > object oriented we make these libraries, they are still just scripts > > (not compiled optimized binaries), so they are flexible andmalleable.> > Do what you need to do to them to make the whole thing work for you. > > > > -----Original Message----- > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of > > Martin Marinschek > > Sent: Tuesday, January 03, 2006 10:51 AM > > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > Subject: [Rails-spinoffs] Status of Prototype > > > > Hi *, > > > > we are using prototype in Apache MyFaces as our javascript libraryof> > choice. Recently, there has been much discussion on our mailing list > > as to the usability of prototype in a dynamic environments where > > several javascript libraries are used. > > > > The critics of prototype argue that the prototype objects are not > > namespaced - and that prototype extends basic javascript-objectswith> > method names that could easily be duplicated by another framework. > > > > Is there a line of defense for prototype here that I can use? Ireally> > don''t want to move everything over to dojo or some other library... > > > > regards, > > > > Martin > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > The information transmitted in this electronic mail is intended only > for the > > person or entity to which it is addressed and may contain > confidential, > > proprietary, and/or privileged material. Any review,retransmission,> > dissemination or other use of, or taking of any action in reliance > upon, > > this information by persons or entities other than the intended > recipient > > is prohibited. If you received this in error, please contact the > sender and > > delete the material from all computers. > > > > > > > -- > > http://www.irian.at > > Your JSF powerhouse - > JSF Consulting, Development and > Courses in English and German > > Professional Support for Apache MyFaces > >-- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Ryan Gahl wrote:> but the point is that some level of manual upkeep is > almost always going to be required in this new age of web development > until such a day as a good type-safe (and possibly compiled) javascript > VM is supplied to us by the powers that be.You don''t need type safety or compilation to achieve what the OP is after. You just need real namespaces. -- Michael Peters Developer Plus Three, LP
Well, yes you are correct. I guess I was just alluding to the possible day in the future when a version of javascript comes that supports what we are trying to do without requiring the hacks. -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Michael Peters Sent: Tuesday, January 03, 2006 1:25 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Cc: mmarinschek-1oDqGaOF3Lkdnm+yROfE0A@public.gmane.org Subject: Re: [Rails-spinoffs] Status of Prototype Ryan Gahl wrote:> but the point is that some level of manual upkeep is > almost always going to be required in this new age of web development > until such a day as a good type-safe (and possibly compiled)javascript> VM is supplied to us by the powers that be.You don''t need type safety or compilation to achieve what the OP is after. You just need real namespaces. -- Michael Peters Developer Plus Three, LP _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs The information transmitted in this electronic mail is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers.
Ok, if you guys agree, then I would really think that we should try to get this into prototype. Why should each and every user necessarily do this if it could fixed by the framework itself? regards, Martin On 1/3/06, Michael Peters <mpeters-aUYv5hkjw45l57MIdRCFDg@public.gmane.org> wrote:> > > Ryan Gahl wrote: > > but the point is that some level of manual upkeep is > > almost always going to be required in this new age of web development > > until such a day as a good type-safe (and possibly compiled) javascript > > VM is supplied to us by the powers that be. > > You don''t need type safety or compilation to achieve what the OP is after. You > just need real namespaces. > > -- > Michael Peters > Developer > Plus Three, LP > >-- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Oh, well I don''t necessarily agree with that. You see, your proposed solution may work well for your implementation, but I prefer to use the shorter syntaxes rather than having to qualify everything all the time. Your solution is still, when it comes down to it, just another imperfect workaround (like mine). It''s still not a true namespace as Michael Peters stated. When the page loads, everything is at the same level. All you''re really doing is a different version of what I''m doing; renaming functions that are in conflict. You''re just taking a broader approach whereas I''m going to the granular function level... -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Martin Marinschek Sent: Tuesday, January 03, 2006 1:37 PM To: Michael Peters Cc: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails-spinoffs] Status of Prototype Ok, if you guys agree, then I would really think that we should try to get this into prototype. Why should each and every user necessarily do this if it could fixed by the framework itself? regards, Martin On 1/3/06, Michael Peters <mpeters-aUYv5hkjw45l57MIdRCFDg@public.gmane.org> wrote:> > > Ryan Gahl wrote: > > but the point is that some level of manual upkeep is > > almost always going to be required in this new age of webdevelopment> > until such a day as a good type-safe (and possibly compiled)javascript> > VM is supplied to us by the powers that be. > > You don''t need type safety or compilation to achieve what the OP isafter. You> just need real namespaces. > > -- > Michael Peters > Developer > Plus Three, LP > >-- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs The information transmitted in this electronic mail is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers.
Martin Marinschek wrote:> Ok, > > if you guys agree, then I would really think that we should try to get > this into prototype. Why should each and every user necessarily do > this if it could fixed by the framework itself?I wasn''t saying that the frameword should do it. I was just complaining about the lack of namespaces in Javascript. I think that adding a ''protoType_'' extension to every method call and class name would be tedious and ugly (and would give me PHP nightmares). Maybe something like Ajile? http://en.wikipedia.org/wiki/AJILE -- Michael Peters Developer Plus Three, LP
Brilliant, I never heard of that before, thanks Michael. I''m definitely going to take a look at AJILE :) -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Michael Peters Sent: Tuesday, January 03, 2006 1:48 PM To: mmarinschek-1oDqGaOF3Lkdnm+yROfE0A@public.gmane.org Cc: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails-spinoffs] Status of Prototype Martin Marinschek wrote:> Ok, > > if you guys agree, then I would really think that we should try to get > this into prototype. Why should each and every user necessarily do > this if it could fixed by the framework itself?I wasn''t saying that the frameword should do it. I was just complaining about the lack of namespaces in Javascript. I think that adding a ''protoType_'' extension to every method call and class name would be tedious and ugly (and would give me PHP nightmares). Maybe something like Ajile? http://en.wikipedia.org/wiki/AJILE -- Michael Peters Developer Plus Three, LP _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs The information transmitted in this electronic mail is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers.
Went to the official Ajile website, downloaded the thing and took a look. All I can say is, meh. It''s not entirely useful, really. First of all the darn thing is written all on a single line (no carriage returns), which I''m assuming was some attempt at saving a few bytes (quite annoying). Secondly, it doesn''t really do anything helpful (maybe it has some good points). In an attempt at simulating namespaces, the author has had to fill an array with every system type he could find (maybe all of them, maybe he missed a few), which gets checked any time you try to create or import a namespace, so you don''t collide with any system defined objects (who knows how many browser-specific proprietary ones were missed). And then all it''s really doing in the end is creating shell objects to act like a dot-naming convention for your actual objects. So it''s a really long way around the problem that basically is (once again) simply renaming functions, only in this case is actually adding overhead by having to create shell objects (memory usage) and iterate through the massive array of system types. And it in no way addresses our REAL problem (as prototype.js users), of the built in javascript object prototypes being changed. So, Martin, once again I have to say if you are using any framework the messes with prototypes, you just have to suck it up and watch out for collisions. -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Ryan Gahl Sent: Tuesday, January 03, 2006 1:51 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: RE: [Rails-spinoffs] Status of Prototype Brilliant, I never heard of that before, thanks Michael. I''m definitely going to take a look at AJILE :) -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Michael Peters Sent: Tuesday, January 03, 2006 1:48 PM To: mmarinschek-1oDqGaOF3Lkdnm+yROfE0A@public.gmane.org Cc: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails-spinoffs] Status of Prototype Martin Marinschek wrote:> Ok, > > if you guys agree, then I would really think that we should try to get > this into prototype. Why should each and every user necessarily do > this if it could fixed by the framework itself?I wasn''t saying that the frameword should do it. I was just complaining about the lack of namespaces in Javascript. I think that adding a ''protoType_'' extension to every method call and class name would be tedious and ugly (and would give me PHP nightmares). Maybe something like Ajile? http://en.wikipedia.org/wiki/AJILE -- Michael Peters Developer Plus Three, LP _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs The information transmitted in this electronic mail is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Ok - then I can''t use prototype. It''s out of my possibilities to check with every framework, as I don''t have access to all possible javascript-frameworks a MyFaces user could combine with his MyFaces-webapps. In this case, I''ll have to drop prototype and replace everything with dojo. Sigh! lots of work to do ;) However, I still think that something that makes it a little less convenient (prefixes are just a few keyboard-hits more) but a lot more stable to use prototype would be well worth being implemented! regards, Martin On 1/3/06, Ryan Gahl <Ryan.Gahl-nlycWCgr5/vuufBYgWm87A@public.gmane.org> wrote:> Went to the official Ajile website, downloaded the thing and took a > look. All I can say is, meh. It''s not entirely useful, really. First of > all the darn thing is written all on a single line (no carriage > returns), which I''m assuming was some attempt at saving a few bytes > (quite annoying). Secondly, it doesn''t really do anything helpful (maybe > it has some good points). In an attempt at simulating namespaces, the > author has had to fill an array with every system type he could find > (maybe all of them, maybe he missed a few), which gets checked any time > you try to create or import a namespace, so you don''t collide with any > system defined objects (who knows how many browser-specific proprietary > ones were missed). And then all it''s really doing in the end is creating > shell objects to act like a dot-naming convention for your actual > objects. So it''s a really long way around the problem that basically is > (once again) simply renaming functions, only in this case is actually > adding overhead by having to create shell objects (memory usage) and > iterate through the massive array of system types. And it in no way > addresses our REAL problem (as prototype.js users), of the built in > javascript object prototypes being changed. > > So, Martin, once again I have to say if you are using any framework the > messes with prototypes, you just have to suck it up and watch out for > collisions. > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Ryan > Gahl > Sent: Tuesday, January 03, 2006 1:51 PM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: RE: [Rails-spinoffs] Status of Prototype > > Brilliant, I never heard of that before, thanks Michael. I''m definitely > going to take a look at AJILE :) > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of > Michael Peters > Sent: Tuesday, January 03, 2006 1:48 PM > To: mmarinschek-1oDqGaOF3Lkdnm+yROfE0A@public.gmane.org > Cc: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Re: [Rails-spinoffs] Status of Prototype > > > > Martin Marinschek wrote: > > Ok, > > > > if you guys agree, then I would really think that we should try to get > > this into prototype. Why should each and every user necessarily do > > this if it could fixed by the framework itself? > > I wasn''t saying that the frameword should do it. I was just complaining > about > the lack of namespaces in Javascript. I think that adding a ''protoType_'' > extension to every method call and class name would be tedious and ugly > (and > would give me PHP nightmares). > > Maybe something like Ajile? http://en.wikipedia.org/wiki/AJILE > > -- > Michael Peters > Developer > Plus Three, LP > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > The information transmitted in this electronic mail is intended only for > the > person or entity to which it is addressed and may contain confidential, > proprietary, and/or privileged material. Any review, retransmission, > dissemination or other use of, or taking of any action in reliance upon, > this information by persons or entities other than the intended > recipient > is prohibited. If you received this in error, please contact the sender > and > delete the material from all computers. > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >-- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Still not understanding why you don''t just apply your ideas to your implementation of prototype.js? Just because it''s not in any kind of official release doesn''t mean you can''t add prefixes to your copy. And the prototype library is small enough that if you ever need to upgrade it, it''s not going to take you that long to re-apply the prefixes. I''m afraid you''re looking for the perfect solution, which I''m afraid does not exist. I''ll bet in the long run it''s a better choice to stick with prototype.js and use your prefix idea rather than spend all the time to convert to dojo which may not even solve your problem... But I don''t know your project like you do I guess. -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Martin Marinschek Sent: Tuesday, January 03, 2006 2:41 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails-spinoffs] Status of Prototype Ok - then I can''t use prototype. It''s out of my possibilities to check with every framework, as I don''t have access to all possible javascript-frameworks a MyFaces user could combine with his MyFaces-webapps. In this case, I''ll have to drop prototype and replace everything with dojo. Sigh! lots of work to do ;) However, I still think that something that makes it a little less convenient (prefixes are just a few keyboard-hits more) but a lot more stable to use prototype would be well worth being implemented! regards, Martin On 1/3/06, Ryan Gahl <Ryan.Gahl-nlycWCgr5/vuufBYgWm87A@public.gmane.org> wrote:> Went to the official Ajile website, downloaded the thing and took a > look. All I can say is, meh. It''s not entirely useful, really. Firstof> all the darn thing is written all on a single line (no carriage > returns), which I''m assuming was some attempt at saving a few bytes > (quite annoying). Secondly, it doesn''t really do anything helpful(maybe> it has some good points). In an attempt at simulating namespaces, the > author has had to fill an array with every system type he could find > (maybe all of them, maybe he missed a few), which gets checked anytime> you try to create or import a namespace, so you don''t collide with any > system defined objects (who knows how many browser-specificproprietary> ones were missed). And then all it''s really doing in the end iscreating> shell objects to act like a dot-naming convention for your actual > objects. So it''s a really long way around the problem that basicallyis> (once again) simply renaming functions, only in this case is actually > adding overhead by having to create shell objects (memory usage) and > iterate through the massive array of system types. And it in no way > addresses our REAL problem (as prototype.js users), of the built in > javascript object prototypes being changed. > > So, Martin, once again I have to say if you are using any frameworkthe> messes with prototypes, you just have to suck it up and watch out for > collisions. > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf OfRyan> Gahl > Sent: Tuesday, January 03, 2006 1:51 PM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: RE: [Rails-spinoffs] Status of Prototype > > Brilliant, I never heard of that before, thanks Michael. I''mdefinitely> going to take a look at AJILE :) > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of > Michael Peters > Sent: Tuesday, January 03, 2006 1:48 PM > To: mmarinschek-1oDqGaOF3Lkdnm+yROfE0A@public.gmane.org > Cc: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Re: [Rails-spinoffs] Status of Prototype > > > > Martin Marinschek wrote: > > Ok, > > > > if you guys agree, then I would really think that we should try toget> > this into prototype. Why should each and every user necessarily do > > this if it could fixed by the framework itself? > > I wasn''t saying that the frameword should do it. I was justcomplaining> about > the lack of namespaces in Javascript. I think that adding a''protoType_''> extension to every method call and class name would be tedious andugly> (and > would give me PHP nightmares). > > Maybe something like Ajile? http://en.wikipedia.org/wiki/AJILE > > -- > Michael Peters > Developer > Plus Three, LP > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > The information transmitted in this electronic mail is intended onlyfor> the > person or entity to which it is addressed and may containconfidential,> proprietary, and/or privileged material. Any review, retransmission, > dissemination or other use of, or taking of any action in relianceupon,> this information by persons or entities other than the intended > recipient > is prohibited. If you received this in error, please contact thesender> and > delete the material from all computers. > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >-- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Well, I am not only using prototype, but e.g. also script.aculo.us libraries. I won''t be able to go through this hassle of adding prefixes on every update of both libraries - that will just not work. If that was _one_ time, I''d do it. Not if I had to do it each and every time an upgrade happens. That would be, crazy, right? What''s the sense of reuse if I can''t drop it in and it works? What''s the sense of open source if I change it and it''s not reflected back into the original framework? regards, Martin On 1/3/06, Ryan Gahl <Ryan.Gahl-nlycWCgr5/vuufBYgWm87A@public.gmane.org> wrote:> Still not understanding why you don''t just apply your ideas to your > implementation of prototype.js? Just because it''s not in any kind of > official release doesn''t mean you can''t add prefixes to your copy. And > the prototype library is small enough that if you ever need to upgrade > it, it''s not going to take you that long to re-apply the prefixes. > > I''m afraid you''re looking for the perfect solution, which I''m afraid > does not exist. I''ll bet in the long run it''s a better choice to stick > with prototype.js and use your prefix idea rather than spend all the > time to convert to dojo which may not even solve your problem... But I > don''t know your project like you do I guess. > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of > Martin Marinschek > Sent: Tuesday, January 03, 2006 2:41 PM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Re: [Rails-spinoffs] Status of Prototype > > Ok - then I can''t use prototype. It''s out of my possibilities to check > with every framework, as I don''t have access to all possible > javascript-frameworks a MyFaces user could combine with his > MyFaces-webapps. > > In this case, I''ll have to drop prototype and replace everything with > dojo. > Sigh! lots of work to do ;) > > However, I still think that something that makes it a little less > convenient (prefixes are just a few keyboard-hits more) but a lot more > stable to use prototype would be well worth being implemented! > > regards, > > Martin > > On 1/3/06, Ryan Gahl <Ryan.Gahl-nlycWCgr5/vuufBYgWm87A@public.gmane.org> wrote: > > Went to the official Ajile website, downloaded the thing and took a > > look. All I can say is, meh. It''s not entirely useful, really. First > of > > all the darn thing is written all on a single line (no carriage > > returns), which I''m assuming was some attempt at saving a few bytes > > (quite annoying). Secondly, it doesn''t really do anything helpful > (maybe > > it has some good points). In an attempt at simulating namespaces, the > > author has had to fill an array with every system type he could find > > (maybe all of them, maybe he missed a few), which gets checked any > time > > you try to create or import a namespace, so you don''t collide with any > > system defined objects (who knows how many browser-specific > proprietary > > ones were missed). And then all it''s really doing in the end is > creating > > shell objects to act like a dot-naming convention for your actual > > objects. So it''s a really long way around the problem that basically > is > > (once again) simply renaming functions, only in this case is actually > > adding overhead by having to create shell objects (memory usage) and > > iterate through the massive array of system types. And it in no way > > addresses our REAL problem (as prototype.js users), of the built in > > javascript object prototypes being changed. > > > > So, Martin, once again I have to say if you are using any framework > the > > messes with prototypes, you just have to suck it up and watch out for > > collisions. > > > > -----Original Message----- > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of > Ryan > > Gahl > > Sent: Tuesday, January 03, 2006 1:51 PM > > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > Subject: RE: [Rails-spinoffs] Status of Prototype > > > > Brilliant, I never heard of that before, thanks Michael. I''m > definitely > > going to take a look at AJILE :) > > > > -----Original Message----- > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of > > Michael Peters > > Sent: Tuesday, January 03, 2006 1:48 PM > > To: mmarinschek-1oDqGaOF3Lkdnm+yROfE0A@public.gmane.org > > Cc: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > Subject: Re: [Rails-spinoffs] Status of Prototype > > > > > > > > Martin Marinschek wrote: > > > Ok, > > > > > > if you guys agree, then I would really think that we should try to > get > > > this into prototype. Why should each and every user necessarily do > > > this if it could fixed by the framework itself? > > > > I wasn''t saying that the frameword should do it. I was just > complaining > > about > > the lack of namespaces in Javascript. I think that adding a > ''protoType_'' > > extension to every method call and class name would be tedious and > ugly > > (and > > would give me PHP nightmares). > > > > Maybe something like Ajile? http://en.wikipedia.org/wiki/AJILE > > > > -- > > Michael Peters > > Developer > > Plus Three, LP > > > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > The information transmitted in this electronic mail is intended only > for > > the > > person or entity to which it is addressed and may contain > confidential, > > proprietary, and/or privileged material. Any review, retransmission, > > dissemination or other use of, or taking of any action in reliance > upon, > > this information by persons or entities other than the intended > > recipient > > is prohibited. If you received this in error, please contact the > sender > > and > > delete the material from all computers. > > > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > > -- > > http://www.irian.at > > Your JSF powerhouse - > JSF Consulting, Development and > Courses in English and German > > Professional Support for Apache MyFaces > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >-- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
I''ve had problems using prototype with other javascript as well. Since moving over to dojo I''ve never looked back ;) (Besides your autocompleter of course..) The collisions people are having with the prototype''d stuff really is a widespread problem, but it looks like prototype is doing just fine in spite of the competition so I''m sure it''s not an issue. On 1/3/06, Ryan Gahl <Ryan.Gahl-nlycWCgr5/vuufBYgWm87A@public.gmane.org> wrote:> > Still not understanding why you don''t just apply your ideas to your > implementation of prototype.js? Just because it''s not in any kind of > official release doesn''t mean you can''t add prefixes to your copy. And > the prototype library is small enough that if you ever need to upgrade > it, it''s not going to take you that long to re-apply the prefixes. > > I''m afraid you''re looking for the perfect solution, which I''m afraid > does not exist. I''ll bet in the long run it''s a better choice to stick > with prototype.js and use your prefix idea rather than spend all the > time to convert to dojo which may not even solve your problem... But I > don''t know your project like you do I guess. > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of > Martin Marinschek > Sent: Tuesday, January 03, 2006 2:41 PM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Re: [Rails-spinoffs] Status of Prototype > > Ok - then I can''t use prototype. It''s out of my possibilities to check > with every framework, as I don''t have access to all possible > javascript-frameworks a MyFaces user could combine with his > MyFaces-webapps. > > In this case, I''ll have to drop prototype and replace everything with > dojo. > Sigh! lots of work to do ;) > > However, I still think that something that makes it a little less > convenient (prefixes are just a few keyboard-hits more) but a lot more > stable to use prototype would be well worth being implemented! > > regards, > > Martin > > On 1/3/06, Ryan Gahl <Ryan.Gahl-nlycWCgr5/vuufBYgWm87A@public.gmane.org> wrote: > > Went to the official Ajile website, downloaded the thing and took a > > look. All I can say is, meh. It''s not entirely useful, really. First > of > > all the darn thing is written all on a single line (no carriage > > returns), which I''m assuming was some attempt at saving a few bytes > > (quite annoying). Secondly, it doesn''t really do anything helpful > (maybe > > it has some good points). In an attempt at simulating namespaces, the > > author has had to fill an array with every system type he could find > > (maybe all of them, maybe he missed a few), which gets checked any > time > > you try to create or import a namespace, so you don''t collide with any > > system defined objects (who knows how many browser-specific > proprietary > > ones were missed). And then all it''s really doing in the end is > creating > > shell objects to act like a dot-naming convention for your actual > > objects. So it''s a really long way around the problem that basically > is > > (once again) simply renaming functions, only in this case is actually > > adding overhead by having to create shell objects (memory usage) and > > iterate through the massive array of system types. And it in no way > > addresses our REAL problem (as prototype.js users), of the built in > > javascript object prototypes being changed. > > > > So, Martin, once again I have to say if you are using any framework > the > > messes with prototypes, you just have to suck it up and watch out for > > collisions. > > > > -----Original Message----- > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of > Ryan > > Gahl > > Sent: Tuesday, January 03, 2006 1:51 PM > > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > Subject: RE: [Rails-spinoffs] Status of Prototype > > > > Brilliant, I never heard of that before, thanks Michael. I''m > definitely > > going to take a look at AJILE :) > > > > -----Original Message----- > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of > > Michael Peters > > Sent: Tuesday, January 03, 2006 1:48 PM > > To: mmarinschek-1oDqGaOF3Lkdnm+yROfE0A@public.gmane.org > > Cc: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > Subject: Re: [Rails-spinoffs] Status of Prototype > > > > > > > > Martin Marinschek wrote: > > > Ok, > > > > > > if you guys agree, then I would really think that we should try to > get > > > this into prototype. Why should each and every user necessarily do > > > this if it could fixed by the framework itself? > > > > I wasn''t saying that the frameword should do it. I was just > complaining > > about > > the lack of namespaces in Javascript. I think that adding a > ''protoType_'' > > extension to every method call and class name would be tedious and > ugly > > (and > > would give me PHP nightmares). > > > > Maybe something like Ajile? http://en.wikipedia.org/wiki/AJILE > > > > -- > > Michael Peters > > Developer > > Plus Three, LP > > > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > The information transmitted in this electronic mail is intended only > for > > the > > person or entity to which it is addressed and may contain > confidential, > > proprietary, and/or privileged material. Any review, retransmission, > > dissemination or other use of, or taking of any action in reliance > upon, > > this information by persons or entities other than the intended > > recipient > > is prohibited. If you received this in error, please contact the > sender > > and > > delete the material from all computers. > > > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > > -- > > http://www.irian.at > > Your JSF powerhouse - > JSF Consulting, Development and > Courses in English and German > > Professional Support for Apache MyFaces > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
So I''m guessing Dojo does not change any internal object prototypes then? Is it even comparable to prototype? I mean does it allow for encapsulation via class-like definitions, inheritance, etc..? Or are you only using it for AJAX? I''d be interested in some sort of side by side comparison if that exists anywhere. Guess I''ll have to dig into Dojo a bit to get those answers. _____ From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Jesse Kuhnert Sent: Tuesday, January 03, 2006 2:54 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails-spinoffs] Status of Prototype I''ve had problems using prototype with other javascript as well. Since moving over to dojo I''ve never looked back ;) (Besides your autocompleter of course..) The collisions people are having with the prototype''d stuff really is a widespread problem, but it looks like prototype is doing just fine in spite of the competition so I''m sure it''s not an issue. On 1/3/06, Ryan Gahl <Ryan.Gahl-nlycWCgr5/vuufBYgWm87A@public.gmane.org> wrote: Still not understanding why you don''t just apply your ideas to your implementation of prototype.js? Just because it''s not in any kind of official release doesn''t mean you can''t add prefixes to your copy. And the prototype library is small enough that if you ever need to upgrade it, it''s not going to take you that long to re-apply the prefixes. I''m afraid you''re looking for the perfect solution, which I''m afraid does not exist. I''ll bet in the long run it''s a better choice to stick with prototype.js and use your prefix idea rather than spend all the time to convert to dojo which may not even solve your problem... But I don''t know your project like you do I guess. -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org ] On Behalf Of Martin Marinschek Sent: Tuesday, January 03, 2006 2:41 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails-spinoffs] Status of Prototype Ok - then I can''t use prototype. It''s out of my possibilities to check with every framework, as I don''t have access to all possible javascript-frameworks a MyFaces user could combine with his MyFaces-webapps. In this case, I''ll have to drop prototype and replace everything with dojo. Sigh! lots of work to do ;) However, I still think that something that makes it a little less convenient (prefixes are just a few keyboard-hits more) but a lot more stable to use prototype would be well worth being implemented! regards, Martin On 1/3/06, Ryan Gahl <Ryan.Gahl-nlycWCgr5/vuufBYgWm87A@public.gmane.org> wrote:> Went to the official Ajile website, downloaded the thing and took a > look. All I can say is, meh. It''s not entirely useful, really. Firstof> all the darn thing is written all on a single line (no carriage > returns), which I''m assuming was some attempt at saving a few bytes > (quite annoying). Secondly, it doesn''t really do anything helpful(maybe> it has some good points). In an attempt at simulating namespaces, the > author has had to fill an array with every system type he could find > (maybe all of them, maybe he missed a few), which gets checked anytime> you try to create or import a namespace, so you don''t collide with any > system defined objects (who knows how many browser-specificproprietary> ones were missed). And then all it''s really doing in the end iscreating> shell objects to act like a dot-naming convention for your actual > objects. So it''s a really long way around the problem that basicallyis> (once again) simply renaming functions, only in this case is actually > adding overhead by having to create shell objects (memory usage) and > iterate through the massive array of system types. And it in no way > addresses our REAL problem (as prototype.js users), of the built in > javascript object prototypes being changed. > > So, Martin, once again I have to say if you are using any frameworkthe> messes with prototypes, you just have to suck it up and watch out for > collisions. > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf OfRyan> Gahl > Sent: Tuesday, January 03, 2006 1:51 PM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: RE: [Rails-spinoffs] Status of Prototype > > Brilliant, I never heard of that before, thanks Michael. I''mdefinitely> going to take a look at AJILE :) > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of > Michael Peters > Sent: Tuesday, January 03, 2006 1:48 PM > To: mmarinschek-1oDqGaOF3Lkdnm+yROfE0A@public.gmane.org > Cc: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Re: [Rails-spinoffs] Status of Prototype > > > > Martin Marinschek wrote: > > Ok, > > > > if you guys agree, then I would really think that we should try toget> > this into prototype. Why should each and every user necessarily do > > this if it could fixed by the framework itself? > > I wasn''t saying that the frameword should do it. I was justcomplaining> about > the lack of namespaces in Javascript. I think that adding a''protoType_''> extension to every method call and class name would be tedious andugly> (and > would give me PHP nightmares). > > Maybe something like Ajile? http://en.wikipedia.org/wiki/AJILE > > -- > Michael Peters > Developer > Plus Three, LP > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > The information transmitted in this electronic mail is intended onlyfor> the > person or entity to which it is addressed and may containconfidential,> proprietary, and/or privileged material. Any review, retransmission, > dissemination or other use of, or taking of any action in relianceupon,> this information by persons or entities other than the intended > recipient > is prohibited. If you received this in error, please contact thesender> and > delete the material from all computers. > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >-- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs The information transmitted in this electronic mail is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Ryan Gahl wrote:> Still not understanding why you don''t just apply your ideas to your > implementation of prototype.js? Just because it''s not in any kind of > official release doesn''t mean you can''t add prefixes to your copy. And > the prototype library is small enough that if you ever need to upgrade > it, it''s not going to take you that long to re-apply the prefixes.I personally think this is also a mess. Not only does it mean that you have to edit your copy of the prototype lib, but you also have to edit any other libraries that may depend on it (script.aculo.us, rico, etc) and he would also have to create special docs for his users, etc. Not alot of fun.> I''m afraid you''re looking for the perfect solution, which I''m afraid > does not exist. I''ll bet in the long run it''s a better choice to stick > with prototype.js and use your prefix idea rather than spend all the > time to convert to dojo which may not even solve your problem... But I > don''t know your project like you do I guess.Even if Ajile doesn''t work for everyone, it might work for him (even if it does add some overhead). -- Michael Peters Developer Plus Three, LP
Heh, I use it for a lot more than ~ajax~, but to each his own. I tend to try not discounting/putting down any technologies (or foods/people/etc.. for that matter) until I''ve given them a fair evaluation. I think if there''s something that should be getting done it''s getting done in dojo. (for the most part) You guys might even want to think about "merging". That''s where a lot of the framework that exists today came from. (mochikit,nWidgets,etc..) Theyr''e really a good bunch of guys to work with. I hope I don''t sound like a zealout, I''d ditch dojo in a second if something better came along. jesse On 1/3/06, Ryan Gahl <Ryan.Gahl-nlycWCgr5/vuufBYgWm87A@public.gmane.org> wrote:> > So I''m guessing Dojo does not change any internal object prototypes then? > Is it even comparable to prototype? I mean does it allow for encapsulation > via class-like definitions, inheritance, etc..? Or are you only using it for > AJAX? I''d be interested in some sort of side by side comparison if that > exists anywhere. Guess I''ll have to dig into Dojo a bit to get those > answers. > > > ------------------------------ > > *From:* rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto: > rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] *On Behalf Of *Jesse Kuhnert > *Sent:* Tuesday, January 03, 2006 2:54 PM > *To:* rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > *Subject:* Re: [Rails-spinoffs] Status of Prototype > > > > I''ve had problems using prototype with other javascript as well. Since > moving over to dojo I''ve never looked back ;) (Besides your autocompleter of > course..) > > The collisions people are having with the prototype''d stuff really is a > widespread problem, but it looks like prototype is doing just fine in spite > of the competition so I''m sure it''s not an issue. > > On 1/3/06, *Ryan Gahl* <Ryan.Gahl-nlycWCgr5/vuufBYgWm87A@public.gmane.org> wrote: > > Still not understanding why you don''t just apply your ideas to your > implementation of prototype.js? Just because it''s not in any kind of > official release doesn''t mean you can''t add prefixes to your copy. And > the prototype library is small enough that if you ever need to upgrade > it, it''s not going to take you that long to re-apply the prefixes. > > I''m afraid you''re looking for the perfect solution, which I''m afraid > does not exist. I''ll bet in the long run it''s a better choice to stick > with prototype.js and use your prefix idea rather than spend all the > time to convert to dojo which may not even solve your problem... But I > don''t know your project like you do I guess. > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org ] On Behalf Of > Martin Marinschek > Sent: Tuesday, January 03, 2006 2:41 PM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Re: [Rails-spinoffs] Status of Prototype > > Ok - then I can''t use prototype. It''s out of my possibilities to check > with every framework, as I don''t have access to all possible > javascript-frameworks a MyFaces user could combine with his > MyFaces-webapps. > > In this case, I''ll have to drop prototype and replace everything with > dojo. > Sigh! lots of work to do ;) > > However, I still think that something that makes it a little less > convenient (prefixes are just a few keyboard-hits more) but a lot more > stable to use prototype would be well worth being implemented! > > regards, > > Martin > > On 1/3/06, Ryan Gahl <Ryan.Gahl-nlycWCgr5/vuufBYgWm87A@public.gmane.org> wrote: > > Went to the official Ajile website, downloaded the thing and took a > > look. All I can say is, meh. It''s not entirely useful, really. First > of > > all the darn thing is written all on a single line (no carriage > > returns), which I''m assuming was some attempt at saving a few bytes > > (quite annoying). Secondly, it doesn''t really do anything helpful > (maybe > > it has some good points). In an attempt at simulating namespaces, the > > author has had to fill an array with every system type he could find > > (maybe all of them, maybe he missed a few), which gets checked any > time > > you try to create or import a namespace, so you don''t collide with any > > system defined objects (who knows how many browser-specific > proprietary > > ones were missed). And then all it''s really doing in the end is > creating > > shell objects to act like a dot-naming convention for your actual > > objects. So it''s a really long way around the problem that basically > is > > (once again) simply renaming functions, only in this case is actually > > adding overhead by having to create shell objects (memory usage) and > > iterate through the massive array of system types. And it in no way > > addresses our REAL problem (as prototype.js users), of the built in > > javascript object prototypes being changed. > > > > So, Martin, once again I have to say if you are using any framework > the > > messes with prototypes, you just have to suck it up and watch out for > > collisions. > > > > -----Original Message----- > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of > Ryan > > Gahl > > Sent: Tuesday, January 03, 2006 1:51 PM > > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > Subject: RE: [Rails-spinoffs] Status of Prototype > > > > Brilliant, I never heard of that before, thanks Michael. I''m > definitely > > going to take a look at AJILE :) > > > > -----Original Message----- > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of > > Michael Peters > > Sent: Tuesday, January 03, 2006 1:48 PM > > To: mmarinschek-1oDqGaOF3Lkdnm+yROfE0A@public.gmane.org > > Cc: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > Subject: Re: [Rails-spinoffs] Status of Prototype > > > > > > > > Martin Marinschek wrote: > > > Ok, > > > > > > if you guys agree, then I would really think that we should try to > get > > > this into prototype. Why should each and every user necessarily do > > > this if it could fixed by the framework itself? > > > > I wasn''t saying that the frameword should do it. I was just > complaining > > about > > the lack of namespaces in Javascript. I think that adding a > ''protoType_'' > > extension to every method call and class name would be tedious and > ugly > > (and > > would give me PHP nightmares). > > > > Maybe something like Ajile? http://en.wikipedia.org/wiki/AJILE > > > > -- > > Michael Peters > > Developer > > Plus Three, LP > > > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > The information transmitted in this electronic mail is intended only > for > > the > > person or entity to which it is addressed and may contain > confidential, > > proprietary, and/or privileged material. Any review, retransmission, > > dissemination or other use of, or taking of any action in reliance > upon, > > this information by persons or entities other than the intended > > recipient > > is prohibited. If you received this in error, please contact the > sender > > and > > delete the material from all computers. > > > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > > -- > > http://www.irian.at > > Your JSF powerhouse - > JSF Consulting, Development and > Courses in English and German > > Professional Support for Apache MyFaces > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > The information transmitted in this electronic mail is intended only for > the person or entity to which it is addressed and may contain confidential, > proprietary, and/or privileged material. Any review, retransmission, > dissemination or other use of, or taking of any action in reliance upon, > this information by persons or entities other than the intended recipient is > prohibited. If you received this in error, please contact the sender and > delete the material from all computers. > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Well, according to the critics of prototype on our list, dojo offers everything prototype offers with respect to the javascript core. I really don''t know - haven''t checked it out myself so far, I wanted to find out what you guys are saying first. Of course, with prototype, you get a lot more on the plate with all the extensions which use it! regards, Martin On 1/3/06, Ryan Gahl <Ryan.Gahl-nlycWCgr5/vuufBYgWm87A@public.gmane.org> wrote:> > > > So I''m guessing Dojo does not change any internal object prototypes then? Is > it even comparable to prototype? I mean does it allow for encapsulation via > class-like definitions, inheritance, etc..? Or are you only using it for > AJAX? I''d be interested in some sort of side by side comparison if that > exists anywhere. Guess I''ll have to dig into Dojo a bit to get those > answers. > > > > ________________________________ > > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On > Behalf Of Jesse Kuhnert > Sent: Tuesday, January 03, 2006 2:54 PM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Re: [Rails-spinoffs] Status of Prototype > > > > I''ve had problems using prototype with other javascript as well. Since > moving over to dojo I''ve never looked back ;) (Besides your autocompleter of > course..) > > The collisions people are having with the prototype''d stuff really is a > widespread problem, but it looks like prototype is doing just fine in spite > of the competition so I''m sure it''s not an issue. > > > On 1/3/06, Ryan Gahl <Ryan.Gahl-nlycWCgr5/vuufBYgWm87A@public.gmane.org> wrote: > > Still not understanding why you don''t just apply your ideas to your > implementation of prototype.js? Just because it''s not in any kind of > official release doesn''t mean you can''t add prefixes to your copy. And > the prototype library is small enough that if you ever need to upgrade > it, it''s not going to take you that long to re-apply the prefixes. > > I''m afraid you''re looking for the perfect solution, which I''m afraid > does not exist. I''ll bet in the long run it''s a better choice to stick > with prototype.js and use your prefix idea rather than spend all the > time to convert to dojo which may not even solve your problem... But I > don''t know your project like you do I guess. > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org ] On > Behalf Of > Martin Marinschek > Sent: Tuesday, January 03, 2006 2:41 PM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Re: [Rails-spinoffs] Status of Prototype > > Ok - then I can''t use prototype. It''s out of my possibilities to check > with every framework, as I don''t have access to all possible > javascript-frameworks a MyFaces user could combine with his > MyFaces-webapps. > > In this case, I''ll have to drop prototype and replace everything with > dojo. > Sigh! lots of work to do ;) > > However, I still think that something that makes it a little less > convenient (prefixes are just a few keyboard-hits more) but a lot more > stable to use prototype would be well worth being implemented! > > regards, > > Martin > > On 1/3/06, Ryan Gahl <Ryan.Gahl-nlycWCgr5/vuufBYgWm87A@public.gmane.org> wrote: > > Went to the official Ajile website, downloaded the thing and took a > > look. All I can say is, meh. It''s not entirely useful, really. First > of > > all the darn thing is written all on a single line (no carriage > > returns), which I''m assuming was some attempt at saving a few bytes > > (quite annoying). Secondly, it doesn''t really do anything helpful > (maybe > > it has some good points). In an attempt at simulating namespaces, the > > author has had to fill an array with every system type he could find > > (maybe all of them, maybe he missed a few), which gets checked any > time > > you try to create or import a namespace, so you don''t collide with any > > system defined objects (who knows how many browser-specific > proprietary > > ones were missed). And then all it''s really doing in the end is > creating > > shell objects to act like a dot-naming convention for your actual > > objects. So it''s a really long way around the problem that basically > is > > (once again) simply renaming functions, only in this case is actually > > adding overhead by having to create shell objects (memory usage) and > > iterate through the massive array of system types. And it in no way > > addresses our REAL problem (as prototype.js users), of the built in > > javascript object prototypes being changed. > > > > So, Martin, once again I have to say if you are using any framework > the > > messes with prototypes, you just have to suck it up and watch out for > > collisions. > > > > -----Original Message----- > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On > Behalf Of > Ryan > > Gahl > > Sent: Tuesday, January 03, 2006 1:51 PM > > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > Subject: RE: [Rails-spinoffs] Status of Prototype > > > > Brilliant, I never heard of that before, thanks Michael. I''m > definitely > > going to take a look at AJILE :) > > > > -----Original Message----- > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On > Behalf Of > > Michael Peters > > Sent: Tuesday, January 03, 2006 1:48 PM > > To: mmarinschek-1oDqGaOF3Lkdnm+yROfE0A@public.gmane.org > > Cc: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > Subject: Re: [Rails-spinoffs] Status of Prototype > > > > > > > > Martin Marinschek wrote: > > > Ok, > > > > > > if you guys agree, then I would really think that we should try to > get > > > this into prototype. Why should each and every user necessarily do > > > this if it could fixed by the framework itself? > > > > I wasn''t saying that the frameword should do it. I was just > complaining > > about > > the lack of namespaces in Javascript. I think that adding a > ''protoType_'' > > extension to every method call and class name would be tedious and > ugly > > (and > > would give me PHP nightmares). > > > > Maybe something like Ajile? > http://en.wikipedia.org/wiki/AJILE > > > > -- > > Michael Peters > > Developer > > Plus Three, LP > > > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > The information transmitted in this electronic mail is intended only > for > > the > > person or entity to which it is addressed and may contain > confidential, > > proprietary, and/or privileged material. Any review, retransmission, > > dissemination or other use of, or taking of any action in reliance > upon, > > this information by persons or entities other than the intended > > recipient > > is prohibited. If you received this in error, please contact the > sender > > and > > delete the material from all computers. > > > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > > -- > > http://www.irian.at > > Your JSF powerhouse - > JSF Consulting, Development and > Courses in English and German > > Professional Support for Apache MyFaces > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > > The information transmitted in this electronic mail is intended only for the > person or entity to which it is addressed and may contain confidential, > proprietary, and/or privileged material. Any review, retransmission, > dissemination or other use of, or taking of any action in reliance upon, > this information by persons or entities other than the intended recipient is > prohibited. If you received this in error, please contact the sender and > delete the material from all computers. > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > >-- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Oh, no, I wasn''s discounting/putting down Dojo at all. honestly just asking how it compares to prototype. _____ From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Jesse Kuhnert Sent: Tuesday, January 03, 2006 3:03 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails-spinoffs] Status of Prototype Heh, I use it for a lot more than ~ajax~, but to each his own. I tend to try not discounting/putting down any technologies (or foods/people/etc.. for that matter) until I''ve given them a fair evaluation. I think if there''s something that should be getting done it''s getting done in dojo. (for the most part) You guys might even want to think about "merging". That''s where a lot of the framework that exists today came from. (mochikit,nWidgets,etc..) Theyr''e really a good bunch of guys to work with. I hope I don''t sound like a zealout, I''d ditch dojo in a second if something better came along. jesse On 1/3/06, Ryan Gahl <Ryan.Gahl-nlycWCgr5/vuufBYgWm87A@public.gmane.org> wrote: So I''m guessing Dojo does not change any internal object prototypes then? Is it even comparable to prototype? I mean does it allow for encapsulation via class-like definitions, inheritance, etc..? Or are you only using it for AJAX? I''d be interested in some sort of side by side comparison if that exists anywhere. Guess I''ll have to dig into Dojo a bit to get those answers. _____ From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Jesse Kuhnert Sent: Tuesday, January 03, 2006 2:54 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails-spinoffs] Status of Prototype I''ve had problems using prototype with other javascript as well. Since moving over to dojo I''ve never looked back ;) (Besides your autocompleter of course..) The collisions people are having with the prototype''d stuff really is a widespread problem, but it looks like prototype is doing just fine in spite of the competition so I''m sure it''s not an issue. On 1/3/06, Ryan Gahl <Ryan.Gahl-nlycWCgr5/vuufBYgWm87A@public.gmane.org> wrote: Still not understanding why you don''t just apply your ideas to your implementation of prototype.js? Just because it''s not in any kind of official release doesn''t mean you can''t add prefixes to your copy. And the prototype library is small enough that if you ever need to upgrade it, it''s not going to take you that long to re-apply the prefixes. I''m afraid you''re looking for the perfect solution, which I''m afraid does not exist. I''ll bet in the long run it''s a better choice to stick with prototype.js and use your prefix idea rather than spend all the time to convert to dojo which may not even solve your problem... But I don''t know your project like you do I guess. -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org ] On Behalf Of Martin Marinschek Sent: Tuesday, January 03, 2006 2:41 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails-spinoffs] Status of Prototype Ok - then I can''t use prototype. It''s out of my possibilities to check with every framework, as I don''t have access to all possible javascript-frameworks a MyFaces user could combine with his MyFaces-webapps. In this case, I''ll have to drop prototype and replace everything with dojo. Sigh! lots of work to do ;) However, I still think that something that makes it a little less convenient (prefixes are just a few keyboard-hits more) but a lot more stable to use prototype would be well worth being implemented! regards, Martin On 1/3/06, Ryan Gahl <Ryan.Gahl-nlycWCgr5/vuufBYgWm87A@public.gmane.org> wrote:> Went to the official Ajile website, downloaded the thing and took a > look. All I can say is, meh. It''s not entirely useful, really. Firstof> all the darn thing is written all on a single line (no carriage > returns), which I''m assuming was some attempt at saving a few bytes > (quite annoying). Secondly, it doesn''t really do anything helpful(maybe> it has some good points). In an attempt at simulating namespaces, the > author has had to fill an array with every system type he could find > (maybe all of them, maybe he missed a few), which gets checked anytime> you try to create or import a namespace, so you don''t collide with any > system defined objects (who knows how many browser-specificproprietary> ones were missed). And then all it''s really doing in the end iscreating> shell objects to act like a dot-naming convention for your actual > objects. So it''s a really long way around the problem that basicallyis> (once again) simply renaming functions, only in this case is actually > adding overhead by having to create shell objects (memory usage) and > iterate through the massive array of system types. And it in no way > addresses our REAL problem (as prototype.js users), of the built in > javascript object prototypes being changed. > > So, Martin, once again I have to say if you are using any frameworkthe> messes with prototypes, you just have to suck it up and watch out for > collisions. > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf OfRyan> Gahl > Sent: Tuesday, January 03, 2006 1:51 PM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: RE: [Rails-spinoffs] Status of Prototype > > Brilliant, I never heard of that before, thanks Michael. I''mdefinitely> going to take a look at AJILE :) > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of > Michael Peters > Sent: Tuesday, January 03, 2006 1:48 PM > To: mmarinschek-1oDqGaOF3Lkdnm+yROfE0A@public.gmane.org > Cc: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Re: [Rails-spinoffs] Status of Prototype > > > > Martin Marinschek wrote: > > Ok, > > > > if you guys agree, then I would really think that we should try toget> > this into prototype. Why should each and every user necessarily do > > this if it could fixed by the framework itself? > > I wasn''t saying that the frameword should do it. I was justcomplaining> about > the lack of namespaces in Javascript. I think that adding a''protoType_''> extension to every method call and class name would be tedious andugly> (and > would give me PHP nightmares). > > Maybe something like Ajile? http://en.wikipedia.org/wiki/AJILE > > --> Michael Peters > Developer > Plus Three, LP > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > The information transmitted in this electronic mail is intended onlyfor> the > person or entity to which it is addressed and may containconfidential,> proprietary, and/or privileged material. Any review, retransmission, > dissemination or other use of, or taking of any action in relianceupon,> this information by persons or entities other than the intended > recipient > is prohibited. If you received this in error, please contact thesender> and > delete the material from all computers. > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >-- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs The information transmitted in this electronic mail is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs The information transmitted in this electronic mail is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Hmm, yes, hadn''t thought of that part. I, too, use script.aculo.us (and rico). I don''t know then, maybe Dojo is the answer for you Martin. I''ve only run into a collision with prototype once so far (some other library tried to define a function called Hash, so since I didn''t need 2 definitions in my implementation, I canned the other one.) I just think of it like this, the collective combination of libraries loaded into an application or a page results in a single "namespace"... mine. I do what it takes to make sure necessary frameworks work together. It''s the nature of the beast. -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Michael Peters Sent: Tuesday, January 03, 2006 2:58 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Cc: mmarinschek-1oDqGaOF3Lkdnm+yROfE0A@public.gmane.org Subject: Re: [Rails-spinoffs] Status of Prototype Ryan Gahl wrote:> Still not understanding why you don''t just apply your ideas to your > implementation of prototype.js? Just because it''s not in any kind of > official release doesn''t mean you can''t add prefixes to your copy. And > the prototype library is small enough that if you ever need to upgrade > it, it''s not going to take you that long to re-apply the prefixes.I personally think this is also a mess. Not only does it mean that you have to edit your copy of the prototype lib, but you also have to edit any other libraries that may depend on it (script.aculo.us, rico, etc) and he would also have to create special docs for his users, etc. Not alot of fun.> I''m afraid you''re looking for the perfect solution, which I''m afraid > does not exist. I''ll bet in the long run it''s a better choice to stick > with prototype.js and use your prefix idea rather than spend all the > time to convert to dojo which may not even solve your problem... But I > don''t know your project like you do I guess.Even if Ajile doesn''t work for everyone, it might work for him (even if it does add some overhead). -- Michael Peters Developer Plus Three, LP _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs The information transmitted in this electronic mail is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers.
Well, this is what I''ve done with it so far, which is hardly a good example.. http://tacos.sourceforge.net/ It''s also about to be integrated into and serve as the foundation for tapestry related stuff. There are some others in the ASF planning on/currently using it as well but I don''t know the specifics. They have a good sampling of some things here, as long as you keep in mind that these are uncompressed/etc builds so they tend to run a lot slower than what you''d get with a pre-compiled package: http://archive.dojotoolkit.org/dojo-2006-01-03/tests/ On 1/3/06, Martin Marinschek <martin.marinschek-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Well, > > according to the critics of prototype on our list, dojo offers > everything prototype offers with respect to the javascript core. I > really don''t know - haven''t checked it out myself so far, I wanted to > find out what you guys are saying first. > > Of course, with prototype, you get a lot more on the plate with all > the extensions which use it! > > regards, > > Martin > > On 1/3/06, Ryan Gahl <Ryan.Gahl-nlycWCgr5/vuufBYgWm87A@public.gmane.org> wrote: > > > > > > > > So I''m guessing Dojo does not change any internal object prototypes > then? Is > > it even comparable to prototype? I mean does it allow for encapsulation > via > > class-like definitions, inheritance, etc..? Or are you only using it for > > AJAX? I''d be interested in some sort of side by side comparison if that > > exists anywhere. Guess I''ll have to dig into Dojo a bit to get those > > answers. > > > > > > > > ________________________________ > > > > > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On > > Behalf Of Jesse Kuhnert > > Sent: Tuesday, January 03, 2006 2:54 PM > > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > Subject: Re: [Rails-spinoffs] Status of Prototype > > > > > > > > I''ve had problems using prototype with other javascript as well. Since > > moving over to dojo I''ve never looked back ;) (Besides your > autocompleter of > > course..) > > > > The collisions people are having with the prototype''d stuff really is a > > widespread problem, but it looks like prototype is doing just fine in > spite > > of the competition so I''m sure it''s not an issue. > > > > > > On 1/3/06, Ryan Gahl <Ryan.Gahl-nlycWCgr5/vuufBYgWm87A@public.gmane.org> wrote: > > > > Still not understanding why you don''t just apply your ideas to your > > implementation of prototype.js? Just because it''s not in any kind of > > official release doesn''t mean you can''t add prefixes to your copy. And > > the prototype library is small enough that if you ever need to upgrade > > it, it''s not going to take you that long to re-apply the prefixes. > > > > I''m afraid you''re looking for the perfect solution, which I''m afraid > > does not exist. I''ll bet in the long run it''s a better choice to stick > > with prototype.js and use your prefix idea rather than spend all the > > time to convert to dojo which may not even solve your problem... But I > > don''t know your project like you do I guess. > > > > -----Original Message----- > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org ] On > > Behalf Of > > Martin Marinschek > > Sent: Tuesday, January 03, 2006 2:41 PM > > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > Subject: Re: [Rails-spinoffs] Status of Prototype > > > > Ok - then I can''t use prototype. It''s out of my possibilities to check > > with every framework, as I don''t have access to all possible > > javascript-frameworks a MyFaces user could combine with his > > MyFaces-webapps. > > > > In this case, I''ll have to drop prototype and replace everything with > > dojo. > > Sigh! lots of work to do ;) > > > > However, I still think that something that makes it a little less > > convenient (prefixes are just a few keyboard-hits more) but a lot more > > stable to use prototype would be well worth being implemented! > > > > regards, > > > > Martin > > > > On 1/3/06, Ryan Gahl <Ryan.Gahl-nlycWCgr5/vuufBYgWm87A@public.gmane.org> wrote: > > > Went to the official Ajile website, downloaded the thing and took a > > > look. All I can say is, meh. It''s not entirely useful, really. First > > of > > > all the darn thing is written all on a single line (no carriage > > > returns), which I''m assuming was some attempt at saving a few bytes > > > (quite annoying). Secondly, it doesn''t really do anything helpful > > (maybe > > > it has some good points). In an attempt at simulating namespaces, the > > > author has had to fill an array with every system type he could find > > > (maybe all of them, maybe he missed a few), which gets checked any > > time > > > you try to create or import a namespace, so you don''t collide with > any > > > system defined objects (who knows how many browser-specific > > proprietary > > > ones were missed). And then all it''s really doing in the end is > > creating > > > shell objects to act like a dot-naming convention for your actual > > > objects. So it''s a really long way around the problem that basically > > is > > > (once again) simply renaming functions, only in this case is actually > > > adding overhead by having to create shell objects (memory usage) and > > > iterate through the massive array of system types. And it in no way > > > addresses our REAL problem (as prototype.js users), of the built in > > > javascript object prototypes being changed. > > > > > > So, Martin, once again I have to say if you are using any framework > > the > > > messes with prototypes, you just have to suck it up and watch out for > > > collisions. > > > > > > -----Original Message----- > > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On > > Behalf Of > > Ryan > > > Gahl > > > Sent: Tuesday, January 03, 2006 1:51 PM > > > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > Subject: RE: [Rails-spinoffs] Status of Prototype > > > > > > Brilliant, I never heard of that before, thanks Michael. I''m > > definitely > > > going to take a look at AJILE :) > > > > > > -----Original Message----- > > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On > > Behalf Of > > > Michael Peters > > > Sent: Tuesday, January 03, 2006 1:48 PM > > > To: mmarinschek-1oDqGaOF3Lkdnm+yROfE0A@public.gmane.org > > > Cc: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > Subject: Re: [Rails-spinoffs] Status of Prototype > > > > > > > > > > > > Martin Marinschek wrote: > > > > Ok, > > > > > > > > if you guys agree, then I would really think that we should try to > > get > > > > this into prototype. Why should each and every user necessarily do > > > > this if it could fixed by the framework itself? > > > > > > I wasn''t saying that the frameword should do it. I was just > > complaining > > > about > > > the lack of namespaces in Javascript. I think that adding a > > ''protoType_'' > > > extension to every method call and class name would be tedious and > > ugly > > > (and > > > would give me PHP nightmares). > > > > > > Maybe something like Ajile? > > http://en.wikipedia.org/wiki/AJILE > > > > > > -- > > > Michael Peters > > > Developer > > > Plus Three, LP > > > > > > _______________________________________________ > > > Rails-spinoffs mailing list > > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > > > The information transmitted in this electronic mail is intended only > > for > > > the > > > person or entity to which it is addressed and may contain > > confidential, > > > proprietary, and/or privileged material. Any review, retransmission, > > > dissemination or other use of, or taking of any action in reliance > > upon, > > > this information by persons or entities other than the intended > > > recipient > > > is prohibited. If you received this in error, please contact the > > sender > > > and > > > delete the material from all computers. > > > > > > _______________________________________________ > > > Rails-spinoffs mailing list > > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > _______________________________________________ > > > Rails-spinoffs mailing list > > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > > > > > > -- > > > > http://www.irian.at > > > > Your JSF powerhouse - > > JSF Consulting, Development and > > Courses in English and German > > > > Professional Support for Apache MyFaces > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > > > > > > > The information transmitted in this electronic mail is intended only for > the > > person or entity to which it is addressed and may contain confidential, > > proprietary, and/or privileged material. Any review, retransmission, > > dissemination or other use of, or taking of any action in reliance upon, > > this information by persons or entities other than the intended > recipient is > > prohibited. If you received this in error, please contact the sender and > > delete the material from all computers. > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > > > > > > -- > > http://www.irian.at > > Your JSF powerhouse - > JSF Consulting, Development and > Courses in English and German > > Professional Support for Apache MyFaces > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
But if we''d take that approach in building every framework, we''d get nowhere regarding component-based reuse. Don''t you guys want a solution for this, once and for all times? regards, Martin On 1/3/06, Ryan Gahl <Ryan.Gahl-nlycWCgr5/vuufBYgWm87A@public.gmane.org> wrote:> Hmm, yes, hadn''t thought of that part. I, too, use script.aculo.us (and > rico). I don''t know then, maybe Dojo is the answer for you Martin. I''ve > only run into a collision with prototype once so far (some other library > tried to define a function called Hash, so since I didn''t need 2 > definitions in my implementation, I canned the other one.) I just think > of it like this, the collective combination of libraries loaded into an > application or a page results in a single "namespace"... mine. I do what > it takes to make sure necessary frameworks work together. It''s the > nature of the beast. > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of > Michael Peters > Sent: Tuesday, January 03, 2006 2:58 PM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Cc: mmarinschek-1oDqGaOF3Lkdnm+yROfE0A@public.gmane.org > Subject: Re: [Rails-spinoffs] Status of Prototype > > > > Ryan Gahl wrote: > > Still not understanding why you don''t just apply your ideas to your > > implementation of prototype.js? Just because it''s not in any kind of > > official release doesn''t mean you can''t add prefixes to your copy. And > > the prototype library is small enough that if you ever need to upgrade > > it, it''s not going to take you that long to re-apply the prefixes. > > I personally think this is also a mess. Not only does it mean that you > have to > edit your copy of the prototype lib, but you also have to edit any other > libraries that may depend on it (script.aculo.us, rico, etc) and he > would also > have to create special docs for his users, etc. Not alot of fun. > > > I''m afraid you''re looking for the perfect solution, which I''m afraid > > does not exist. I''ll bet in the long run it''s a better choice to stick > > with prototype.js and use your prefix idea rather than spend all the > > time to convert to dojo which may not even solve your problem... But I > > don''t know your project like you do I guess. > > Even if Ajile doesn''t work for everyone, it might work for him (even if > it does > add some overhead). > > -- > Michael Peters > Developer > Plus Three, LP > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > The information transmitted in this electronic mail is intended only for the > person or entity to which it is addressed and may contain confidential, > proprietary, and/or privileged material. Any review, retransmission, > dissemination or other use of, or taking of any action in reliance upon, > this information by persons or entities other than the intended recipient > is prohibited. If you received this in error, please contact the sender and > delete the material from all computers. > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >-- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
There is a fascinating underlying current happening here. I believe we''re in this unique stage where dynamic, ajax-friendly js libraries are popping up everywhere. It''s like a gold rush in a way and at the end of this stage only a few libraries will make it. It''s anybody''s guess how it will all turn out but I would say one of prototype''s weakness is how it plays with others. This is especially true if people starting putting together cool widgets from various sources. I would guess that if prototype (and all of its dependant libraries) could make the switch to not colliding with other libraries then it could indeed have a better shot at being the king library. Fueled by Rails growth and the nice widget libraries like ours here, prototype has a definite edge but if other non-Ruby frameworks opt for other libraries then its potential will be hindered. It''s also just a matter of time until other widgets are ported to the ''other'' libraries. I don''t even know if Sam and Thomas would even consider such a change as that would most likely break a ton of existing code which may be a deal breaker. As for Martin''s issue specifically, Apache MyFaces is a big project that will be used by the Java community. They are not a single application solution, Java web projects everywhere will consider using MyFaces only if it plays nice with their current application. So the MyFaces project, correct me if I''m wrong, has to be very careful in what technologies it bundles. Though given the component nature of JSF having a strong widget library is just huge. Cheers, Marty
Actually having no namespaces was just one of the critque points. (the smaller one in my opinion) The other one to my knowledge was (I was one of the prototype defenders btw...) that prototype fiddles around with basic javascript objects. The most famous example being the Object object which caused some third party libs which foreached over derivations from it to fail. The most famous example being the struts client side validation which basically was disabled by this, to my knowledge. I know this problem has been fixed. But one of the main critique points by the main critique was, that there are still many of those extensions which could cause potential breakage. No this also could be fixable by moving the prototype extensions into a different object space (like object being left untouched and moving the extensions into a prototype_object ) The question just is, is the current scheme severe enough problemwise that we have to move away (I am affected codewise as well, but only to a small degree) The more I think of it the more I come to the conclusion yes, unfortunately. While proto is perfectly fine for webapps which are self contained, all this stuff might be too problematic for a base library which can be intermixed with other systems. kindof bad, because I really like the lib, and especially what Thomas did with script.aculo.us Martin Marinschek wrote:> Hi *, > > we are using prototype in Apache MyFaces as our javascript library of > choice. Recently, there has been much discussion on our mailing list > as to the usability of prototype in a dynamic environments where > several javascript libraries are used. > > The critics of prototype argue that the prototype objects are not > namespaced - and that prototype extends basic javascript-objects with > method names that could easily be duplicated by another framework. > > Is there a line of defense for prototype here that I can use? I really > don''t want to move everything over to dojo or some other library... > > regards, > > Martin
If I could, I''d go into the lengthy details of my prototype implementation in an effort to illustrate how I''ve been able to accomplish a good robust reusable architecture (honestly, it''s really good). I just don''t think it would help you that much since it is .NET specific (but maybe). The idea though, is that I have a base class called AjaxControl, which my widgets all derive from (there is both a client-side base class and server-side .NET baseclass with the same name -- the server-side baseclass inherits from the .NET type UserControl). Server side, the controls get their data/process/do all the server side stuff and populate their form fields/inner widgets and serve up the rendered HTML to the client-side versions via AJAX, which basically just issues a command that updates the innerHTML property of the specified DOM element and issues an eval() command on all parsed javascript that may have been contained within the widget. The prototype-based client side object references for the widgets automatically contain references to all the instanced DOM elements that are a part of that specific control, which are auto-IDed uniquely so I can have any number of widget instances on a page at the same time. So basically I have created a web service layer that can dynamically request and serve widgets on-demand. There is obviously more to it, but I can very easily author a new control (component) simply by inheriting from the AjaxControl baseclass. Now, in Java I''m not sure if there is something similar to a .NET UserControl (web part, portlet, etc..?), but perhaps the model can be ported to Java as well... maybe I''ll take some more time one of these days and put together something more detailed for you. -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Martin Marinschek Sent: Tuesday, January 03, 2006 3:10 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails-spinoffs] Status of Prototype But if we''d take that approach in building every framework, we''d get nowhere regarding component-based reuse. Don''t you guys want a solution for this, once and for all times? regards, Martin On 1/3/06, Ryan Gahl <Ryan.Gahl-nlycWCgr5/vuufBYgWm87A@public.gmane.org> wrote:> Hmm, yes, hadn''t thought of that part. I, too, use script.aculo.us(and> rico). I don''t know then, maybe Dojo is the answer for you Martin.I''ve> only run into a collision with prototype once so far (some otherlibrary> tried to define a function called Hash, so since I didn''t need 2 > definitions in my implementation, I canned the other one.) I justthink> of it like this, the collective combination of libraries loaded intoan> application or a page results in a single "namespace"... mine. I dowhat> it takes to make sure necessary frameworks work together. It''s the > nature of the beast. > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of > Michael Peters > Sent: Tuesday, January 03, 2006 2:58 PM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Cc: mmarinschek-1oDqGaOF3Lkdnm+yROfE0A@public.gmane.org > Subject: Re: [Rails-spinoffs] Status of Prototype > > > > Ryan Gahl wrote: > > Still not understanding why you don''t just apply your ideas to your > > implementation of prototype.js? Just because it''s not in any kind of > > official release doesn''t mean you can''t add prefixes to your copy.And> > the prototype library is small enough that if you ever need toupgrade> > it, it''s not going to take you that long to re-apply the prefixes. > > I personally think this is also a mess. Not only does it mean that you > have to > edit your copy of the prototype lib, but you also have to edit anyother> libraries that may depend on it (script.aculo.us, rico, etc) and he > would also > have to create special docs for his users, etc. Not alot of fun. > > > I''m afraid you''re looking for the perfect solution, which I''m afraid > > does not exist. I''ll bet in the long run it''s a better choice tostick> > with prototype.js and use your prefix idea rather than spend all the > > time to convert to dojo which may not even solve your problem... ButI> > don''t know your project like you do I guess. > > Even if Ajile doesn''t work for everyone, it might work for him (evenif> it does > add some overhead). > > -- > Michael Peters > Developer > Plus Three, LP > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > The information transmitted in this electronic mail is intended onlyfor the> person or entity to which it is addressed and may containconfidential,> proprietary, and/or privileged material. Any review, retransmission, > dissemination or other use of, or taking of any action in relianceupon,> this information by persons or entities other than the intendedrecipient> is prohibited. If you received this in error, please contact thesender and> delete the material from all computers. > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >-- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
The good news is that our company recently got bought by a Unix/Java based company so I''ll have to eventually port the model anyway =) -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Ryan Gahl Sent: Tuesday, January 03, 2006 3:30 PM To: mmarinschek-1oDqGaOF3Lkdnm+yROfE0A@public.gmane.org; rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: RE: [Rails-spinoffs] Status of Prototype If I could, I''d go into the lengthy details of my prototype implementation in an effort to illustrate how I''ve been able to accomplish a good robust reusable architecture (honestly, it''s really good). I just don''t think it would help you that much since it is .NET specific (but maybe). The idea though, is that I have a base class called AjaxControl, which my widgets all derive from (there is both a client-side base class and server-side .NET baseclass with the same name -- the server-side baseclass inherits from the .NET type UserControl). Server side, the controls get their data/process/do all the server side stuff and populate their form fields/inner widgets and serve up the rendered HTML to the client-side versions via AJAX, which basically just issues a command that updates the innerHTML property of the specified DOM element and issues an eval() command on all parsed javascript that may have been contained within the widget. The prototype-based client side object references for the widgets automatically contain references to all the instanced DOM elements that are a part of that specific control, which are auto-IDed uniquely so I can have any number of widget instances on a page at the same time. So basically I have created a web service layer that can dynamically request and serve widgets on-demand. There is obviously more to it, but I can very easily author a new control (component) simply by inheriting from the AjaxControl baseclass. Now, in Java I''m not sure if there is something similar to a .NET UserControl (web part, portlet, etc..?), but perhaps the model can be ported to Java as well... maybe I''ll take some more time one of these days and put together something more detailed for you. -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Martin Marinschek Sent: Tuesday, January 03, 2006 3:10 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails-spinoffs] Status of Prototype But if we''d take that approach in building every framework, we''d get nowhere regarding component-based reuse. Don''t you guys want a solution for this, once and for all times? regards, Martin On 1/3/06, Ryan Gahl <Ryan.Gahl-nlycWCgr5/vuufBYgWm87A@public.gmane.org> wrote:> Hmm, yes, hadn''t thought of that part. I, too, use script.aculo.us(and> rico). I don''t know then, maybe Dojo is the answer for you Martin.I''ve> only run into a collision with prototype once so far (some otherlibrary> tried to define a function called Hash, so since I didn''t need 2 > definitions in my implementation, I canned the other one.) I justthink> of it like this, the collective combination of libraries loaded intoan> application or a page results in a single "namespace"... mine. I dowhat> it takes to make sure necessary frameworks work together. It''s the > nature of the beast. > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of > Michael Peters > Sent: Tuesday, January 03, 2006 2:58 PM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Cc: mmarinschek-1oDqGaOF3Lkdnm+yROfE0A@public.gmane.org > Subject: Re: [Rails-spinoffs] Status of Prototype > > > > Ryan Gahl wrote: > > Still not understanding why you don''t just apply your ideas to your > > implementation of prototype.js? Just because it''s not in any kind of > > official release doesn''t mean you can''t add prefixes to your copy.And> > the prototype library is small enough that if you ever need toupgrade> > it, it''s not going to take you that long to re-apply the prefixes. > > I personally think this is also a mess. Not only does it mean that you > have to > edit your copy of the prototype lib, but you also have to edit anyother> libraries that may depend on it (script.aculo.us, rico, etc) and he > would also > have to create special docs for his users, etc. Not alot of fun. > > > I''m afraid you''re looking for the perfect solution, which I''m afraid > > does not exist. I''ll bet in the long run it''s a better choice tostick> > with prototype.js and use your prefix idea rather than spend all the > > time to convert to dojo which may not even solve your problem... ButI> > don''t know your project like you do I guess. > > Even if Ajile doesn''t work for everyone, it might work for him (evenif> it does > add some overhead). > > -- > Michael Peters > Developer > Plus Three, LP > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > The information transmitted in this electronic mail is intended onlyfor the> person or entity to which it is addressed and may containconfidential,> proprietary, and/or privileged material. Any review, retransmission, > dissemination or other use of, or taking of any action in relianceupon,> this information by persons or entities other than the intendedrecipient> is prohibited. If you received this in error, please contact thesender and> delete the material from all computers. > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >-- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Michael Peters wrote:> > Martin Marinschek wrote: > >>Ok, >> >>if you guys agree, then I would really think that we should try to get >>this into prototype. Why should each and every user necessarily do >>this if it could fixed by the framework itself? > > > I wasn''t saying that the frameword should do it. I was just complaining about > the lack of namespaces in Javascript. I think that adding a ''protoType_'' > extension to every method call and class name would be tedious and ugly (and > would give me PHP nightmares). > > Maybe something like Ajile? http://en.wikipedia.org/wiki/AJILESomething else that''s worth looking at is JSAN (http://openjsan.org/doc/c/cw/cwest/JSAN/0.10/lib/JSAN.html) which is part of the OpenJSAN project to create something similar to Perl''s CPAN for Javascript. This library tries also give namespaces and library path look functionality to Javascript similar to most other major languages. Not sure how big of a change it would be for Prototype. But from other posts I don''t think it''s a problem that can be solved without making changes to Prototype. -- Michael Peters Developer Plus Three, LP
Werner Punz wrote:> The most famous example being the struts client side validation which > basically was disabled by this, to my knowledge. > I know this problem has been fixed. But one of the main critique points > by the main critique was, that there are still many of those extensions > which could cause potential breakage.For my own education, could you point to a resource that lists, or discusses what these potential breakages could be and what would cause them within a library/framework such as prototype? Danilo
danilocelic wrote:> Werner Punz wrote: > >> The most famous example being the struts client side validation which >> basically was disabled by this, to my knowledge. >> I know this problem has been fixed. But one of the main critique points >> by the main critique was, that there are still many of those >> extensions which could cause potential breakage. > > > For my own education, could you point to a resource that lists, or > discusses what these potential breakages could be and what would cause > them within a library/framework such as prototype? > > Danilohttp://lists.rubyonrails.org/pipermail/rails-spinoffs/2005-September/000827.html that is the famous struts problem caused by having Object extended. Unfortunately if you check the prototype code, it messes in other places around as well. (Array for instance being one rather uncritical one, also String and others, but still a huge potential for breakage) The Object extension bug is already fixed btw.
For just a simple example of what I think Werner was talking about, consider the following snippet (o is any Object). By messing around with the prototype of the built-in "Object" object, the number of and types of variables "p" in the below snippet have been changed. In some cases this will cause problems, especially in libraries that do that sort of iteration. For that reason, prototype hacking is generally frowned upon, however.. these types of issues can be identified and fixed fairly easily, and again IMHO (for my project), the benefits of the prototype.js library outweigh these negatives. Having said that, it''s not perfect and I will eventually evaluate Dojo in light of all the recent posts about it. for (var p in o) { alert(o[p]); } -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of danilocelic Sent: Tuesday, January 03, 2006 4:39 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails-spinoffs] Re: Status of Prototype Werner Punz wrote:> The most famous example being the struts client side validation which > basically was disabled by this, to my knowledge. > I know this problem has been fixed. But one of the main critiquepoints> by the main critique was, that there are still many of thoseextensions> which could cause potential breakage.For my own education, could you point to a resource that lists, or discusses what these potential breakages could be and what would cause them within a library/framework such as prototype? Danilo _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs The information transmitted in this electronic mail is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers.
Well exactly, and in case of earlier prototype versions the array was broken that way, now if another library used for(var p in anarray) the for iterated wrongly. Hence the code breakage of the struts validation (I was not aware of this myself until someone pointed me towards it a few weeks ago) As I said all these problems are solvable and probably not really huge issues if you are in your own application space but we talk here about base component libraries, used by probably thousands of people worldwide in the future. I am not sure anymore if it is a good idea of introducing a library which messes around with such fundamental things. (As I posted before, Object is not an exception but more the rule, because prototype messes around with various other base objects as well) As I said before to me the namespace problem is less problematic (although having namespaces preallocated for ${} Form etc... is not too nice either) but the basic object altering probably is more critical if you try to use prototype in a somewhat unknown environment (where you cannot be sure which lib comes along) Ryan Gahl wrote:> For just a simple example of what I think Werner was talking about, > consider the following snippet (o is any Object). By messing around with > the prototype of the built-in "Object" object, the number of and types > of variables "p" in the below snippet have been changed. In some cases > this will cause problems, especially in libraries that do that sort of > iteration. For that reason, prototype hacking is generally frowned upon, > however.. these types of issues can be identified and fixed fairly > easily, and again IMHO (for my project), the benefits of the > prototype.js library outweigh these negatives. Having said that, it''s > not perfect and I will eventually evaluate Dojo in light of all the > recent posts about it. > > for (var p in o) > { > alert(o[p]); > } > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of > danilocelic > Sent: Tuesday, January 03, 2006 4:39 PM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Re: [Rails-spinoffs] Re: Status of Prototype > > Werner Punz wrote: > > >>The most famous example being the struts client side validation which >>basically was disabled by this, to my knowledge. >>I know this problem has been fixed. But one of the main critique > > points > >>by the main critique was, that there are still many of those > > extensions > >>which could cause potential breakage. > > > For my own education, could you point to a resource that lists, or > discusses what these potential breakages could be and what would cause > them within a library/framework such as prototype? > > Danilo > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > The information transmitted in this electronic mail is intended only for the > person or entity to which it is addressed and may contain confidential, > proprietary, and/or privileged material. Any review, retransmission, > dissemination or other use of, or taking of any action in reliance upon, > this information by persons or entities other than the intended recipient > is prohibited. If you received this in error, please contact the sender and > delete the material from all computers.
nod -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Werner Punz Sent: Tuesday, January 03, 2006 5:04 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: [Rails-spinoffs] Re: Status of Prototype Well exactly, and in case of earlier prototype versions the array was broken that way, now if another library used for(var p in anarray) the for iterated wrongly. Hence the code breakage of the struts validation (I was not aware of this myself until someone pointed me towards it a few weeks ago) As I said all these problems are solvable and probably not really huge issues if you are in your own application space but we talk here about base component libraries, used by probably thousands of people worldwide in the future. I am not sure anymore if it is a good idea of introducing a library which messes around with such fundamental things. (As I posted before, Object is not an exception but more the rule, because prototype messes around with various other base objects as well) As I said before to me the namespace problem is less problematic (although having namespaces preallocated for ${} Form etc... is not too nice either) but the basic object altering probably is more critical if you try to use prototype in a somewhat unknown environment (where you cannot be sure which lib comes along) Ryan Gahl wrote:> For just a simple example of what I think Werner was talking about, > consider the following snippet (o is any Object). By messing aroundwith> the prototype of the built-in "Object" object, the number of and types > of variables "p" in the below snippet have been changed. In some cases > this will cause problems, especially in libraries that do that sort of > iteration. For that reason, prototype hacking is generally frownedupon,> however.. these types of issues can be identified and fixed fairly > easily, and again IMHO (for my project), the benefits of the > prototype.js library outweigh these negatives. Having said that, it''s > not perfect and I will eventually evaluate Dojo in light of all the > recent posts about it. > > for (var p in o) > { > alert(o[p]); > } > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of > danilocelic > Sent: Tuesday, January 03, 2006 4:39 PM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Re: [Rails-spinoffs] Re: Status of Prototype > > Werner Punz wrote: > > >>The most famous example being the struts client side validation which >>basically was disabled by this, to my knowledge. >>I know this problem has been fixed. But one of the main critique > > points > >>by the main critique was, that there are still many of those > > extensions > >>which could cause potential breakage. > > > For my own education, could you point to a resource that lists, or > discusses what these potential breakages could be and what would cause > them within a library/framework such as prototype? > > Danilo > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > The information transmitted in this electronic mail is intended onlyfor the> person or entity to which it is addressed and may containconfidential,> proprietary, and/or privileged material. Any review, retransmission, > dissemination or other use of, or taking of any action in relianceupon,> this information by persons or entities other than the intendedrecipient> is prohibited. If you received this in error, please contact thesender and> delete the material from all computers._______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Werner Punz wrote:> Well exactly, and in case of earlier prototype versions > the array was broken that way, now if > another library used for(var p in anarray) the for > iterated wrongly.Thanks for the follow ups Ryan and Werner. Werner, are you saying that folks use a "for in" loop to iterate over the elements within an array? If so, I''m surprised that anyone would think that a for() loop over the elements in an array would be the same thigns as looping over the properties of an object. Or am I misunderstanding the issue?> As I said before to me the namespace problem is less problematic > (although having namespaces preallocated for ${} Form etc... > is not too nice either) > but the basic object altering probably is more critical if you > try to use prototype in a somewhat unknown environment (where you > cannot be sure which lib comes along)I''m not sure which side of the fence I sit at this time, while I can understand that library maintainers should practice denfesive coding techniques to prevent clashes, I can also see that having the flexibility to have base objectys adorned with commonly needed and very useful methods. I think I have a bit of reading and thinking ahead of me. Danilo Celic
Danilo Celic wrote:> I can also see that having the flexibility to have base objectysadorned> with commonly needed and very useful methods.I totally agree.> I think I have a bit of reading and thinking ahead of me.Me too. =) -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of danilocelic Sent: Tuesday, January 03, 2006 5:47 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails-spinoffs] Re: Status of Prototype Werner Punz wrote:> Well exactly, and in case of earlier prototype versions > the array was broken that way, now if > another library used for(var p in anarray) the for > iterated wrongly.Thanks for the follow ups Ryan and Werner. Werner, are you saying that folks use a "for in" loop to iterate over the elements within an array? If so, I''m surprised that anyone would think that a for() loop over the elements in an array would be the same thigns as looping over the properties of an object. Or am I misunderstanding the issue?> As I said before to me the namespace problem is less problematic > (although having namespaces preallocated for ${} Form etc... > is not too nice either) > but the basic object altering probably is more critical if you > try to use prototype in a somewhat unknown environment (where you > cannot be sure which lib comes along)I''m not sure which side of the fence I sit at this time, while I can understand that library maintainers should practice denfesive coding techniques to prevent clashes, I can also see that having the flexibility to have base objectys adorned with commonly needed and very useful methods. I think I have a bit of reading and thinking ahead of me. Danilo Celic _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs The information transmitted in this electronic mail is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers.
danilocelic wrote:> Werner Punz wrote: > >> Well exactly, and in case of earlier prototype versions >> the array was broken that way, now if >> another library used for(var p in anarray) the for >> iterated wrongly. > > > Thanks for the follow ups Ryan and Werner. > > Werner, are you saying that folks use a "for in" loop to iterate over > the elements within an array? If so, I''m surprised that anyone would > think that a for() loop over the elements in an array would be the same > thigns as looping over the properties of an object. Or am I > misunderstanding the issue? >Well that is the problem the alteration of object also broke the for loop on the Array, because the basic prototype structures of every object in the system were altered. Similar issues could arise at other parts of the lib, the already fixed iterate over object (and therefore iterate over everything javascript object related) bug just was the most prominent showcase of those issues.> >> As I said before to me the namespace problem is less problematic >> (although having namespaces preallocated for ${} Form etc... >> is not too nice either) >> but the basic object altering probably is more critical if you >> try to use prototype in a somewhat unknown environment (where you >> cannot be sure which lib comes along) > > > I''m not sure which side of the fence I sit at this time, while I can > understand that library maintainers should practice denfesive coding > techniques to prevent clashes, I can also see that having the > flexibility to have base objectys adorned with commonly needed and very > useful methods. > > I think I have a bit of reading and thinking ahead of me. >As I said, it would be a non issue if you are in an application scope and have full control over what you do (which most rails programs are) but given the situation that the lib is intended to be introduced/used in a component set, which has to coexist with numerous other third party component sets issues like this can be crucial. For now I am still undecided to leave the stuff I have, which is based upon proto (which is not as much as martins) permanently in the sandbox until those issues are resolved or if I should move on to DOJO and forget about proto for now. So I have the same thinking process currently you want to start ;-)
On 3-Jan-06, at 4:40 PM, Michael Peters wrote:> Michael Peters wrote: >> Martin Marinschek wrote: >> >>> Ok, >>> >>> if you guys agree, then I would really think that we should try >>> to get >>> this into prototype. Why should each and every user necessarily do >>> this if it could fixed by the framework itself? >> >> >> I wasn''t saying that the frameword should do it. I was just >> complaining about >> the lack of namespaces in Javascript. I think that adding a >> ''protoType_'' >> extension to every method call and class name would be tedious and >> ugly (and >> would give me PHP nightmares). >> >> Maybe something like Ajile? http://en.wikipedia.org/wiki/AJILE > > Something else that''s worth looking at is JSAN > (http://openjsan.org/doc/c/cw/cwest/JSAN/0.10/lib/JSAN.html) which > is part of > the OpenJSAN project to create something similar to Perl''s CPAN for > Javascript. > > This library tries also give namespaces and library path look > functionality to > Javascript similar to most other major languages. Not sure how big > of a change > it would be for Prototype. > > But from other posts I don''t think it''s a problem that can be > solved without > making changes to Prototype.The JSAN project seems to have died, unfortunately. It actually already contains most of Prototype, though it''s based on an older version. But it wouldn''t solve the problem since it does exactly the same thing as Prototype does: extends standard objects and adds lots of stuff to the global namespace. L. -- Laurie Harper Open Source advocate, Java geek: http://www.holoweb.net/laurie Founder, Zotech Software: http://www.zotechsoftware.com/
Am 04.01.2006 um 00:54 schrieb Werner Punz:> Well that is the problem the alteration of object also broke the > for loop on the Array, because the basic prototype structures of every > object in the system were altered. > > Similar issues could arise at other parts of the lib, > the already fixed iterate over object (and therefore iterate over > everything javascript object related) bug just was the most > prominent showcase of those issues.Heya, The problem here is really not Prototype extending JavaScript built- in objects. JavaScript is a dynamic language and you''re not forbidden from extending the built-ins to become more programmer-friendly. It really all boils down to one thing (let the namespaces aside for now): The for-in loop. This is a language construct that iterates over all properties of an object. Because JavaScript is a dynamic language where you can add/change Object prototypes at all times, this construct doesn''t guarantee the kind of properties which are returned. According to the ECMAScript Language Specification: "Enumerating the properties of an object includes enumerating properties of its prototype". So the problem is that the for-in loop is just not used with that in mind when it''s called upon for stuff like iterating over the elements of an array. (sadly, the JavaScript "DontEnum" attribute can''t be set manuall, so it can''t be used to mask/hide individual properties (like the addtional functions on the Object prototype): "DontEnum: The property is not to be enumerated by a for-in enumeration"). IMHO, trying to not to use extensions for built-in objects (where they really make sense, see Prototype''s Enumerables) to avoid errors because of "misinformed programming" in other libraries is not using the JavaScript language for what it is. Note that even Brendan Eich, the "father of JavaScript" recommends that if you want extensions on built-in objects, than just do it (as it''s meant for that). (He also acknowledges the for-in loop problem and is in favor of adding something to the next Version of JavaScript so you can define DontEnum properties, that won''t show in for-in loops.) -Thomas
Thank you for the insight, Thomas. I think for my purposes, for what that''s worth, I will continue to use proto and manage the lib interop issues as I have been. At least, anyway, until I have some time to really put Dojo to the test. Good luck, Martin (and anyone else trying to do this stuff in an open environment)... it would be interesting to hear what comes of your situation, please keep us posted. -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Thomas Fuchs Sent: Wednesday, January 04, 2006 2:52 AM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails-spinoffs] Re: Status of Prototype Am 04.01.2006 um 00:54 schrieb Werner Punz:> Well that is the problem the alteration of object also broke the > for loop on the Array, because the basic prototype structures of every > object in the system were altered. > > Similar issues could arise at other parts of the lib, > the already fixed iterate over object (and therefore iterate over > everything javascript object related) bug just was the most > prominent showcase of those issues.Heya, The problem here is really not Prototype extending JavaScript built- in objects. JavaScript is a dynamic language and you''re not forbidden from extending the built-ins to become more programmer-friendly. It really all boils down to one thing (let the namespaces aside for now): The for-in loop. This is a language construct that iterates over all properties of an object. Because JavaScript is a dynamic language where you can add/change Object prototypes at all times, this construct doesn''t guarantee the kind of properties which are returned. According to the ECMAScript Language Specification: "Enumerating the properties of an object includes enumerating properties of its prototype". So the problem is that the for-in loop is just not used with that in mind when it''s called upon for stuff like iterating over the elements of an array. (sadly, the JavaScript "DontEnum" attribute can''t be set manuall, so it can''t be used to mask/hide individual properties (like the addtional functions on the Object prototype): "DontEnum: The property is not to be enumerated by a for-in enumeration"). IMHO, trying to not to use extensions for built-in objects (where they really make sense, see Prototype''s Enumerables) to avoid errors because of "misinformed programming" in other libraries is not using the JavaScript language for what it is. Note that even Brendan Eich, the "father of JavaScript" recommends that if you want extensions on built-in objects, than just do it (as it''s meant for that). (He also acknowledges the for-in loop problem and is in favor of adding something to the next Version of JavaScript so you can define DontEnum properties, that won''t show in for-in loops.) -Thomas _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs The information transmitted in this electronic mail is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers.
Ok, and what do you say about the namespace issue? That''s actually the one that is pressing me more, in contrast to Werner ;) regards, Martin On 1/4/06, Thomas Fuchs <t.fuchs-moWQItti3gBl57MIdRCFDg@public.gmane.org> wrote:> Am 04.01.2006 um 00:54 schrieb Werner Punz: > > Well that is the problem the alteration of object also broke the > > for loop on the Array, because the basic prototype structures of every > > object in the system were altered. > > > > Similar issues could arise at other parts of the lib, > > the already fixed iterate over object (and therefore iterate over > > everything javascript object related) bug just was the most > > prominent showcase of those issues. > > Heya, > > The problem here is really not Prototype extending JavaScript built- > in objects. > > JavaScript is a dynamic language and you''re not forbidden from > extending the > built-ins to become more programmer-friendly. > > It really all boils down to one thing (let the namespaces aside for > now): > > The for-in loop. > > This is a language construct that iterates over all properties of an > object. > Because JavaScript is a dynamic language where you can add/change > Object prototypes at all times, this construct doesn''t guarantee the > kind of > properties which are returned. > > According to the ECMAScript Language Specification: > "Enumerating the properties of an object includes enumerating > properties of its prototype". > > So the problem is that the for-in loop is just not used with that in > mind when > it''s called upon for stuff like iterating over the elements of an array. > > (sadly, the JavaScript "DontEnum" attribute can''t be set manuall, > so it can''t be used to mask/hide individual properties (like the > addtional functions on the Object prototype): > "DontEnum: The property is not to be enumerated by a for-in > enumeration"). > > IMHO, trying to not to use extensions for built-in objects (where > they really make sense, > see Prototype''s Enumerables) to avoid errors because of "misinformed > programming" > in other libraries is not using the JavaScript language for what it is. > > Note that even Brendan Eich, the "father of JavaScript" recommends > that if > you want extensions on built-in objects, than just do it (as it''s > meant for that). > (He also acknowledges the for-in loop problem and is in favor of > adding something to the next Version > of JavaScript so you can define DontEnum properties, that won''t show > in for-in loops.) > > -Thomas > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >-- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Ryan Gahl wrote:> Thank you for the insight, Thomas. I think for my purposes, for what > that''s worth, I will continue to use proto and manage the lib interop > issues as I have been. At least, anyway, until I have some time to > really put Dojo to the test. Good luck, Martin (and anyone else trying > to do this stuff in an open environment)... it would be interesting to > hear what comes of your situation, please keep us posted. >Actually for my components I probably will sandbox them for the forseeable future but will develop them further along with a disclaimer that there might be issues. Scriptaculous is simply too good to be omitted. Although Thomas answer as usual is excellent and basically gives a huge insight into this issue (quality stuff like all of his work), it is unsatisfying for the situation we face, in my opinion. The problem is, interfering with basic structures although allowed still is to critical for a base component set in my opinion, and having the iteration problem resolved in a future version of javascript means that we will se support for the fix in all major browsers around 2012 given the current speed of browser development :-( As I said all of this is a non issue in a normal application scope, but in a library scope, I get a bad feeling.
Dojo to my knowledge adds namespace prefixes... dojo.xxxx Martin Marinschek wrote:> I just saw that we kind of moved off the list, so I resent our > conversation to the list ;) > > As I see it (and I am by no means an expert, so correct me if I''m wrong) - > > conflicts (except some code does something really stupid) can only arise if > > 1) the same names are used for custom added methods of existing classes > 2) the same names are used for classes > 3) existing methods are overwritten with new functionality > > I''d say that 3) is no problem with prototype, right? > > So there remains 1 & 2, which could be fixed by adding a prefix to the > extension method and class names, if I see it right. > > e.g.: protoType_ > > That would get rid of all maintenance problems - how would it hinder > encapsulation, reusability and inheritance? > > Additionally, I wonder how other js-libraries (e.g. dojo) handle > things - obviously, there are less problems with those libraries, I''ve > been told on our mailing list. > > regards, > > Martin > > On 1/3/06, Ryan Gahl <Ryan.Gahl-nlycWCgr5/vuufBYgWm87A@public.gmane.org> wrote: > >>Well I guess if you''re going to use any library that makes any kind of >>changes whatsoever to the built-in javascript objects via prototype >>hacks, then you must take this level of due diligence in making sure >>that one library does not conflict with another. If all your libraries >>simply define their own custom objects and the only issue is that some >>of those objects are named similarly, then yes, by all means affix a >>namespace prefix and be done with it. However, if you choose to use >>prototype.js or (as I said) any other frameworks that modify the actual >>prototypes of built in javascript objects, then it is not as simple as >>applying a prefix. In that case you MUST be very aware of what each >>library is doing (as you should anyway), and take good care to resolve >>those conflicts. Remember, what you''re doing when you choose to use >>prototype.js (or a similar framework) is simulate a class-based object >>oriented language by hacking the semantics of a prototype-based object >>oriented language. Any way around it, we are hacking. As hackers, we >>have made the decision to sacrifice some things (maintenance ease), to >>gain some things (encapsulation, reusability, easier inheritance based >>programming). Until a new version of javascript is released that is >>fully type-safe and class-based (maybe never?), these are our options... >> >>-----Original Message----- >>From: Martin Marinschek [mailto:martin.marinschek-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org] >>Sent: Tuesday, January 03, 2006 11:25 AM >>To: Ryan Gahl >>Subject: Re: [Rails-spinoffs] Status of Prototype >> >>But that''s really a maintenance nightmare for you then, right? >> >>Shouldn''t the problem be easy to solve by adding some prefix to all >>object names and method names, and have all javascript libraries do >>that? >> >>Additionally, I am talking here as a committer to a web-development >>framework, and I really think we can''t force our users through this >>maintenance nightmare... Plus, our users brought up portlets as a >>topic as well - there is no way of ensuring this kind of compatibility >>in an environment like that, right? >> >>regards, >> >>Martin >> >>On 1/3/06, Ryan Gahl <Ryan.Gahl-nlycWCgr5/vuufBYgWm87A@public.gmane.org> wrote: >> >>>I indeed ran into the namespace problem... But I really don''t think >> >>you >> >>>need to abandon prototype because of it... You just need to develop >> >>and >> >>>apply a sound process for handling all your jScript libraries. I used >>>prototype as my baseline library. For any other frameworks that get >>>added to my projects I first check for any possible namespace >> >>collisions >> >>>(I always check new libraries for faulty code and optimization points >>>anyway so this is a fairly easy step, albeit tedious). If the new >>>library has any namespace contention problems, I simply rename those >>>functions and/or apply a new namespace (if possible). If the function >> >>is >> >>>in complete conflict with prototype or another library (or is >>>redundant), I have no problems just removing it altogether, carefully >>>making sure nothing gets broken and fixing anything that does. >>> >>>This can definitely lead to small problems with maintenance and >> >>upgrades >> >>>of these other libraries, but I''ve only really run into 1 instance of >> >>a >> >>>namespace collision. When it comes to javascript libraries though, I >>>really have no problems customizing them to fit my implementation >>>needs... just some food for thought. Remember, no matter how complex >> >>and >> >>>object oriented we make these libraries, they are still just scripts >>>(not compiled optimized binaries), so they are flexible and malleable. >>>Do what you need to do to them to make the whole thing work for you. >>> >>>-----Original Message----- >>>From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>>[mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of >>>Martin Marinschek >>>Sent: Tuesday, January 03, 2006 10:51 AM >>>To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>>Subject: [Rails-spinoffs] Status of Prototype >>> >>>Hi *, >>> >>>we are using prototype in Apache MyFaces as our javascript library of >>>choice. Recently, there has been much discussion on our mailing list >>>as to the usability of prototype in a dynamic environments where >>>several javascript libraries are used. >>> >>>The critics of prototype argue that the prototype objects are not >>>namespaced - and that prototype extends basic javascript-objects with >>>method names that could easily be duplicated by another framework. >>> >>>Is there a line of defense for prototype here that I can use? I really >>>don''t want to move everything over to dojo or some other library... >>> >>>regards, >>> >>>Martin >>>_______________________________________________ >>>Rails-spinoffs mailing list >>>Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>>http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >>> >>>The information transmitted in this electronic mail is intended only >> >>for the >> >>>person or entity to which it is addressed and may contain >> >>confidential, >> >>>proprietary, and/or privileged material. Any review, retransmission, >>>dissemination or other use of, or taking of any action in reliance >> >>upon, >> >>>this information by persons or entities other than the intended >> >>recipient >> >>>is prohibited. If you received this in error, please contact the >> >>sender and >> >>>delete the material from all computers. >>> >>> >> >> >>-- >> >>http://www.irian.at >> >>Your JSF powerhouse - >>JSF Consulting, Development and >>Courses in English and German >> >>Professional Support for Apache MyFaces >> >> > > > > -- > > http://www.irian.at > > Your JSF powerhouse - > JSF Consulting, Development and > Courses in English and German > > Professional Support for Apache MyFaces
Well, but this issue is already fixed in prototype, right? it was the Object.extend attribute - that is gone. the other extensions shouldn''t be a problem anymore, as far as I understand Thomas, except for _namespacing_ issues. And there we are again - _namespacing_ issues ;) regards, Martin On 1/4/06, Werner Punz <werpu-RbZlAiThDcE@public.gmane.org> wrote:> Ryan Gahl wrote: > > Thank you for the insight, Thomas. I think for my purposes, for what > > that''s worth, I will continue to use proto and manage the lib interop > > issues as I have been. At least, anyway, until I have some time to > > really put Dojo to the test. Good luck, Martin (and anyone else trying > > to do this stuff in an open environment)... it would be interesting to > > hear what comes of your situation, please keep us posted. > > > Actually for my components I probably will sandbox them for the > forseeable future but will develop them further along with a disclaimer > that there might be issues. > Scriptaculous is simply too good to be omitted. > > Although Thomas answer as usual is excellent and basically gives > a huge insight into this issue (quality stuff like all of his work), it > is unsatisfying for the situation we face, in my opinion. > > The problem is, interfering with basic structures although allowed still > is to critical for a base component set in my opinion, and having the > iteration problem resolved in a future version of javascript means that > we will se support for the fix in all major browsers around 2012 given > the current speed of browser development :-( > > As I said all of this is a non issue in a normal application scope, but > in a library scope, I get a bad feeling. > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >-- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
I have to recheck the latest code version, yes object.extend was very critical, the other stuff as far as I can remember was not as crictical (Array was fixed to the ecma specs, some additions to String etc...) Still potential for breakage though, only the future will tell how critical those extensions are. Martin Marinschek wrote:> Well, > > but this issue is already fixed in prototype, right? > > it was the Object.extend attribute - that is gone. > > the other extensions shouldn''t be a problem anymore, as far as I > understand Thomas, except for _namespacing_ issues. > > And there we are again - _namespacing_ issues ;) > > regards, > > Martin > > On 1/4/06, Werner Punz <werpu-RbZlAiThDcE@public.gmane.org> wrote: > >>Ryan Gahl wrote: >> >>>Thank you for the insight, Thomas. I think for my purposes, for what >>>that''s worth, I will continue to use proto and manage the lib interop >>>issues as I have been. At least, anyway, until I have some time to >>>really put Dojo to the test. Good luck, Martin (and anyone else trying >>>to do this stuff in an open environment)... it would be interesting to >>>hear what comes of your situation, please keep us posted. >>> >> >>Actually for my components I probably will sandbox them for the >>forseeable future but will develop them further along with a disclaimer >>that there might be issues. >>Scriptaculous is simply too good to be omitted. >> >>Although Thomas answer as usual is excellent and basically gives >>a huge insight into this issue (quality stuff like all of his work), it >>is unsatisfying for the situation we face, in my opinion. >> >>The problem is, interfering with basic structures although allowed still >>is to critical for a base component set in my opinion, and having the >>iteration problem resolved in a future version of javascript means that >>we will se support for the fix in all major browsers around 2012 given >>the current speed of browser development :-( >> >>As I said all of this is a non issue in a normal application scope, but >>in a library scope, I get a bad feeling. >> >>_______________________________________________ >>Rails-spinoffs mailing list >>Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >> > > > > -- > > http://www.irian.at > > Your JSF powerhouse - > JSF Consulting, Development and > Courses in English and German > > Professional Support for Apache MyFaces