Modularization Of The Netgem Application
Posted By : Deepak Gupta | 07-Feb-2014
Putting all the classes in distinct folder
Hello guys ,In this blog I tell how I modularized my netgem project .In modularizing the project there is some specific configuration that you should know The step to modularized the negem is given below:-
Thats our project structure-:
First I make a folders for each classes to keep them distinctly I also put their json files in that folders.
Now time to configure the location of these classes in index.html
You have to give the path like this -:
NGM.application.start({
MainForm: "MyListFormWidget",
Includes: ['./Mylistformwidget/MyListFormWidget.js','./myclass1/MyClass1.js','./myclass2/MyClass2.js','./myclass3/MyClass3.js','./myclass4/MyClass4.js','./utilANDthema/utils.js',],
Thema: {"file": "./utilANDthema/myThema.json"},
});
Includes: it includes all file which are outside the scope of main class . Thats our classes’s path configuration in index.html
Give the path configuration of our every json files of each classes
function MyClass1(config, options)
{
this.super(config, options);
this._lastFocusedInput = null;
var timer1;
var timer2;
}
MyClass1.inherits(FormWidget);
FormWidget.registerType("class1", MyClass1, "./myclass1/MyClass1.json");
………..(more code)
Give location of MyListFormWidget.json in MyListFormWidget.js file
FormWidget.registerType("MyListFormWidget", MyListFormWidget, "./Mylistformwidget/MyListFormWidget.json");
Thanks Deepak Gupta
Cookies are important to the proper functioning of a site. To improve your experience, we use cookies to remember log-in details and provide secure log-in, collect statistics to optimize site functionality, and deliver content tailored to your interests. Click Agree and Proceed to accept cookies and go directly to the site or click on View Cookie Settings to see detailed descriptions of the types of cookies and choose whether to accept certain cookies while on the site.
About Author
Deepak Gupta
Deepak is a bright Groovy and Grails developer