I am architecting a Sencha Touch project. Sencha Touch command line lets you create controllers, views, models, stores but there is no standard way to architect the project. I want to place all my routes in one file, say app.routes.js. Main controller to load views in one file, say mainController.js in which I want to write code to load different views.
Also I want to keep all templates in one file for ease of UI designers in one file, say app.templates.html so that I can append template file to document head on load and access different layouts and views using standard jQuery. I went through different answers but didn't find any relevant answer.
Here's how am implementing routers-
Ext.Viewport.setActiveItem({xtype : 'main'});
break;
case '#_login':
Ext.Viewport.setActiveItem({xtype : 'login'});
break;
case '#_terms':
Ext.Viewport.setActiveItem({xtype : 'terms'});
break;
case '#_exams':
Ext.Viewport.setActiveItem({xtype : 'exam'});
break;
case '#_enrollments':
Ext.Viewport.setActiveItem({xtype : 'enroll'});
break;
case '#_examdetails':
Ext.Viewport.setActiveItem({xtype : 'exammaterials'});
break;
case '#_enrollmentdetails':
Ext.Viewport.setActiveItem({xtype : 'enroll'});
break;
case '#_mapdetails':
Ext.Viewport.setActiveItem({xtype : 'mapview'});
break;