Creating components using Sencha Cmd

It is possible to use Sencha Cmd to generate skeleton components. The most useful of these commands are those used to generate basic models.

Generating model skeletons

A model skeleton can be generated very easily using the Sencha Cmd Tool. The syntax is as follows:

sencha generate model ModelName [field1:fieldType,field2:fieldType…]

This command must be executed in the application root (the directory in which the app.js file is found). Note that there must not be any spaces in the comma-separated field listing. The company model skeleton can be generated by executing the following command:

sencha generate model Company idCompany:int,companyName:string

The final string for the companyName field is not strictly ...

Get Enterprise Application Development with Ext JS and Spring now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.