Cookie Policy

We use cookies to personalize content and to analyze our traffic in order to protect our network. We also use cookies to improve our content. By clicking "Accept", or continuing to use our website, you are agreeing to the storing of cookies on your device, our Terms of Service and Privacy Policy.



Native JavaScript

Written by RentaServer Staff

July 21, 2020~4 min read

Native Javascript

In the past, browser capabilities were lacking and often times not uniform or standard. JQuery a bulky library, was essential for web development and creating fluid website experiences. However, as web technologies continued to progress and conventions continued to be adopted, various browsers have created a more robust general standard for browser capabilities. Today, native browser functionality can easily offer the same experience as JQuery but with better performance.

There has been a lot of talk among web development circles on the benefits of running a pure native JavaScript stack in a modern web development era. Web developers have claimed that developing in native JavaScript is fun and just as easy as developing with JQuery. After converting our stack… we can't help but feel that these sentiments are true.

One of the first things considered when we decided to convert our stack was choosing between between the React or Angular frameworks. In other words, choosing between Facebook or Google. This would have restricted us to more or less being followers of the current iteration of technological trend. While we are sure both frameworks are great platforms to develop on, we did not like either. It seemed more or less like picking and betting on the next web development fad. A fad which may only last for a few more years and is dependent on two, admittedly, behemoth sized corporations for upkeep and maintenance.

As a company that works with infrastructure as a platform, these options did not make much sense. From an architectural design perspective, there was also no reason to not design our platform at a lower architectural barebones level. Instead of being reliant on the next paradigm or framework in the pyramid of web development dependencies.

Not choosing React or Angular usually still means developing with JQuery and requiring a few JQuery friendly libraries dependent on various JQuery versions. We thought better. Why not remove JQuery and JQuery UI (a pretty big library) as dependencies and just go native?

Web development is no longer in its infancy. As of today, many key native JavaScript features have already been included into the most popular and used web browsers. Pretty much everything can be styled with CSS3 and augmented with some native JavaScript. Everything save for a few things like scrollbars and calendars (IETF standard coming soon).

Switching to native JavaScript not only meant better and more specific code, a modular code footprint, faster loading times for first time users, but also faster performing web pages. If there were any errors with JQuery or JQuery UI, we did not have to dig through old code or wait for upstream for a solution. If there were any features we needed, we could build it ourselves or reuse a light-weight native JavaScript module. With faster loading times, a good webpacker, and cache busting, our users were effectively guaranteed to have a more homogeneous user experience. From a business perspective, it also meant a lower bounce rate due to overall faster page performance.

We were only using a very small subset of JQuery UI but the general performance difference was enormous.

  • A 3 MiB bundled and minimized JavaScript file reduced to less than 200 KiB
  • A total of 30 KiB of bandwidth transferred during web query after compression
  • A decrease in round-trip time by an average of 30 ms

Adding and compounding all of these performance boosts made the effort for the switch more than worth it.

Some developers may think about the DOM and native JavaScript and instantly balk at the idea of having to do things manually without the comfort of a familiar library. It was ridiculously simple to replace JQuery and JQuery UI and the features they offer with just a few lines of JavaScript and CSS. If your web application depends on JQuery or JQuery UI, we suggest giving native a try. It's pretty much what those libraries are built upon minus the old cruft. It may just be your cup of java. You would also be removing one more layer of frivolous and out-dated dependency from your end-product!

If you're looking for some native JavaScript tips and templates, take a look here. Some of our JavaScript libraries have also been made open source for the developing community.

Make Us Your Service Provider!

Build Service