Framework Factory#
Framework factory is a tiny, well-designed and yet powerful factory framework for developing modern Object Oriented JavaScript based class libraries, frameworks and applications. Its pluggable architecture and amazing combination of tools (configuration handling, read-only members, events, properties, class inheritance, and much more) gives you enough power to create robust applications which are compatible with your favorite JavaScript library (jQuery, mooTools, underscore), and your favorite platform (Modern Browsers, NodeJS).
Following example shows how a simple farmework called myFramework is created.
Create a new Framework called myFramework through FrameworkFactory.create function. This function accepts configuration object.
var myFramework = FrameworkFactory;
Create new class called Person within myFramework namespace.
myFrameworkPerson = myFramework;
Create another class called myFramework.Employee which is derived from myFramework.Person.
myFrameworkEmployee = myFrameworkPerson;
Some applications of dummy framework myFramework.
var p1 = ;p1firstName = "Peter";p1lastName = "Parker";console; //Prints Peter Parker p1fullName = "Peter Thompson"; //Can't set read-only properties var e1 = 10;console; //Prints 10console; //Prints Salesconsole //Prints trueconsole //Prints trueconsole; //Prints the fullName loaded from the database.
Licence and Copyright
© 2011-2017 Maniar Technologies Private Limited, MIT license