View Full Version : JSBuilder for your application project.

25 May 2012, 11:20 AM
I hope this is the right place to post this question.

I am trying to compile my application as one js file and make it ready for deployment. After struggling for a bit I figured out how to create the jsb and use sencha build or Jsbuilder to create the single file with all the js files that are part of my project. I had to order the js files appropriately ..models first, stores next and then views and then finally controllers. Before anything app.js is included.

So then I switch to using this single file in my html file to be included and not the app.js. It worked great.

The only problem however is that the controller.js files are still retrieved from the sever via ajax calls at startup. Why is it not able to instantiate the controllers from the their definition in the single file I had create using the build. Is this expected behavior? it resolves the app path and makes the ajax calls to the controller.js files and i know this is happening as I can see the network calls.

Thanks for your help!

25 May 2012, 3:22 PM
Are you sure you have requires:[] where needed in your code?


29 May 2012, 7:08 AM
Yeah .all the required classes are invoked correctly out of the minified build..Its just the controllers that are invoked by first getting them using an Ajax call.

The controllers are setup in the Ext.Application's object's controllers array. Do I need to set them in a different way for them to not do the ajax requests?