jay callicott

Check me out on twitter: http://twitter.com/drupalninja/

Thursday, April 3, 2008

Drupal as a software platform - falling in love all over again

I've been racking my brain for the last few years to find a platform, framework or programming language to throw my weight behind. I love e-commerce and I want whatever framework or tools that are going to empower me to get the job done fast.

I've been programming in PHP for a while and that's the language I'm most familiar with. It's also frustrating bc I don't think it has plenty of warts such as a fragmented community, no killer framework and lacks some cooler features that other languages has such as blocks in ruby for example. Anyways I've posted before ab how I've flirted with the idea of moving to Django or Ruby on Rails, 2 really popular frameworks that save time by creating a "domain" specific framework dealing primarily only with web applications. I still have those 2 on my short list of "maybe someday" but in the mean time I've done all my work in Code Igniter or Drupal. I've used drupal for all our client CMS websites and Code Igniter for custom PHP development thus far only at my day job.

I tried unsuccessfully to create our generic listing software idea using all custom PHP with Code Igniter until finally I said enough's enough. And so here we arrive at the topic of this blog, "falling in love with Drupal all over again" -- i.e. rediscovering Drupal as not just a CMS platform, but a web platform. I have discovered that I can do about anything I want to do with Drupal now. Partly bc it's features have grown in version 5/6 since I first started playing with v 4.6 a few years ago.

Why Drupal? First and foremost drupal is great for any web app that is also a website bc you have all your website features, content management, blocks, layouts, custom content types, etc. - wonderful features for setting up a web site full of content.

Drupal also has a built in user system, has an amazingly powerful theming engine, is modular, extendable, and has a solid framework/platform to build on. You can create modules that do just ab anything. You can extend content or alter the way different parts of the drupal engine function without "hacking" which is incredibly important. The biggest shift in thinking for me has been when I learned how to do what I needed todo within the "drupal" way of doing things with no longer relying on hacking system files or hacking modules, etc. which always causes maintenance problems down the line. For drupal or any platform/framework to be viable long-term, it has to be extendable without hacks, I can't stress that enough.

With drupal modules you can drop in any "section" of code you want. It can pull from a separate database, it can do anything you want and spill it out within the layout. Sure you can use existing drupal functionality or you can ignore most of it and just use PHP to spit out what you want. I'm more and more using the drupal API available to me and doing less just anything goes PHP.

Here's why I've gone back to rethinking how to do web-apps in drupal. I have learned how time consuming custom code is, especially when you're doing it part-time. It absolutely takes forever. I think modern frameworks like Ruby on Rails can possibly really reduce the time of development but I don't think even RoR can beat how quickly you can put up webapps in Drupal. And the fact that everything is plugged in with modules means that you have more stability, less code, more maintainable code and less headaches, errors etc and much more can be done within the drupal interface rather than with code. This is huge.

And so we are now using drupal for our listing engine. It uses mostly existing drupal modules, and the only real custom code is for search forms and for the subscription module, everything else is existing drupal code or theme files. That means our solution has drastically less code. Instead of thousands of lines of code, it becomes maybe hundreds of custom code. This is so important in being able to support the application in the lifetime of the app.

I am now rethinking just ab every "idea" we have on our list for the next e-commerce solution some could easily fit within the drupal platform, some maybe are a stretch. I am, however, thrilled in what drupal can do for our little company, especially for myself being a part-time developer/entrepreneur with not a lot of time on my hands.

No comments:

Check me out on twitter: http://twitter.com/drupalninja/

About Me

Drupal expert/consultant, PHP/MySQL Ninja, and entrepreneur - Working for Drupal shop Mediacurrent.com. Consulting services available.