Chapter 4. Sencha Cmd

In Chapter 3, Application Structure, we described the nature of an Ext JS application as, essentially, a collection of HTML, JavaScript, and CSS. Just a web page. However, taking this point of view not only oversimplifies the issue, but it also means that your application won't reach its full potential; you'll be ignoring things like dependency management, code optimization, and many other matters that a high-quality application should incorporate.

Tip

Remember that application architecture, just like building architecture, isn't just about piecing together parts of a whole. It's about brick-and-mortar, the materials used in construction, and the methodology used to construct the final product.

Sencha Cmd can be an important part of architecting your project. It gives you a strong foundation, a smooth workflow, and a polished final product. In this chapter, we'll look at:

  • What Sencha Cmd actually is
  • Why Sencha Cmd is important in your development process
  • The way in which it helps you build an initial application template and then assists with adding new pieces of functionality
  • How it provides useful tools for the ongoing development process
  • The deployment process—producing optimized builds for various platforms and customizing the build process for more specific requirements

At the end of the chapter, you will understand how and why an application built with Sencha Cmd is significantly easier to develop and deploy. You'll have a strong understanding of the various parts of Sencha Cmd and how to configure and augment it to fit your requirements.

What is Sencha Cmd?

In short, Sencha Cmd is an executable that provides a series of further commands to assist with your Sencha application development. Under the hood, it comprises a number of third-party utilities and scripts that combine to provide this functionality. Here are a few of the things it bundles in its installation:

  • PhantomJS: This is used to manipulate web pages without using a browser interface
  • VCDIFF: This is a tool to work out the differences between a set of files
  • Closure Compiler: This is a tool to optimize and minify the JavaScript code
  • Jetty: This is a tool that provides a simple HTTP server

All of this is tied together with some custom glue from Sencha, supported by Apache Ant—a build tool commonly used in the Java world.

The result is a complex yet powerfully customizable tool. The use of Ant allows almost all of the features of Sencha Cmd to be tweaked and extended, while Sencha's additions provide a straightforward command-line interface to this power.

For the application architect, Sencha Cmd provides a centralized workflow for your developers and a reproducible build process. It can speed up development time and provides a way to add customer- or business-specific deployment tasks to your team's toolset.

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

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