It has best, full-featured and fastest OOP engine you can find over the Internet. AJAX.OOP provides you with possibility write your own classes, use inheritance, polymorhysm mechanisms and gives possibility of extending and reusing existing code.
Latest release version: 1.0.4 - Sunday, September 07, 2008
// Native JavaScript style class definition function Car( color, type) { this.color = color; this.type = type; this.drive = function() { alert( 'Car::drive() called!'); }; this.init = function() { alert( 'Car::init() called!'); }; alert( 'Car::constructor() called!'); }; // AJAX.OOP-style class definition with inheritance var Suzuki = Ajax.Class( Car, //<- inherit class Car { // write definition of a child class: constructor : function( color) { this.$super.constructor( color, 'sedan'); //<- call parent constructor alert( 'Suzuki::constructor() called!'); this.$super.init(); //<- call another parent method }, drive : function() { //<- override parent method this.$super.drive(); //<- call parent method: alert( 'Suzuki::drive() called!'); }, turn : function( where) { alert( this.color + ' ' + this.type + ' suzuki has turned ' + where); } }); // instantiate object: var vehicle = new Suzuki( 'Red'); vehicle.drive(); vehicle.turn( 'left'); // check object hierarchy: alert( 'vehicle is instance of Car: ' + (vehicle instanceof Car)); alert( 'vehicle is instance of Suzuki: ' + (vehicle instanceof Suzuki));
In addition this core will help you handle AJAX requests of different types. The package contains functionality to handle classic requests on a single domain and crossdomain requests functionality. Learn more >>