I love Drupal. I have been engaged with the technology, the community and the vision for about 2 years now. So much so that I attended DrupalCon 2012 in Denver and loved it (I compare it to Google I/O when I consider the quality of tech conferences I have been to). But unfortunately, due to the reasons I am about to describe, I have come to the realization that Drupal is actually a horrible solution to build apps (content or non-content heavy) in agile environments, which is pretty much the case with most web start-ups. This has led me, the sole developer/engineer of my startup, to switch from building our core platform on Drupal (which I did for several months) to now building it in Django from scratch. This is not a pro-Django article, as I think I could accomplish the same with more or less similar difficulties in the 7+ MVC frameworks I have worked with in the past. I want to tell you exactly why Drupal is not right for such a context.
Drupal, much like many other CMSs, follows a development methodology that I call reverse development. It is the simple idea that the most fundamental moving parts of the technology have been already built for you, or are modifiable using a trivial UI, and for you to be able to accomplish a certain special functionality, you are required to engineer your way backwards by “hooking” in to its current processes, and modifying the functionality or data to your preferences. This is not only true with non-user-facing functionality, but also with views data fed into templates, and sometimes also with designing themes. The benefit of this approach is that it allows non-developer site administrators to do simple changes to functionality with modules/plugins without ever writing a line of code. In fact, Drupal today supports creating models and model objects (using concepts like “Field”s and “Entity”s) using amazingly intuitive UIs. Unfortunately, this has some very serious bad implications for developers trying to build “apps” (CRUD++):
- Lack of familiarity with core functionality. Because most functionality is actually hidden from the developer, as the process of development involves interacting with an API and “injecting” code snippets in existing operation flows rather than defining the flows by yourself with rich abstractions, he/she has no idea how most things work. This includes having no idea what the database schema looks like, or having any clue that you’re modestly small app has already left a footprint of over 200 MySQL tables. This not only gives rise to horrible debugging experiences (for which there may be good tools) but also inability to optimize performance.
- High development time. I have personally trained at least 3 developers to get started with Drupal. Unfortunately, they say the exact same thing as I said when I first started learning: this takes way too long as is too confusing. If you’re going by the assumption that someone who can write PHP can easily pick up Drupal-like CMS development, you couldn’t be further from the truth. Despite spending so many nights on their API docs, I still require tremendous reading time whenever I am confronted with a new situation. What’s worse is the fact that a lot of the API changes with every new release, making half of the StackOverflow debates on “how to get xx done” outdated after a couple of years. No start-up can afford a high initial learning curve, as it just doesn’t fit into their agile development practices or MVP goals with often scant freelance tech labor. It just takes way too long to get really really simple things done at times. There is a reason why Drupal devs are some of the most hotly desired tech talent in the market.
- Custom comes at a big cost. Drupal comes with rich defaults in just about everything it comes packaged with. It is a pleasure to use these when you want to play nice. But unfortunately, when you are trying to build an app with a very specific look, feel and functionality, you often want to build things from scratch. Trying to do anything custom, such as pump in your own variables into overly complicated and obscure views objects, can suck up your time and energy before you know it.
Another really important development concept around Drupal is modules. This is the equivalent to modules or plugins or extensions in most of the CMS world. One can say this is similar to apps in MVC frameworks like Django, but no, its not. It’s not similar because writing a module in Drupal requires a massive amount of boilerplate. It’s not similar because one never defines models or views or controllers or templates in their traditional sense, but rather writes functions and functions and more functions not forgetting helper functions. It’s not similar because the scope of a module’s functionality is not just confusing, it’s scope is undefined. Sure modules are re-usable and distributable, but they are barely comprehensible because of the breadth of API hooks they use and implement themselves.
To sum it up, Drupal, for the reasons mentioned above and more, may not be a good environment for your agile development needs. It is an extremely robust, powerful and beautifully architectured technology ecosystem for its purposes, but can easily become a developer nightmare in ambitious contexts. Some people consider it a good tool to build an MVP – I won’t debate that, but I do not fully agree too, as it can very easily become a pain depending on what you are trying to do. All hope is not lost, there is good news – Drupal has partnered with the Symfony (a
dying PHP MVC framework) community to bring some of its components and app development philosophies into Drupal 8, Drupal’s next release. I have been witness to the discussions on what is planned for the same, and I am sincerely impressed. With the amazing brains behind the same, I won’t be surprised if one day Drupal is amazing to build things from “scratch” with, but unfortunately, today, it’s not.
UPDATE: I take back the adjective “dying” for Symfony. I do not actively follow the progress on Symfony and Symfony2, but my friends following the community closely mentioned that it is certainly not thriving in popularity. I pissed off a couple of people I sincerely respect, in the process. So, apologies for that!