An ExpressionEngine developer in Drupal - Part I

Although I still believe ExpressionEngine to be the best content management framework around right now, I'm becoming more of an agnostic in that regard.

Although I still believe ExpressionEngine to be the best content management framework around right now, I'm becoming more of an agnostic in that regard.

My majority of my work these days comes down to pure front-end development so I rarely have an input into the technology stack a website is built upon. Sometimes it's a bespoke solution (like the one used at Under Armour) or an enterprise CMS .

Lately though, I've been working on the front-end of Paul McCartney's new website (yes that Paul McCartney). It's going to be built with Drupal which I have no real experience with. I did look at it many years ago and remember at the time horrified at the styles and markup it output.

That's one of the reasons I fell in love with ExpressionEngine. It assumed nothing and gave me a blank canvas to craft my markup.

I like to think I'm more of a pragmatist now when it comes to the tools I use in my work so I'm not going to beat down any tools (except maybe Joomla).

I'm at more of an advantage this time round because I'm working alongside some guys that know Drupal really well. I've seen many Drupal sites built by 'experts' that still serve up a gazillion stylesheets and scripts:

all the stylesheets and scripts

I used to think this was a limitation of Drupal but it turns out Drupal has the ability to concat and minify that stuff so really the developers are at fault here.

Drupal templates heavily rely on PHP which put me off all those years ago. My PHP skills have gotten better over the year so it doesn't put me off the way it once did but if you're a front-end dev, it's a certain turn-off.

The markup that Drupal spits out is still a cause for concern though. Consider this:

<div id="block-menu_set-2" class="block block-menu_set region-even even region-count-2 count-12">
    <div class="block-inner">
    <div class="content">
    <div class="menu-block-2 menu-name-primary-links parent-mlid-0 menu-level-1">
        <ul class="menu">
           <li class="leaf first menu-mlid-1333 active active-trail"><a href="/?nav" title="" class="active-trail active">Home</a></li>
           <li class="leaf menu-mlid-268 has-children"><a href="/shop?nav" title="Shops">Shops</a></li>
           <li class="leaf menu-mlid-269"><a href="/opening-hours?nav" title="Opening Hours">Opening Hours</a></li>
           <li class="leaf menu-mlid-270 has-children"><a href="/getting-here?nav" title="Getting Here">Getting Here</a></li>
           <li class="leaf menu-mlid-271"><a href="/news?nav" title="Events & Offers">Events & Offers</a></li>
           <li class="leaf last menu-mlid-272 has-children"><a href="/guide-glasgow?nav" title="Guide To Glasgow">Guide To Glasgow</a></li>
        </ul>
       </div>
       </div>
       </div>
       </div>

All of that markup (and I don't have an issue with class hooks on the list element - just the wrapper markup) just to spit out the main navigation menu - and then adding an additional, meaningful class hook is another matter entirely. In ExpressionEngine you generate nav tags with Structure/Taxonomy like:

<ul class="main-nav">
      <li class="first"><a href="/admission/">Admission</a></li>
      <li><a href="/academics/">Academics</a></li>
      <li><a href="/events-campus-life/">Events and Campus Life</a></li>
      <li><a href="/about-delval/">About DelVal</a></li>
      <li class="last"><a href="/continuing-education/">Continuing Education</a></li>
   </ul>

By all accounts, to generate clean markup like that, we need write a custom PHP function in the template config which isn't ideal. There may of course be reasons as to why that's required but haven't reached that phase yet.

Marcus Neto talked at #EEConf about selling EE over Drupal (and others) and I think he hit the nail on the head when he said Drupal seems to be aimed at PHP developers. Having someone who understands Drupal is the only way I'd know the things I've picked up so far.

I plan to continue this series of comparisons & learning as my adventures with Drupal continue on this project.