23 January 2017

Abandoning Drupal 8 to rebuild BookFetch in Laravel 5

Back in October I started building the BookFetch project from scratch and used it as an excuse to learn Drupal 8. My experience of developing in Drupal 8 has been utterly horrible, full of moments of horror, frowning at the raw results, resigned to a helpless moan of "Why are you doing it like that?!".  Hampered with frustration, endlessly digging deep down the stack to find the bug, then having to search online for the meaning before realising you now have to dismantle what you've just built only to change methods, usually to install yet another module and it's dependencies (for the fifth time) in the hope that this one might do what you actually want this time.

A few months ago I reached the end of my tether when I deployed the site live and it did not work. The error logs showed a really strange bug occurring that seemed to be Drupal-specific but was happening down at the Symfony level. The only people that could really help on the forums were those that existed in the slim cross-section in the venn diagram of developers between those with knowledge of the Drupal framework and Symfony, the framework that the Drupal framework is built in. My post got no replies.

Today, after those weeks off, I started building BookFetch in Laravel 5.3. Just 1 hour in and already I feel like I'm back in the land of the sane. All those lovely warm fuzzy moments of delight that I remember from the last Laravel site are flooding back to me. Smiling at the screen and saying "Ooooo that's niiice".

As a craftsman I just like the way Laravel does things. The creators seem to have struct the right balance of tools that are helpful without being assumptive to the point of restrictive. In contrast Drupal feels eccentric, over-engineered and distinctly blinkered in the way it seems to think it knows best. As if Drupal engineers have only ever built Drupal sites and can't imagine any other way like some creepy self-serving religious cult.

Laravel feels flexible and complimentary to the task when you use it. You carefully select small building blocks that have predictable results as you create your site. Whereas Drupal seems to forever spill over with a cacophony of bells and whistles that you didn't ask for but which you now have to deal with before you can get your intended task done. You spend so much time turning unwanted things off or working around them that you end up wishing you'd not used the framework because it would have been quicker.

But most of all, even when you've conceded and submitted yourself to Drupal's strange way of doing things by following procedure by-the-book, the end product is still just deeply unsatisfying. What do all these extra database tables do? Why is that folder structure so strange? I really want to get rid of this mass of possibly redundant code but I'm scared. Can I trust that to deploy right? Why are you notifying me again? Why are you such a magnet for spam bots?!  The finished set of files look a mess.  Laravel sites look like a website.

Drupal 8 can do one!  The BookFetch project's authenticated RESTful API and neat minimal interface can be born in Laravel 5 and I, as it's father, will regain the unburdened sense of achievement that a fine craftsman deserves to enjoy.