Skip to content
thednp edited this page Apr 25, 2018 · 3 revisions

The Project

The Native JavaScript for Bootstrap project was born to help. It doesn't totally and perfectly replace all the functions the jQuery Plugins have for Bootstrap, but the essential tools. In many cases it performs much better than the original code, like an upgraded version of the original. At first sight, you wouldn't be able to notice any difference with the demos of the original plugins.

I've literally learned how to code native JavaScript developing the library. The project aims to help me and you transition into a better developer, doing things right from the next big project. The work on maintenance and improvements over time focus on ways to improve overall code quality, performance and usability.

Why Native JavaScript?

Today's most popular HTML5 framework is Bootstrap and like any other there's ups and downs. We all know about the PROs, but one of the CONs is the jQuery dependency. Why in the world would you ever drop jQuery? What can you put in it's place? The answer is this this: clean JavaScript code. All browsers support it and the latest trends indicate that jQuery is becoming less relevant.

The standards are now generally adopted and mobile platforms are "on the wave". The future brings more changes and we cannot fix-n-hack or hack-to-fix anymore via jQuery. Performance is the one and only true goal to follow, so if dropping jQuery and cleaning up the code is the way to go, we'll go for it. jQuery is still so cool and efficient but I feel it's too overpowered with it's cross-browser solutions. With the new JavaScript engines and HTML5 standards, really, why not code native code, it's really not that hard.

Really Write Less, Do More?

Why do I feel this sounds much too bold after only a few weeks of vanilla JavaScript? With the given JavaScript here and some CSS customizations you can now do alot more than jQuery with the original Bootstrap plugins. As I have shown here, I think I've completely blasted the "do more" myth.

If you forgot to check performance metrics, go ahead (there are lots more out there, plus a ton of guides on how to boost performance), there is also the page load speed issue I forgot to mention. Imagine you can be drastically improve the page load by dropping jQuery.

If we compare the size of jQuery v1.11.2 + Bootstrap v3.3.5 minified is just about 93Kb + 36Kb = 129Kb. Our library here is (depending on your browser) 4Kb + 20Kb = 24Kb, where 4Kb is the size of provided polyfill for legacy browsers (IE8+), mostly under 5kb for most used browsers via polyfill services. This library is only 6.6Kb gZipped!

Moving forward

It seems the Bootstrap core developers have given their green light for the creation of a Bootstrap distribution that's not dependent on jQuery after all.

What does this mean for the bootstrap.native project? Absolutely nothing to worry about, the project will continue to be maintained by the author and the community for it's unique implementations, lighter size, more flexible and probably better in some ways.

jQuery doesn't make sense after all these years. Finally.