Framework is a collection of generic functionality in form of code which uses specific part written by developer to provide the solution.
Here are the steps for implementing the framework.
Write the classes, methods and functions in IIFE (Immediately Invoked Function Expression).
Raise the Error in methods which are suppose to be written in subclasses.
Expose the required classes, methods and functions to outside world.
1. Use the framework name to access the classes of the framework.
2. Implement the methods which are suppose to be written in subclasses.
Create a framework of development environment which can be used for developing specific development environment.
The framework will use namespace and only required classes will be exposed to outside world.
LinuxProject.prototype = new _DevEnv.Project();
We will write code of framework in Immediately Invoked Function Expression (IIFE) so that classes and functions of framework will be in that function scope.
We have global as parameter and passing this to function so global will have value of this. this is pointing to window object so global will be pointing window object.
We will raise the error in methods which are suppose to be written in subclass. Actually this is the way we are providing abstract method in framework. Developer will implement these methods in subclasses to provide the functionality of specific part of application.
Now we want to provide namespace. So we will have literal object _DevEnv. This object will have classes and functions to provide interface to outside world. It will expose only required one to outside world.
Now the framework _DevEnv is available which can be used in user file._DevEnv.js
We have the classes of framework and we want to use them. The developer will use the framework classes for writing the subclasses and will implement the abstract methods to provide the functionality of specific part of application.LinuxProject.js
We can use them in html file. First we have to write the framework file, then we can write user file.projectdemo.htm