0
votes

I have 100 different url's each pointing to plain html pages, I have to convert these plain html pages to extjs pages. Footer and Header is same for all the pages but center section is different for different plain html pages. In order to leverage maximum code I thought to create an EXTJS4.1.0 application which will have model, view, store and controller but separate index.html, app.js and viewport.js. The reason for separate index.html, app.js and viewport.js is that if I don't keep single index.html, app.js and viewport.js then I will not be able to bookmark the pages (Since users and using 100 different urls for 100 different pages) so basically I will have 100 different app.js and corresponding viewport.js (viewport.js will have common components for footer/header etc and specific components for screen) but at one point of time only one index.html, app.js and viewport.js will be active/run.

My first question is, is the solution I just mentioned a correct solution.

Is it true that in Extjs MVC pattern you can only have one Viewport.js file per application if you use autoCreateViewport: true.

Secondly if you use autoCreateViewport: false in Ext.Application (in app.js ) and create instance of different Viweport in launch method as follows:

Ext.application({
    name: 'Panda',
    autoCreateViewport: false,
    launch: function() {
        Ext.create('Panda.viewport.ViewportOne')
    }
});

Notice that I have created instance of ViewportOne which is one of 100 viewports. With this solution also I ran into glitches while running the application (some navigation will not work etc). Is it because extjs does not allow viewport with name such as Panda.viewport.ViewportOne, Panda.viewport.ViewportTwo etc.

How in Extjs I can create fully MVC style application with bookmarkable pages such that each page is part of same extjs application (ie it leverages same model view, store, controller and dynamic loading).

1
OMG, why do you actually need to convert them? Just use iframes / ajax requests. - o_nix
why don't you tell us your actual goal so we can help you prevent doing something very stupid? - Neil McGuigan

1 Answers

0
votes

The company I work for has lots of customers who are using an application which was build on plain html and javascript. Each uses works on only one page of that application which he has bookmarked on his browser. The task I am given is to upgrade those plain html/javascript pages to Extjs one such that uses dont have to update their bookmarks.

At my end I am thinking to create single application in Extjs 4.1.0 which will have 100 pages (index.html, indexOne.html etc which user will bookmark) each if which can use common Model/view/store and controller.

So basically my entry point to application will be different but all pages will be using same model/view/store/controller. Its more of an architectural question.

Hope this help.