3 ms·
This topic interests me as well, and I've written about many of these ideas in the past. They're not necessarily analogous to the GoF design patterns, but I thi
by philipwalton 12y ago
This topic interests me as well, and I've written about many of these ideas in the past. They're not necessarily analogous to the GoF design patterns, but I think they're similar in spirit. I hope you find them helpful.
CSS Architecture
http://philipwalton.com/articles/css-architecture/ http://philipwalton.com/articles/css-architecture/
Side Effects in CSS
http://philipwalton.com/articles/side-effects-in-css/ http://philipwalton.com/articles/side-effects-in-css/
Decoupling Your HTML, CSS, and JavaScript
http://philipwalton.com/articles/decoupling-html-css-and-javascript/ http://philipwalton.com/articles/decoupling-html-css-and-jav...
- alanfalcon 12y agoThese are so good. Thank you! Any advice on how I can immerse myself in resources like this short of stumbling across them on HN?
- blawa 12y agoThank you. I read them and they are exactly what I'm looking for. May I ask how you learnt this so that I can too?
- philipwalton 12y agoHonestly, at my previous company I worked as the sole front-end engineer on a team with mostly classically trained programmer types (all CS majors), and it started to become very obvious that the "traditional front-end best practices" for CSS weren't going to cut it for us. Most of the recommendations I make came from learning things the hard way. As a concrete example, early in my time at this job I needed to make a small CSS change in some template. I made the change, checked it in, and then like 50 tests started failing. I found it absolutely crazy that my changing such a trivial, visual thing would break so many functional tests, so I started suggesting that we not use the same classes for styling as we did for local hooks. I didn't know the word for it at the time, but there was clear coupling between our style and functional classes. Anyway, it was little things like that, over time, that helped be develop much of my philosophy on this stuff.
- blawa 12y agoThank you for taking the time to answer.
- airblade 12y agoTerrific stuff. Thanks!