DrupalCon Chicago 2011 Recap - Part 2

This is the second entry in recapping my trip to Chicago for DrupalCon. On the opening night (Monday), a party was held at the Field Museum of Natural History. Beer, wine, and plenty of food was served as we were all free to roam around most of the building. The most impressive was certainly Sue, the world's most complete T-Rex fossil. Certainly worth checking out if you are end up in Chicago.

 

Drupal on the go with jQuery Mobile

The second session focusing on jQuery, this one was great. The focus was on the somewhat recently announced jQuery Mobile. For those that have not heard of it, there are a few great benefits this will bring to mobile websites. Something themers can get excited about is that jQM provides an elegant, simple, and consistent user interface. This is especially important now that there are tons of different mobile browser resolutions and display types out there. Another big pro is that jQM has a ton of awesome AJAX functions built in to the UI to load only the data that is needed. This is huge for mobile sites where bandwidth is almost always the biggest concern.

Tom Cosgrove and Brian McMurray gave a great presentation on not only jQuery Mobile in general, but utilizing it in Drupal themes as well. Dries stressed in his keynote on Tuesday how important mobile is becoming on the web. With the amount of mobile devices like iPads and smart phones out there, you can see why. Drupal has a few mobile themes that work well with jQuery mobile, but the presenters stressed that jQuery Mobile relies heavily on HTML5 markup (specifically the data-role attribute). This makes sense of course, and I'm glad the developers behind jQuery are focusing on HTML5.

All in all, this was a great presentation. Drupal is not quite ready yet for jQuery Mobile but it is very close. Brian and Tim demonstrated using jQuery Mobile in a theme to do simple administrative tasks in Drupal on an iPhone. It went extremely well, but there are some caveats like displaying form tables that don't work. Whenever I decide to develop a mobile version of a site, I'll be utilizing this for sure.

 

Developing Apps for iPhone/iPad/Android using Drupal

This was a great presentation by Sumit Kataria who works for Civic Actions. The presentation focused on using Drupal as a service (using the Services module) platform to serve as as the back end for mobile apps. There were a good deal of "wow" moments as Sumit went through how easy (relatively speaking) to develop a simple app.

The focus was on the software package called Titanium. This software lets you develop mobile apps using only JavaScript, which then gets complied into Java/Object C. This allows you to easily develop an app that will run on Android and iPhones/iPads alike. I should note here there was a very large focus at DrupalCon on mobile development. Sumit makes some great points about how more and more web traffic is generated by serving pages to mobile browsers and applications. It's very important as a developer to understand and utilize some of the latest tech (like Titanium).

Sumit's presentation was the first I was hearing of using Drupal as a service. From what little I know, it allows applications to ping Drupal for information and send data back and forth. He demonstrated a simple app that lets a user login with a username and password, just like a Drupal site. The accounts and data were all stored on a Drupal site somewhere on the web. Titanium essentially acts a layer bridging communication between the app and Drupal. The communication for this app was done using JSON, and Sumit showed a window displaying all of the code that was executing and debug info as a user attempted a login.

Harnessing the power of Drupal as a backend for an app, the possibilities are rather endless. I got very excited to learn more about mobile development after the presentation was over. Sumit showed some JS code samples, and it certainly peaked my interest. He went further and showed a more complex app to get people excited about development. For anyone interested, you can view the video of his complete presentation on the DrupalCon site (follow header link).

 

Themeing Haiku with Haml, Sass, and Peroxide

This was the smallest presentation I went to, but well worth it. Kyle Cunninham presented the awesomeness of Haml and Sass and how much easier it can make a Drupal themer's life. Haml is a new scripting style to writing HTML (seems outdated and clunky to many). Sass is something similar but targeted towards writing CSS more efficiently.

HAML seems really odd at first. They even admit it on the official site. However, Kyle claims that once you get the hang of it you will never want to go back to writing HTML "the old way". It got me thinking about how clunky writing HTML can really be. If not for a decent IDE like Coda, I'd be totally lost at times. If you look at the output of a standard Drupal site utilizing views or panels, there is an insane amount of markup there. While it's all there for good reason, it is difficult to maintain and keep track of. Haml simplifies everything and allows you to take a programatic approach to writing markup. My favorite part about Haml is that white space is relevant! I can't do it justice is this short paragraph so be sure to check it out here.

Sass cleans up CSS style sheets and can often reduce the amount of code written by half. Anyone who has themed a large and complex site knows how bad CSS files can get. It's annoying and tough to keep track of hierarchies and preventing duplicated code. Sass takes the same approach as Haml (which inspired it). My favorite feature of Sass is the ability to use 'functions', referred to as "mixins". This allows you to easily create base styles and include them in other style elements with parameters. Check out the great site on Sass which includes side by side examples of writing in Sass vs CSS.

Kyle is also the maintainer of the Peroxide theme engine for Drupal. I remember when I picked up my first Drupal book it mentioned the ability to use different themeing engines. Drupal comes packaged with PHPTemplate which is common and easy to user. Peroxide allows you to utilize Sass and Haml in your development. Overall this was a great presentation that opened my eyes a bit to the new tools out there for themeing. I have to find the time to invest into this, as well as get some of my coworkers involved. It would be nice to work on a microsite utilizing Peroxide to take it for a test drive.

 

From Zero to Distribution using Features, Profiler, and Drush Make

One of my co-workers told me that I was bound to see many tweens at DrupalCon that know a crap-load more than me about Drupal. Dmitri Gaskin was one of them, and oh boy did he know what he was doing. Dmitri's presentation was about how Features and Drush Make can allow you do deploy Drupal sites in the blink of an eye.

I have toyed about with Features before but never really got too interested in it. Features is great in that it allows you to create custom modules without writing any code. You can create a view, a content type, a bunch of custom fields, some imagecache presets, and package it all into one module. Dmitri demonstrated how you could do this to deploy a 'news' module. The interface for using Features is very straightforward. Modules can be updated and overridden when you have updates to be made, and deployed across several websites quickly and easily. I've never really had a need to do this, but it's not hard to imagine how some people would.

Drush Make (a module written by Dmitri) allows a developer to package entire sites and deploy them. So create a bunch of feature modules, and then create a drush make file that writes out the site's modules (with versions) and dependencies. It's incredible watching a drush make file being executed as it quickly downloads and installs all of the modules needed for the site. Developers that often develop microsites with similar functionality can save so much time using this. I'm all about saving time; it frees up some precious ours to work on more advanced functionality.

Dmitri gave a great presentation and he is surely a great asset to the Drupal community. It was inspiring watching his presentation!