|
jsDelight is a smart JavaScript environment that acts as a solid base for interactive Web-Pages. It is build up completely object-orientated with full derive-capabilities. Beside useful basic objects, it gives full control to query dom-elements, and control them. The Concept behind jsDelightBasically jsDelight is an environment in which objects could be defined. It manages the complete class and derive functionality and emulates a "real" class behavior. Based on this it provides useful objects to query DOM elements, create ajax-requests and gives extensible prototypes for various controls, like visual controls (buttons, treeviews, tabcontrols..). Moreover it could be used as a framework which manages clipboard-, cookies-, timer-, notify-, or rewriting-functionalities. Referencing DOM-ElementsjsDelight acts as a bridge from JavaScript to the DOM-Elements - and backwards. It provides an easy way to find and reference dom-elements - just like jQuery does. var eMail = CF.$('#email');
var document = CF.$('document');
var window = CF.$('window');jsDelight provides several layers to manage platform independency. For instance, when referencing an element you will receive an adapter - not the element itself. CF.$('#hotbox').show();Object-Enhancement by derivingjsDelight allows the developer to declare own classes by deriving from others. The system creates default class-methods, like "create()", "free()", and the forward command "inherited()" to call the parent class-function. Example function student = () {
this.name = '';
}
p = CF.registerClass('student','cf_object');
p.create = function (name) {
this.inherited();
this.name = name;
}
p.sayHello = function () {
alert('Hello, its me: '+this.name);
}Now we are ready to create an instance of a student and let him say 'hello': var peter = student.create('peter');
peter.sayHello();
peter.free();
|