Summing up day 3 – the last day at the conference for us. You can also check out day one and day two.

10:00  Lesser known Drupal 7 (link)

Queues

There also seems to be backport of this for D6.

implementations of queues:

Pluggable caches

In drupal 6 you could swap the whole cache implementation, in D7 you can swap any cache bin:

  • bootstrap cache (new in 7 -> variable cache, modules and theme list, registry and hook cache)
  • page cache (can be swapped by a null cache on sites that already have an external cache (varnish, nginx))

Pressflow has external cache (null cache) and is actually much like a backported D7 performancewise.

  • Block cache:
    Doesn’t work as soon as you use any node access mechanics (so same issue as in D6 ;)
  • Render cache

D7 also has (crazy) built-in support for ESI (edge side includes). ESI is used to cache specific elements on the page.

Renderable arrays

  • Drupal 7 has a completely reworked rendering pipeline.
  • Even the whole page has a renderable array.
  • Heavy processing (SQL) can be delayed as late as possible using #pre_render callbacks

Flexible database drivers

New database layer : php PDO

Use case were this might be useful:

  • automatic slave health monitoring
  • site specific initialization sequence
  • automatic query tagging
  • document oriented storage (mongoDB)

File streaming

  • no need for shared filesystem anymore

Session handling

  • D7 has a completely new session handler
  • Anonymous user on D7 will not receive a cookie at all
  • Careful fragile: don’t store anything in sessions if not necessary because it will break your page cache

Keynote: the Design of HTML5 (link)

Video is online here! This was an amazing (one of the best ever keynotes on Drupalcon) talk about HTML5. It was so fast paced and interesting I didn’t even make any notes, but if you want to read about it instead of watching the video check the liveblog at drupalradar.com.

Some keywords:

  • pave the cowpath
  • degrade gracefully

Drupal HTML 5 modules & links:

You can really start using html5 today, IE needs js creating the new elements and be aware of the vaildation tools limitations.

Quotes:

  • “In case of conflict consider users over authors over implementators over specifiers over theoretical purity” (Priority of constitiencies)
  • “Be conservative in what you send; be liberal in what you accept.”  - robustness principle (Postel’s law)

13:30 Drupal performance boost solutions (link)

Pretty general talk abour various way too boost your performance. You might also be interested in our our blog-post about frontend performance in Drupal.

14:45 Views 3 (link)

Views 3 has got some amazing features. There are however UX issues: (13 boxes is too much) – join/follow the discussion for that here. Also it’s not yet entirely stable.

  • use the dev instead of current alpha  (at time of writing)

16:00 Developing iPad/iPhone/Android apps using Drupal as a base system (link)

  • speaker: @sumitk
  • webkit growing
  • 40% internet traffic mobile 2013
  • native apps are more capable then browser framed
  • titanium
  • http://sf2010.drupal.org/conference/sessions/developing-apps-iphoneipadandroid-using-drupal-base-system
  • http://civicaction.com/blog/sumit

16:00 Writing better CSS for Drupal (link)

Mverbaar really addresses an urgent problem that should be fixed for Drupal 7. See his presentation on slideshare.

17:30 Closing session

Drupalradar did live video streaming covering the closing session which had an appearance from the kittenkillers (video). But the whole closing session video is not available yet I think. There was also the announcement of DrupalCon Chicago in March 2011.

Dinner / Evening:

Oh, just look at the pictures ;)

Here is a quick update of our second day at Drupalcon Copenhagen. See also the posts about day one and day three.

10:00 How Earth day handled 80 million hits in 2 days (link)

  • don’t use statistics module (additional sql queries)
  • watch out with apache solr search
  • use drupal 7 if you don’t want headaches with high performance sites (D7 has pluggable caches out of the box) *
  • Varnish runs into a queue when the amount of requests is higher than the amount able to handle

* Actually, you could also take a look at Pressflow which has a lot of the performance upgrades from Drupal 7 backported to 6.

10:00 Communicating Drupal Visually (link)

A great session (almost a workshop actually) explaining how important it is to use visuals when you are explaining Drupal. Especially if you are talking to non-Drupal people.

One picture says more than a thousand words, and people are visual beings who tend to ignore text and look at pictures. So don’t be afraid to draw!

Personally, I always liked the way Development Seed is doing this in explaining how Open Atrium works to customers. Just look at this for an example.

11:00 keynote Rasmus Lerdorf

Rasmus (creator of PHP) was also a keynote speaker at DrupalCon Szeged. That time, he did a quick analysis of Drupal and gave some pointers how to improve the system performancewise. I loved his frank way of speaking and he was clearly disappointed by the fact that some things in Drupal 7 are still the same as two years ago.

He especially pointed out all the require_once includes which should be require only, which would gain an instant (but small) boost.

I looked up if there was an issue about this and found this one which explains why this is probably not going to happen.

Another thing he talked about was how Drupal could benefit by using c++ or hiphop (a php to c++ converter) to speed things up. However, converting Drupal to another language would be a huge waste of time according to Rasmus, and it would make much more sense to (eventually) allow language independent modules, so if somebody would make a module in Python, this would be possible.

13:30 Mark Boulton – What you need to know about Grids and 960 won’t teach you (link)

Another great talk by Mark Boulton, explaining Grids from scratch and how to use them in todays world where content can be viewed in more and more contexts and platforms.

Every webdesigner should watch this session (video’s will be available on archive.org)

14:45 Every site a .make file (link)

This a cool session because we started using drush make (an extension to drush) about a month ago for the same reasons as mentioned in this session:

  • It allows you to create distributions
  • Helps with the deployment workflow of Drupal
  • Doubles as documentation: you know exactly what is used for that site (including patches, module versions,  etc)
  • Forking for karma: encourages patches to be released upstream on d.o.
  • You can pull in external libraries (e.g. tinymce)
  • Perfect fit with Aegir to handle live production sites

Other tips, gotchas, best practices:

  • You can include other .make files in your make file like:
    includes[openatrium] = http://…
  • Always use version numbers
  • Use comments in .make file
  • profile.make vs distro.make: distro includes core
  • patches need to be public so this actually encourages contributing on drupal.org
  • consider Squid if downloading takes too long

16:00 Translation management for the enterprise (link)

Explaining the translation management module: a great workflow tool if you have a big site with lots of languages and you typically have many translators who need to translate nodes but don’t need to be bothered with anything else on the site.

17:15 All your HTML are belong to us #2.5 Revenge of the Markup (link)

Morton’s second session, this time explaining some more on why drupal outputs this load of html markup as it does, and what you can do against it (and create more semantic code). This session was about cleaning up html, and I think it plays nicely with Mverbaar’s session about cleaning up CSS (in core).

Of course, you can override a lot of .tpl files and make things a lot better, but there are also a couple of modules which can help:

Or check out Morten’s own clean up theme called mothership, it allows you to get rid of a lot of classes (like the body classes) which you don’t need, simply by using the theme settings. And you can use your own (base) theme together with this one.

Evening / Night:

Dinner with Dutch Drupalistas and more FooBar!

This week, our team arrived from the Netherlands by car and plane in Copenhagen, Denmark. We are attending DrupalCon and here is a overview of our  day one. You can also read about day two and day three.

9:00 Drupal distributions Do’s en Don’ts (link)

Presented by one of the maintainers of Open Atrium.
Some topics:

  • install profiles
  • Exportables (ctools)
  • Kit specification (for features + context, drush make)

Tips:

  1. Install profiles just list modules, and are executed on install, not update.
  2. use batch (API) processing (ist of modules can take a long time to install).
  3. organize features functionality.
  4. use context (especially version 3.0 which has layouts).
  5. always fix module versions in your drush make.

Unfortunately there was little time left to talk about some of the possible business models which are possible as a service or product.

10:00 Propeople: behind the scenes (link)

Case studies of a large Drupal company. They talked about fdm.dk and unicef.dk and how you can impress a client by just showing what Drupal can do.

Don’t be afraid to give your client control or even the possibility to extend the system (indirectly by asking you for some module functionality).

Do ask you clients for testimonials after a succesful project, which you may use on your website.

11:00 Dries Buytaert Keynote – State of Drupal

This one was a bit different as usual. Dries didn’t have much news on D7 or the drupal.org redesign. So instead the keynote was about different visions on how Drupal might look like in 2020. The future of Drupal and the community.
I enjoyed how Dries is able to pull together the big picture and put things in perspective in his keynotes, but there was some discussion on some of Dries’ remarks about women in the community.
Other topics:

  • Everybody is looking for Drupal Talent – but it’s pretty hard to find that talent.
  • Drupal is invading the enterprise.
  • Why? It’s actually become a better piece of technology.
  • Looking back at history, trends and current situations, Drupal wil grow a factor 10 by 2020
  • 10% of the web might be Drupal in 2020 (currently 1%)
  • Comparison with Apple – don’t sell the features

Trends:

  • Drupal SaaS (for the low-end user)
  • Drupal distributions
  • Integration with other system (legacy or social like facebook)

Directly after this, the group picture was made:

13:30 Drupal: the next generation (link)

Very interesting session by Larry Garfield who talked about future plans for Drupal 8 or “how Drupal 7 sucks”. Because while D7 might be awesome, it still is pretty bad at some very fundamental issues:

  • Contexts
    Drupal has no idea about contexts. You have node pages and blocks, but there is nothing tying it all together. There are some solutions in contrib like context and spaces or panels, but they work around an existing fundamental problem in Drupal core.
    We need an intermediate layer -> the butler project
    There is also a premature D7 module on github.
  • Swappable functionality
    Because hooks are meant to add functionality not replace it.
  • Drupal returns html
    Sometimes you want to return just a part of a page or something in JSON, SOAP, etc. (now you must use the services module and the required bootstrap requires a lot of code needed to be loaded which you do not need.
  • Performance
    Too much code on every single page request. Render API is a memory hog. Related: http://www.garfieldtech.com/blog/benchmarking-magic

The new architecture would also mean things are cached by context -> ESI caching (Varnish) building into drupal (more)!

So Drupal 8 will be much about cutting overhead processing, some fundamental redesigns (will we still need hook_menu if we have contexts?) and other performance optimizations.

This will probably mean that Drupal 8 will be more of a change ‘under the hood while D7 has a lot of ‘outer’ user experience and usability improvements.

14:45 MongoDB: humongous drupal (link)

This was a pretty theoretical session by Chx about the benefits of nosql.

  • nosql
  • clash of two cultures
  • ACID vs BASE
  • reality isn’t rigid (example: sell cars, color attribute, but what if a car has 2 color)
  • You need a lot of ram en a lot of diskspace

Others non relational databases: cassandra (facebook and twitter use that) and couchdb.

14:45 Getting Early Estimates Right (link)

This is an excellent session my colleague Erik attended, covering your client’s question which is always difficult to answer: So, how much will it cost?

You can find notes about this session over here.

16:00 Building scalable high performance drupal sites in the cloud (link)

Another advanced session by Barry Jaspan, a senior architect at Acquia.

File sharing on AWS :

  • Drupal needs a POSIX filesystem for user-uploaded files
  • elastic block store (EBS) is single instance
  • rsync does not scale past two web nodes
  • S3FS is worse than useless for this (too slow, non-POSIX, unreliable, unsupported)
  • A network filesystem is required…

Challenge: HA load balancer

  • load balancer might fail
  • elastic load balancer (requires a hot spare or second active instance)
  • Elastic IP (also requires hot spare)

Then there was also some talk about Puppet as a solution for a lot of issues. Which was pretty neat to hear, because our hosting partners are actually now adopting Puppet.

17:00 Awesomeness redefined: Drupal 7 theming (link)

Session presented by Morton and Jenny, talking about the changes in Drupal 7 for themers (which are great!) and Bartik - one of the new core themes for Drupal 7.

Some of the new theming stuff in Drupal 7:

  • hide and render will be your new best friend
  • hooks are possible in template.php (which means themers now at last can modify/theme forms!)

If you want a more detailed overview check out this video from Drupalcon Paris on this topic.

As for Drupal 6, you might want to check out Display Suite, which makes the life of a Drupal 6 themer a lot easier.

Evening /night:

After a good meal of pasta in a nearby gigantic shopping mall (our appartment is actually around 200m from the Bella Center and 5km from the city center) We spent the evening and night at the FooBar which had sponsored beer. Nice!

Also very nice in Copenhagen: the metro runs 24 hours a day!

I while ago, I wrote about the developments of the media library in Drupal 7. And while the release of Drupal 7 is only months away, there is still a high demand for a similar solution in Drupal 6.

The media module for Drupal 7 aims to provide a unified field which allows you to use any files (media) avaiable in your local Drupal site or provided by remote third party services like Youtube, Flickr, etc.

So what about Drupal 6? As long as I remember we we’re looking for a good solution to this issue. IMCE was never a real option as it doesn’t integrate very well with the system: nodes aren’t aware of any inline media provided by imce.

However, as explained in this excellent screencast video by Aaron Wall, there are recent developments which allow for some interesting Drupal 6 alternatives. These won’t give you the perfect solution like the Media library but they might get you pretty close.

Filefield Sources (filefield_sources)
Extends the filefield by allowing to re-use already uploaded files or remote files. Doesn’t place images inline like imagefield+insert. Has nice integration with imce.

Node Reference Embed Media Browser (nrembrowser)
Almost stable. Provides a media cck field. Tries to emulate the Drupal 7 media module. Uses node reference. Views support, JQuery UI for dialog.

Nodereference Explorer (nodereference_explorer)
Older module. Has got views support, but uses different dialog systems and doesn’t support wysiwyg. Uses node reference.

Media Reference (mediareference)
Under heavy development. Provides a cck field. Views support planned, Lightbox dialog. Doesn’t use node reference directly.

Some of these modules use CCK’s node reference as the underlying method to tie everyting together. Which seems as sensible architectural decision for Drupal 6.

As Aaron explains in the video, it is important to understand the underlying technique used to store the media and the dialog system used, in order to know what works or doesn’t in your projects.

At this point, I would say imce + wysiwyg + imce_wysiwyg + filefield sources is the best way to go for most situations – looking at it from an user experience point of view. However nrembrowser looks promising.

There are many ways to build functionality into a Drupal site. Take a sitemap for example. A typical ‘page’ which is often one of the standard elements in a website design. You could say, we’ve got the sitemap module for that, and in most cases it does the job. But wait a second, do we really need another module for this ? Here is an alternative method.

Chances are you already have cck, views and menublock [1] on your site. At this point, you don’t need the extra overhead of sitemap to create a similar page. And in addition, you will have more control over the content and display (theming) of your sitemap page. Also, using views means you can easily show certain lists which would be impossible using the module, allowing for more advanced overviews.

Setting it up this way means you need to create blocks with the required information.

  • menu trees with multiple levels using menublock
  • list of categories and terms using views (optionally using term_node_count [2] to display the number of nodes in a term)
  • other lists depending on your site architecture

In order to embed these different blocks in a node, you will need to create node regions, which are a bit different to set up in comparison to normal page regions as they are placed in your node.tpl.php and thus only used on a node display. Once the regions are in place, you can use the block visibility to display them (or the context module if you happen to use that one).

Alternatively, instead of using inner node regions – and if you are already using panels – you could accomplish the same result with a custom node panel layout. The principle is the same. Another advantage using this technique: the sitemap node now can be easily editted as a normal page node (easier and more intuitive for administrators), and doesn’t have a hardcoded path /sitemap.

Example of a Drupal sitemap

Example of a simple sitemap with two node regions

You might say this approach is more work to implement. I’m not arguing this is the best way to implement a sitemap but it is more flexible and might be a better choice depending on the project.

There are many more areas in Drupal where you can walk different roads to reach similar solutions (image galleries are a notorious example). My advice would be: keep the big picture in mind to spot any architectural implications certain decisions might have while drawing up a solid building plan. But don’t be afraid to experiment and test out new ideas.

[1] Alternatively, if you want to reuse existing menu blocks, you can take a look at multiblock. Though this need is negated if you use context module.

[2] term node count does introduce a new table in Drupal (for performance reasons). You can also choose to write your own simple code for this and rely on caching.