The best of the rest

We've barely touched the surface of what Sencha Cmd can do. We're looking at Sencha Cmd from the perspective of a highly interested architect, but an architect needs a strong awareness of the full stack of tools available to their developers. Let's do a whistle-stop tour of some of the features that Ext JS developers can use to ease their work on the details of an application.

Packages

Packages are a way of reusing code between projects. Sencha Cmd and Ext JS recognize packages as fleshed out concepts in the Sencha ecosystem, so developers should be aware that they're available for use. The workspace concept, which we discussed earlier, assists with development of packages, but they can be consumed at the application level, providing a tidy bundle of CSS, JavaScript, and other resources for an app to consume from a local or remote source.

Note

The Sencha documentation at http://docs.sencha.com/cmd/5.x/cmd_packages/cmd_creating_packages.html provides instructions on creating packages.

At an enterprise level, packages are a key method to provide reusable logic and user interface elements that can be shared between teams. Code reuse is something that needs to be considered at an architectural level to avoid reinventing the wheel, so packages can be an important tool when looking at the bigger picture.

Themes

There are two approaches to working with CSS and images in Ext JS: first there's the full-blown theme option in which you create a package of images, Sass files, and JavaScript customization to build an entirely bespoke look and feel for your application. In many cases, some minor tweaks to the standard Ext JS components combined with some extra styles for your own UI elements are all that are needed. In this case, Sencha Cmd provides sencha compass compile to transform Sass files into CSS that is included in your app. Don't forget that sencha app watch also takes care of this step automatically.

Compilations

Command's build process relies on a subcommand called compile, which is responsible for parsing the files that make up your application. This subcommand can be invoked independently and could be used to create a list of application dependencies that could be further processed by tools other than Sencha Cmd.

In the greater JavaScript ecosystem, there are a growing number of build tools (such as Grunt and Gulp) that your developers may be more familiar with. By using a small portion of Sencha Cmd's features, your team could continue to leverage these tools while working with the Ext JS framework.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset