In my last article, I shown you how you could run a Node project using Oracle JET. In this post I would use the project as a basis and talk about another interesting topic, optimization. There are many aspects how HTML based client-server applications should be optimized, but mostly comes down to two key points: minimize the number of request, and compress the server output to the client. In this article I will talk about how to achieve this with Oracle JET.
Today in Internet there are already a lot of articles talking about how to optimize web based applications. Oracle JET provides also a topic in the development guide, which you can follow here:
Basically all best practices you know about optimizing client HTML based application apply to Oracle JET as well. I would like to pick up my top 3, where you can get the best results:
#1 Reduce the number of HTTP Request (aka “The best HTTP request is the one you don’t have to do!”)
#2 Compress the output – gzip the content output to the client to reduce the bandwidth usage for faster load
#3 Use client/browser cache
The first two points are in our experience so far the most important. Even if you don’t use browser cache, if you reduce the number of resources required to load to render the page and compress the size of the loaded content to a minimum, your page will load fast. Best case you should have one request loading the page HTML markup, one CSS file request load and one JS request file load. You can go even further and for example if you know which resources you have to load for specific page hit, merge for example the CSS and JS code into the HTML page, so that you will have only one initial request, and then partially load the rest of the resources if required.
To make a example I will use the Oracle JET Quick Start Basic project. If you load the project into the browser you will realize following page footprint (46 Request and 1.8MB content to load): Read the complete article here.
For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.