Re:Ask HN: Front-end “design patterns”?
by alanfalcon on Saturday March 07, 2015 @09:56PM
(#9164297)
These are so good. Thank you! Any advice on how I can immerse myself in resources like this short of stumbling across them on HN?
Terrific stuff. Thanks!
Thank 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?
Re:Ask HN: Front-end “design patterns”?
by philipwalton on Sunday March 08, 2015 @04:06AM
(#9164975)
Honestly, 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.
CSS Architecture http://philipwalton.com/articles/css-architecture/
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-jav...