3 ms·
It creates 0 technical debt That’s a bit of a stretch. The current version of HTML5 Boilerplate includes several things in the header that probably aren’t exa
by Chris_Newton 13y ago
It creates 0 technical debt
That’s a bit of a stretch.
The current version of HTML5 Boilerplate includes several things in the header that probably aren’t exactly what you want, particularly if you’re supporting mobile devices.
It loads 4 distinct JS files. One of those is Modernizr, which is loaded at the top of the page and will therefore block, and there’s a custom class on the HTML element to go with it.
It loads 2 distinct CSS files.
It inherently has potential security and privacy issues that come from using any third party servers, in this case Google Analytics and attempting to load jQuery from their CDN.
Likewise, it has dependencies on some third party scripts, both Modernizr and the ones for Google.
And it contains an unprofessional nag message for users of IE8.
This is not a criticism of HTML5 Boilerplate. All of the defaults mentioned above might be a good fit for some projects, even many projects. However, none of them will be suitable for all projects, so the moment you start from HTML5 Boilerplate you almost certainly have some technical debt to pay off, just like any other template or framework or scaffolding system.
- Gigablah 13y agoYour points sound suspiciously like premature optimization... and I'd argue that is exactly what you DON'T need.
- Chris_Newton 13y agoHow did only adding parts that are relevant to the current project become some sort of “optimization”? There is more work to do if you start from someone else’s boilerplate that has lots of parts you don’t want, because you have to actively delete things that you need to replace or just don’t need at all. In any case, some of the defaults in HTML5 Boilerplate can have real negative consequences if you just use it without fixing them. If your market will be using mobile devices a lot, or tends to have limited connection speed for any other reason, then making half a dozen extra requests before you even start doing anything interesting can have a significant impact on performance. Playing around with viewport settings can have significant adverse effects for usability if you don’t know what you’re doing. That little message about IE8 that isn’t going to show up on the recent browsers your developers usually use is going to get you in trouble with a client one day if you develop a lot of intranet sites and forget to remove it.
- jakobe 13y agoReducing the number of includes in the header is very much not premature optimisation. On a phone with poor connectivity, a single blocking Javascript in the header might cause a one second delay (or longer).
- tomasien 13y agoIE8 thing is bad because you'll never find it. It should be commented out as an example.