PDA

View Full Version : build in mvc!



arunc
26 Dec 2011, 4:15 AM
hai all,

i have developed an mvc application in sencha touch 2.

Is it necessarily to build the application before i launch this??

How can i do the build??

mitchellsimoens
26 Dec 2011, 6:23 AM
Did you use the requires and uses (and the rest) while developing?

Before finishing a MVC app, you should do a build:


sencha create jsb -a index.html -p app.jsb3
sencha build -p app.jsb3 -d ./

arunc
26 Dec 2011, 6:30 PM
Can you explain those commands...What does it do?

mitchellsimoens
27 Dec 2011, 5:47 AM
sencha create jsb -a index.html -p app.jsb3

What this will do is create the jsb3 file that will be used to create the build. You point it to your app entry point (usually the index.html) and tell it what to name the jsb3 file. This will go through you app files and parse your requires/uses/views/models/stores/controllers arrays and create a dependency list in the order you need it to be in.


sencha build -p app.jsb3 -d ./

This is what will do the actual combining and minifying of the code based on the jsb3. You give it the name of the jsb3 file and the directory to place the files in.

These two steps could have been combined into one command but the benefit of leaving them separate is that you can edit the jsb3 file that will be used int he 2nd command. You probably won't do it much but it can be useful.

arunc
27 Dec 2011, 7:49 PM
Thanks Mitchell...