Monday, March 29th, 2010
CSS: Designers are doing AOP? No way!
<p>AOP? that is for whiz kids and Enterprise Java folk (or Lisp hackers have been doing it for years and years).Jonny Tran thinks that every time you use CSS, you’re doing Aspect-Oriented Programming”. He brings up the core parts and pieces behind AOP:

But what deeper AOP fun like the wormhole effect which has the coolest name :)
Ramnivas Laddad (pre-eminent AOPer) came back with:
You almost get wormhole with selectors such as “div * p”
Nice :)
Related Content:











He’s spot on. CSS for separation of concerns is laudable and correct – but a note of caution – over reliance on CSS trickery at the expense of well factored functional javascript is as dangerous as AOP overload.
1) CSS is not easily modularized. Even the best CSS developers organize their classes in a somewhat arbitrary fashion. There are no objects other than classes and rules and the concept of namespace is not clear.
2) Just like AOP, CSS acts (or might as well act for all we can fathom) orthogonally to the thread – it is not easy to debug.
3) CSS is easy to play with, very hard to master. There are very few CSS experts – and most of them are designers. Do developers go running to designers for help everytime the logic strays into CSS-land?
4) Javascript frameworks and best practices have done a good job of ironing out cross browser issues. CSS has much futher to go (and then there are vendor styles!)
@AngusC
For point 3, I think most experts are front end developers, not designers. Many designers spend so much time in Photoshop they barely keep up with HTML/CSS.
I take offense to not being able to be a whiz kid just because I like java :) I would actually say there are a bunch!
aop and html is similar in a way