3 ms·
This general topic comes up often, and the top reasons usually end up being: - JS development has a low barrier to entry, so there is a wide/diverse range of d
by mrozbarry 5y ago
This general topic comes up often, and the top reasons usually end up being:
- JS development has a low barrier to entry, so there is a wide/diverse range of developer skills and knowledge
- Most (webpack) tutorials don't cover build optimization, like tree-shaking, especially entry level, which is normally what people find to "just get the job done."
- There are too many options for frameworks for people to make _good_ decisions, so they often fallback to _popular_ decisions
This isn't even a recent problem. I have a few clients that wanted to use old-school template packages, like metronic, and that is a massive bloated build, and yet it's basically jquery+bootstrap with a handful of libraries.
The biggest thing is, as professional web developers, we have a responsibility to the end user to make a web page load fast and be usable quickly, and I think we often over-look that. I don't care if your framework is a no-build thing, or uses webpack/rollup/etc., the real thing is if a user doesn't have to download 50MB of javascript for a single page, especially if the end result of that page is considerably less than 50MB worth of text, styles, and images.
The flip side is, most clients just want their project done quickly so they can make money. There's nothing wrong with that, but it can't be at the expense of their users, and developers should be able to give good consultation and advice to their clients about the trade-offs of libraries/frameworks/build tools/etc. and the impact they will have on the end-users.
Personally, I like building without extra build tools. `script type="module"` is great, and smaller frameworks (my go-to is hyperapp, but there are several others) are often not awful to grab a local es6 copy and toss it in your public web directory, import it, and go to town.