Best Practices for Building Angular.js Apps
Jeff Dickey
51923

Jeff Dickey, I agree that nowadays requirejs is been widely misused, as happens with most of the js libraries and frameworks, once they get popular on the developers world, specially junior ones, they think they have to use it everywere or else they are doing things wrong. I also agree with your module definition and gulp tool.

However you’re approach is not always a good one. Its good when you have a small site with less than 200kb in js code, and downloading one 100kb js app is just a couple of seconds. But when you are dealing with big apps, with more than 1Mb of only “propietary” js code, this approach is the worst thing you can do. Specially taking into consideration that not every country in the world has fast broadband connections, and only a few users of the site in question need most of the functionality. Take facebook for example, where most of the users enter a lot of times per day, but use only some of the basic functionality, what will happen if everytime they access facebook the whole site’s js needs to be downloaded to their pc for them to just change their status and post a new picture.

Also, this approach and big sites is also overkill for browsers performance, which has been one of the common reasons of poor performance on angular sites.

So, although I like you’re article and how you introduced gulp’s tools, I don’t think its a good approach at explaining how to handle js files on big sites, and much less HOW and WHY “module loader” libraries such as requirejs should be used.