Talking about awesome js frameworks that are not bloated… how do you guys use closure lib? (source)
When I first came to Medium I had an almost allergic reaction to the Google Closure Library. It felt huge and bloated and very Java-like. Today, after a year of working with it on a daily basis, my opinion is different. The library still feels Java-like but I don’t agree anymore that it is bloated.
I consider a library or a framework to be bloated when it micro-manages your app. Such library will dictate the minute details of how your code has to be written and organized. It will dictate how the pieces of your app have to interact with each other.
Closure, on the other hand, is very Node like (if Node was written by Java programmers). It gives you a way to define and load modules, and a big library of modules to use. If you want a nice PubSub mechanism, it has one. If you want a URL parsing library, it has one. But it doesn’t micro-manage the way you architect, structure, and implement your application. This part is entirely up to you. So while Closure library seems big and scary, you actually have more freedom with it than if you’d use a smaller but more opinionated framework.
As for the stuff you don’t need, Closure Compiler will remove all the dead code for you.