Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

JS library for class-based OO

I would like to use an existing JS library to write class-based OO code.

I know that some libraries (like jQuery and Ext JS) can't be used because they require the DOM/browser.

What else can I use?

My current solution is to create a custom MooTools file at http://mootools.net/core that includes only the Core, Class, and Class.Extras modules.

Is there a better way?

— asked May 4th 2010 by Donnie Tognazzini
  • js
  • library

2 Answers

  • Search for Dean Edwards "base.js" ;)

    — answered May 4th 2010 by Tobias Petry
  • If you're just looking for a clean "classical" style base class with the ability to define interfaces and an inheritence/extension structure, then base.js works really well. I did notice when trying to use Base2.js and Mootools-core that the Javascript parser throws back a number of warnings and doesn't much care for single-line conditionals and for-loops that lack curly-brackets or closures that lack an assignment. FWIW

    — answered June 2nd 2010 by Jean-Etienne LaVallee
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.