Introduction
This is one little book containing three little books: one about HTML/CSS frameworks, one about HTML/CSS coding guidelines, and one about website quality control.
These books have all been published before, in 2015 and 2016, by the same author (me, Jens), but with a different publisher, OReilly. You can still access the originals: The Little Book of HTML/CSS Frameworks, The Little Book of HTML/CSS Coding Guidelines, and The Little Book of Website Quality Control.
But just as OReilly was so kind to allow me to publish a German translation of The Little Book of HTML/CSS Frameworks back in 2019, they now also allowed me to re-publish these books on my own. I asked about this because I like to maintain books, to keep them alive for a little while, and the three little books in question had been aging.
This Little Book of Little Books does not mean new editions of the three books. For a start, its much the same content as before. (Thats why the cover proudly points back to 2015.) But in the spirit of keeping books alive, there were some improvements: All links should again be working (if only to point to the Internet Archive), some wording has been made clearer, and my editor and I applied a bit of polish (thank you, Kirsty). There has been one regression: For this combined edition, I left out the forewords, by the venerable Eric Meyer, Lindsey Simon, and Kevin Khaw. I did so because this version is these books afterlife, something we didnt take into account when we worked on the original editions.
When I say start I cannot yet promise where the journey goes. Im likely to improve this three-in-one book further, and maintain it as mentioned. (On some platforms where you get this book youre able to download updated versions, if not receive them automatically.) Whats likely is that at some point, Ill rewrite and republish one, two, or all three of the Little Books. I admit that I hadnt done my best with The Little Book of Website Quality Control, which has turned into a badly aging (though now improved) replica of UITest.com. On the other hand I believe that The Little Book of HTML/CSS Frameworks is an underrated book on the topic of frameworks that deserves sustenance and additional pages.
With all three books it shows that they were written years ago. The Little Book of HTML/CSS Frameworks was written during a time when frameworks were used by linking to their style sheets; The Little Book of HTML/CSS Coding Guidelines was written when there was little tooling to format code automatically; and The Little Book of Website Quality Control was written when there were few automated testing options.
Yet while the world of web development has moved on, I like to offer the following view: What has changed the most are our technical standards (and their features), as well as our tooling. When you look at the craft, however, not that much is different. And here, from a craft point of view, you may find the most value in this book.
Jens
The Little Book of HTML and CSS Frameworks (2015)
Dedicated to the Google Webmaster Team under Dennis Hwang
Introduction
Many commercial websites these days are based on frameworks, and many personal websites use them, too. Yet what are frameworks, why and when do we need them, and how do we best use or build them?
This little book explores frameworks that govern HTML and CSS (and JavaScript) code. It focuses on HTML and CSS because these are at the heart of every web project. The principles outlined in the book, however, can also apply to other forms of frameworks.
The goal of the book is to share solid, higher-level ideas around frameworks, trading some specificity for long-term usefulness. We could analyze all the different frameworks that are out right now, but if you wanted to make up your own mind or write a framework yourself, how useful would such review be if you picked this book up again in five years?
While the book attempts to cover all bases, it glosses over some of them, too. Web development has become a large field. Also, as well see shortly, framework development pivots around tailoring, and tailoring depends on circumstances. We dont know every projects circumstances, so we cant generalize everything.
Although written in simple language, the book is geared toward expert web developers; the people who decide whether to use a framework, how to use it, and whether to develop one.
It has likewise been written by a web developer. I, Jens, have during my career architected frameworks for OPEN KNOWLEDGE, GMX, Aperto with their government and business clients, as well as Google. In that time, I havent managed to outwit the fast pace of our industry, but Ive found that some principles, methods, and practices contribute to longer-lasting code. That has benefited the frameworks I wrote, and I hope it will benefit you through this book, too.
Acknowledgments
Id like to thank the following people for their help with this book: Tony Ruscoe for reviewing and advising to the first draft. Asim Janjua, my good friend, for sharing some of his thoughts. Eric Meyer for the generous foreword [for the original edition]; if it wasnt for Erics work, a huge part of the web development world would look grim today, technically speaking. Simon St.Laurent and Meg Foley for guiding the book down the right track at OReilly. The OReilly staff, particularly Kristen Brown, and the many other friendly, supportive people involved in making this information accessible and enjoyable. Julia Tang for her always loving support. The W3C and WHATWG groups, the Google Webmaster Team, and the people Ive worked with over time who made me a better web developer. Thank you.
Key Concepts
Before we dive into frameworks, lets first go over a few general ideas. We dont have to agree on everything; all we want is to prevent misunderstandings over the course of this book.
First, there are a handful of terms that may be used differently in other contexts:
- External (also known as public or open): Anything that comes from outside ourselves or our organization and is out of our control. In web development, social site widgets or frameworks are often external.
- Internal (or in-house): Anything that originates from within our organization and is within our control. In web development, site designs, or site style sheets, are often internal.
- Pattern: A classical design pattern. In web development, the individual elements of a document or app are patterns, but so are document types like a three-column article page.
- Cost: A measure of any negative consequence. Typically expenditures of work, time, or money, but possibly negative changes in, for example, perception, satisfaction, or reputation. In web development, for instance, any element added to a page has a cost in terms of reduced page performance.
- Tailoring: The producing and adjusting to precise dimensions and needs. In web development, tailored code is the code thats needed by a project, but not more.
Second, some assumptions:
- Code has a cost. For example, theres the cost of development, performance, maintenance, documentation, process, quality, and conversion (though not all of them always apply, and not all of them affect the same groups). Unnecessary code has an unnecessary cost.