The simplicity of Rachel Andrew's "boilerplate"
Modern front-end web development is complex. While things have become simpler with broad support for standards in current web browsers, we now need to respond to an unpredictable range of browsing devices and contexts, sometimes requiring specific optimisation or adaptation.
The capabilities of browsers are also expanding in terms of the HTML, CSS and Javascript they support, meaning the potential and expectations of what can be done client-side are growing.
Progress is a good thing but can also be overwhelming. It seems that every day some newHotLibrary.js joins the array of frameworks, polyfills and shivs that need to be integrated into any self-respecting web project to address and exploit these challenges and opportunities.
Hence the apparent popularity of boilerplates and bootstraps: pre-packaged bundles of current best practice which can be dropped into the webroot of each new site or app.
Recently, yet another "HTML5 boilerplate" was released to the world by developer and author Rachel Andrew, but you won't find it on GitHub. Here it is:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
</body>
</html>
This is an extreme form of YAGNI, but as Max Kanat-Alexander makes clear in Code Simplicity, although you may well end up "needing it" (some if not all), the generic solution offered by the boilerplate may not be the best fit for your specific context and requirements, and could adversely affect performance and maintainability unnecessarily.
The point is: you won't know for sure until you come to address the specific problem. That's the time to apply a solution, not before.
Rachel Andrew: Stop solving problems you don't yet have
Comments