a

Using JSBuilder to compress your Sencha Touch Apps

Joel Garcia Joel Garcia has been building AllCode since 2015. He’s an innovative, hands-on executive with a proven record of designing, developing, and operating Software-as-a-Service (SaaS), mobile, and desktop solutions. Joel has expertise in HealthTech, VoIP, and cloud-based solutions. Joel has experience scaling multiple start-ups for successful exits to IMS Health and Golden Gate Capital, […]

If you’re writing any sort of Sencha app, you must aggregate and minify the JavaScript using the JSBuilder utility. Unfortunately, the JSBuilder utility is cryptic.
You can download the JSBuilder here.
Once you get it installed, you need to build a jsb3 file. Don’t try to build the jsb3 file on your own. The easiest way to create the jsb3 file is to use the following JSBuilder sencha command.

1
sencha create jsb -a http://localhost:8080/YourPath/index.html -p C:YourPathindex_app.jsb3 -v

This command will generate a jsb3 file in the YourPath directory by munging the contents of your index.html.
Open up the jsb3 file. It will be json. You should see all of your javascript files plus the required ExtJs ones. Some of the dependencies in ExtJs are screwed up so if you’re bold you can remove the ones that don’t make any sense to make your payload smaller, e.g. Svg.js.
Every time you want to build a minified version of your ExtJs app, you’ll then want to then invoke the following bit of JSBuilder code to use your jsb3 file as the equivalent of a makefile, and spit out some compressed and obfuscated JavaScript.

1
sencha build -p C:YourPathindex_app.jsb3 -d C:YourPath -v

This will spit out a lovely all-classes.js and app-all.js. You will then want to place the app-all.js in your production directory.

Joel Garcia
Joel Garcia

Joel Garcia has been building AllCode since 2015. He’s an innovative, hands-on executive with a proven record of designing, developing, and operating Software-as-a-Service (SaaS), mobile, and desktop solutions. Joel has expertise in HealthTech, VoIP, and cloud-based solutions. Joel has experience scaling multiple start-ups for successful exits to IMS Health and Golden Gate Capital, as well as working at mature, industry-leading software companies. He’s held executive engineering positions in San Francisco at TidalWave, LittleCast, Self Health Network, LiveVox acquired by Golden Gate Capital, and Med-Vantage acquired by IMS Health.

Related Articles

AWS Graviton and Arm-architecture Processors

AWS Graviton and Arm-architecture Processors

AWS launched its new batch of Arm-based processors in 2018 with AWS Graviton. It is a series of server processors designed for Amazon EC2 virtual machines. The EC2 AI instances support web servers, caching fleets, distributed data centers, and containerized microservices. Arm architecture is gradually being rolled out to handle enterprise-grade utilities at scale. Graviton instances are popular for handling intense workloads in the cloud.

What is Tiered Pricing for Software as a Service?

What is Tiered Pricing for Software as a Service?

Tiered Pricing is a method used by many companies with subscription models. SaaS companies typically offer tiered pricing plans with different services and benefits at each price point with typically increasing benefits the more a customer pays. Striking a balance between what good rates are and the price can be difficult at times.

The Most Popular Cloud Cost Optimization Tools

The Most Popular Cloud Cost Optimization Tools

Cloud environments and their pricing models can be difficult to control. Cloud computing does not offer the best visibility and it is easy to lose track of which price control factors are having an impact on your budget. Having the right tools can help put value to parts of an environment and provide guides on how to better bring budgetary issues back under control.