3 ms·
While I agree that his jab at Drupal is off base, because I don't agree with this article in general. Drupal does make extensive use of classes in its templati
by valuegram 14y ago
While I agree that his jab at Drupal is off base, because I don't agree with this article in general. Drupal does make extensive use of classes in its templating system, so I can see why the author would have a problem with it.
I see the class functionality in the templating system as a benefit, and makes styling much easier, but for someone who dislikes classes, I can see why the author wouldn't like Drupal.
- rjknight 14y agoI think this issue generalizes to other content management systems. Drupal aims to allow users to create sites without needing to understand the underlying HTML, and most general-purpose Drupal modules produce class-heavy HTML because that is, once you understand the class naming conventions, relatively easy to style without needing to change the HTML structure. This represents a trade-off - 'uglier' HTML and extraneous CSS classes in return for a drastic reduction in development effort and the knowledge required to bootstrap a typical project. This trade-off makes sense if an in-depth knowledge of HTML is not your strong point (and even most web devs are not fully-fledged "front end developers" conversant with the finer points of the W3C's latest magnum opus), and if you would benefit from having a lot of boilerplate stuff (user registration, access control, content management, RSS, caching, RDF, email notifications, widgets/blocks, templating engine, etc.) for free. Sure, if you're willing to do all of that stuff yourself, you can ensure that no CSS class is wasted (or, indeed, no CSS class is used at all). But most people can't make that trade-off, and even those who can would struggle to justify it beyond the most trivial or superficial projects. The best solution is probably to take a framework and modify its output to look the way you want it to. That's why the swipe at Drupal is odd, as pretty much everything Drupal does can be modified via hooks (kinda like AOP) and templates.