Drupal 7 upgrade

I just upgraded my site to Drupal 7. The upgrade went pretty smooth, apart from the migration of my image content which I had to reupload. There is also a change for my drupal rss feed, which changed to another URL due to the upgrade and I'm now using a planet tag too. The old drupal tag is aliased though, so you can keep that if you like. The URL for the planet tag is http://realize.be/taxonomy/term/201/feed and the URL for the drupal tag is http://realize.be/taxonomy/term/50/feed. Planet tags will also be posted on http://drupal.org, so update to your needs.

It was also time for a theme change. I'm using the Sky theme and the Sweaver module to make changes to the css. Not all css is perfect yet, but that will change over the coming days. If you find any other errors, don't hesitate to contact me. In the meantime, have fun reading!


personal, sweaver, drupal

Drupal Core, a much forgotten API

Let's start with a little Jeoporday quiz!

Answer: There's a module for that, just look it up on d.o.
Question: How can I get this functionality on my website ?

More and more posts on the web are showing up with 'The top x modules you should always install', someone else even created a website for the answer. It's hard to keep up with the new releases everyday, it's sometimes even harder to find out the exact use case why a new module even gets released - although I respect the author because he's contributing, don't get me wrong on that one.

The selection criteria

There are many reasons to pick a module:

  • Deadlines: the functionality is there and the project has to be delivered on time.
  • Workflow: development teams try to work as uniform as possible on every project.
  • Lazyness: why bother writing a functionality yourself (even it you only need one function from a giant module).
  • Strong API: it helps the developer in custom modules or in deployment strategies.
  • PM has found it on the web. I'm dead serious on this one. I've had cases where I had to start on a site where I got the modules picked for me, without even consulting me.

There are other reasons obviously, but what strikes me is that from experience (I'm guilty too) and from a lot of discussions with all kinds of people (developers, project managers, etc), the gap between what the developer needs and the client actually wants has become bigger and bigger. I'm not sure why this is exactly happening, but it can have serious consequences when going live with a project.

The kitten paradox

The Drupal world has this paradigm that you shouldn't hack Drupal core or God kills a kitten. Even worse, Dries too nowadays. This somehow extends to Contrib too, since well, everytime you need to update, you'll have to make sure you have your patches ready. But what about this: every time you're using more than a 100 modules, mankind has killed a lot of kittens by having to install additional load balancers, reverse proxies, web and database servers for keeping the site up if it's a really busy one, especially with authenticated users. Adding hardware because the site is not performing well is - in a lot of cases - not the right answer.

Back to basics

Every project is unique and building a big project should really be evaluated before and - even more important - during the development process, with great care on how the site behaves in a real life situation, investigating the amount of queries, PHP memory, generation time and so on. That's not something you can do at the end. It's simply too late at that point and a lot of kittens have died already. There are great profiling tools in Devel and Xdebug should be your friend all the time. Be sure to use them all the time.

So, depending on the needs, it might be more interesting to write a simple custom module and write PHP yourself again, using either PHP or API functions available in Drupal core. Every developer should've least opened up the includes folder and scanned every file in it. I'm still amazed now and then, even after all those years. Even with Drupal 7 almost out, a lot of people seem scared because Contrib is not entirely ready yet. That's a pity, because there is some amazing stuff under the hood and you'd be pretty surprised how much you can pull off with only Drupal core, PHP and - especially - a lot of developing fun.

Answer: That should be api.drupal.org and php.net.
Question: Which bookmarks should I really have ?

Ten years of work

It's around this time of the month that I started working ten years ago. My first job as a web developer started at XS4All, now called Evonet. Visiting the site brought me back immediately to those days, even more because that site is the last project I worked on back then and is still up now. Guess it isn't that badly written :)

A lot has happened during those ten years if you look at the evolution of the internet and web in general. Unless you've been living under a rock, a crucial moment for me was when I discovered Drupal, now over 5 years ago. It allows me to travel all over the world for free, meeting a lot of remarkable people and even speaking on conferences. Sometimes people come up to me and thank me for the modules and patches I've written and give me beer. Seriously, that's freakingly cool! Having a non-programmer background, that amazes me all the time and I'm very grateful for the chances I've been given during all these years.

People often ask me where the passion began. I'm pretty sure it all happened when arriving the first time at Urgent, the student radio I've had a lot of good times as a student and the years after. Somewhere back in 1998, I sat down to get my first e-mail address and saw a little penguin on a black screen. That penguin is now on my wrist. During that time, besides having fun making radio shows - Jazztronautica! - I got interested in the internet and web in general. 'Start learning PHP' someone told me. Back then, 3.0 was out. Turns out he was a real visionair. Living with geeks under one roof together made things go even faster of course, hell, I still have a machine running Dave/Dina at my place. Thanking people on a blog might be a bit corny, but here comes a big thanks to Wiebe, Thomas, Peter and Klaas for the inspiration back then.

I'm not sure what the next ten years will bring. I'm still having a lot of fun and tons of challenges ahead of me, so thank you internet. Please don't leave me :)


work, personal


I usually don't post a lot of pictures in my posts, but this is one is just to cute. I started at Krimson this monday and brought my cookiemonster doll with me - and my arcade machine too, so anyone near the Dampoort, call me and we'll have a game of Puzzle Bobble :)

One of the companies across the building also had his teddy bear with him and took the adorable picture underneath. Best Bears Forever.


work, cookiemonster, bears

Display Suite for Drupal 7: taking full render control over any entity

With CCK merged into core in what is now called Field API and the birth of entities, the possibilities of Display Suite and controlling the layout of objects have now become a much easier task than in Drupal 6. I've been working on the port since a good week now and got most things working with less code, but more goodies.

The biggest changes

  1. The module is now dependant on http://drupal.org/project/field_group, the new fieldgroup module Stalski and I (with the help of a few other colleagues) are now maintaining for Drupal 7. It defines a 'Region' format which DS uses to create any number of regions for your object. More info about field group is available in a previous blog post. DS is not dependant anymore on field group.
  2. The module now extends on the Field UI module, also shipped with Drupal Core. This UI gives you full control over the form and display for any entity in Drupal Core or defined in a custom module. This means default support for nodes, users, comments and terms without having to install any of the sub modules (Node, User & Comment displays) which existed in Drupal 6. It also means that we don't have to maintain our own interface anymore, because it's more mature now.
  3. It's now possible to create any number of regions. We ship with a couple of predefined layouts which have default css and a template file that can be (un)loaded in any occasion. HTML 5 will be a piece of cake from now on as we also ship with HTML 5 template files by default per layout. Defining or configuring the setup of custom template files from a module or the UI is easy and done in a few steps.

Previous implementations

As mentioned before, ND, UD and CD are not ported to Drupal 7 since they have moved to DS core. There is no consensus yet what we're going todo with the Node Displays contributions project as it holds some fine code for a couple of contrib modules, especially search and location. There's a big chance that code will eventually also move to this module, maybe as a separate sub module, the following days and weeks will make that more clear.

See it action

The code works, so go to http://drupal.org/project/ds and download the 7 development release. If you don't feel that adventurous yet, I've created a small screencast about the current working version, it only takes about 7 minutes of your precious time. There is a lot of polishing work todo, but I'm confident that we'll actually get a stable first release out the day Drupal 7 will be released.


Subscribe to realize.be RSS