PDA

View Full Version : How to load assets of a sencha ExtJS 4 multipage hybrid application from server



Ville Miekk-oja
6 May 2015, 11:56 AM
I have a Sencha 4.2.2 multipage application and am having performance issues with mobile devices. I have investigated the issue, and apparently evaluating the sencha framework code with every new page takes much time, which results into unresponsiveness.
The application is wrapped to native by phonegap/cordova. The wrapper contains a login screen, but after that, a childbrowser is opened, and the Sencha pages are loaded there straight from a server. Those same pages are used for loading the application in desktop browsers. The benefit is, that now the application is not required to be updated in app stores, but all the content comes straight from the server (except the login screen for phonegap mobiles).
The problem is, that mobile browsers do not evaluate the sencha js fast enough. What I would want to do, is to add the sencha framework into the native application, and then update the assets of the hybrid application straight from the server. This way there would be no need to jump from the webview to a childbrowser, which is worse for handling javascript. And then even Crosswalk browser could be taken into use. But, this would require that the application is transformed to a single page application.
Now I'm wondering, what would be the best/easiest way to do it? Remembering that currently the sencha codes are served as separate sencha applications. How could I make a cordova application udpdate the assets of a sencha application through server? And also in a way that maybe crosswalk could be integrated to the cordova? If possible, the optimal solution would work so, that the server would serve both the hybrid app assets and regular browser pages with same way. Because the sencha framework would be in the mobile hybrid app natively, there would be no need to load it there from the server. But for the regular browser app, that would be loaded. Do you understand what I mean?