Hi Greg, Prototype definitely helps with creating a Class based OO approach. http://prototypejs.org/api/class
Javascript, however, is a prototype (little p) based object oriented language, http://en.wikipedia.org/wiki/Prototype-based_programming not a functional language, http://en.wikipedia.org/wiki/Functional_programming_language and not a class based object oriented language. http://en.wikipedia.org/wiki/Class-based_programming Personally, I prefer to stick with the prototype (small p) object oriented programming because I find the class based development too bulky for 99% of my javascript needs. When I do need to work with some classes, I do use the Prototype Class.create. I highly recommend the small but very dense javascript book: Javascript: The Good Parts by Douglas Crawford which has an excellent discussion of this in it along with a ton of good javascript tips. Also, check out jslint.com and click around. Josh Powell On Feb 27, 3:43 pm, greghauptmann <[email protected]> wrote: > Hi all, > > I confess this is a newbie question in advance: > > Q1 - If one wants to build a set of higher level library functions in > javascript (e.g. to aid in drawing objects say) does Prototype assist > here? That is would it provide a framework, or a standard way of > building up JavaScript code with an OO like approach? > > Q2 - What would people recommend here for a set of higher level > Javascript functions that themselves may lend themself to being > modeled in a OO like fashion? i.e. in the javascript programming > world is this something you just would not consider trying to do (i.e. > and sticking with functional approach). > > Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---
