2021 Fillmore Street #1128

}

24/7 solutions

Top 10 Cloud Providers

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

What is Tigera?

What is Tigera?

An AWS Advanced Technology Partner, Tigera delivers Calico and Calico Enterprise for security and networking on EKS, both of which are AWS Containers Competency certified.

How Mobile Apps Integrate with the Back-End

How Mobile Apps Integrate with the Back-End

Mobile Apps Integrate – The professional developer with expertise in the Back-End is responsible for developing the internal layer of the system, all coding involving the database, executing the website’s functionalities and processing the data obtained from the Front-End.

Free AWS Services List

Download this FREE list of all 200+ AWS services and ensure that you're using the optimal services for your use case to enhance efficiency and save money!

Free AWS Business Continuity Plan Template

Make sure you have the proper business continuity plan explicitly for you AWS infrastructure. our professionals built this template using AWS best practices so you can ensure it's built to scale! 

Free Cloud Migration Checklist

Without the proper cloud migration strategy, you risk losing time and money. Ensure that your migration process is running smoothly with our FREE cloud migration checklist.

Free AWS Services List

You might be optimizing with the wrong AWS services. Download this FREE list of all 200+ AWS services and ensure that you're using the optimal services for your use case to enhance efficiency and save money!

Download your FREE AWS Business Continuity Plan Template
Download Free 200+ AWS Services Checklist
Download our 10-Step Cloud Migration ChecklistYou'll get direct access to our full-length guide on Google Docs. From here, you will be able to make a copy, download the content, and share it with your team.