PDA

View Full Version : Using Sencha Cmd to create a new project.



spaque99
25 Jul 2013, 10:51 AM
Hi all,

I have been using ExtJS for a while and after attending Sencha Con last week, I am trying to see how we could convert some of our code to be able to use Sencha Cmd and be more in line with the suggested architecture.

Here is what our application is made of:

Two entry point to the application. Making two single-page sites (having their own index html)

Regular user site
Admin site
A common set of classes that both applications uses.

Reading the documentation, what I understood would fit my requirements would be to create a workspace with two apps and a common package.

All our classes have namespaces starting with WS.xxx.yyy and would like to avoid as much as possible to refactor the names.

So far I created a workspace WS and added a package core (this is how it is called WS.core.xxx.yyy), but not sure how I should continue the rest. Once I have the correct application setup, I would start moving my classes in the appropriate folders and building them as I go.

Anyone can recommend me an approach and if I am on the right track so far?

Thanks
Seb

jdflores
25 Jul 2013, 11:55 AM
Take a look at http://docs.sencha.com/extjs/4.2.1/#!/guide/command_workspace

After generating your workspace you can do :

sencha -sdk /path/to/ext generate app ExtApp /path/to/workspace/extApp

This would generate your app inside that workspace. You cd to your new folder named 'extApp' and can then run sencha app build as well as placing your app files.

You can repeat the process to generate more apps.