This article explains you through the process of using Sencha Cmd with the Sencha Ext JS applications. Sencha Cmd is using for building Sencha applications. It comes with a full set of life-cycle management features like scaffolding, code minification and production build creation that helps in completing your Sencha projects. Sencha Cmd is the backbone for building your Sencha Ext JS and Sencha Touch applications. In the other hand, Sencha Ext JS is the most comprehensive MVC like JavaScript framework that is used to build great featured web applications. Using Sencha Ext JS we can develop web applications for different plateforms like desktop, smartphones and tablets, etc.
Here, you will see how to create Ext JS application on windows platform. And before you start - you’ll need to setup the development environment for Sencha. We are using web browser, a web server and a text editor (or you can use any IDE for coding purpose). Here, we are using windows command prompt for creating Ext JS application and using local web server to run the
Now, follow the steps:
1. First of all download and Install Sencha Cmd for on windows platform and download the Sencha Ext JS zipped file and extract it to your comfortable location.
2. Now, to create custom Ext JS application open your windows command prompt and go to your Ext JS root directory (location you extracted Ext JS) and type the generate command.
Syntax : sencha -sdk (path/location of Ext JS) generate app (application name) (path/location where you want to generate your application)
Example : D:\> sencha -sdk 'd:\Sencha_Ext_JS\ext-6.0.2' generate app MyApp 'd:\Sencha_Ext_JS\MyApp'
[Screen Shot of the above command]
After that, you have successfully created your first Ext JS (MyApp) application.
Now, to run your MyApp web app deploy it using the below code (but in your command prompt goto the MyApp location then deploy the MyApp):
D:\cd Sencha_Ext_JS\MyApp
D:\Sencha_Ext_JS\MyApp\sencha app watch
[Screen Shot of the above command]
After that notice one thing, Sencha Cmd is now monitoring your application for changes. You can see a line of statement 'Waiting for changes...' in the command prompt, that is indicating that your application is up to date or monitoring changes on the files. Whenever you make changes and file save you will see the other messages printing, but these will end shortly with another 'Waiting for changes...' message.
That's it. You have successfully created and deployed MyApp application on the server. Now to run your MyApp Ext JS app go to your local-host with port number 1841 on your Chrome browser. like this: http://localhost:1841
Now, you can see your newly generated Ext JS application. It should look something like this:
[Happy Coding]
Leave Comment