I stuck my Drupal in my Zoop.
May 20, 2008 – 11:06 pmI recently rounded up some of the fundamental applications and methods that I’ve created over the last few years and decided putting them together into a useful website that would serve me (and others) well. The problem I have with any such project, along with no immediate payout, is that I have limited time to spend on it. So, I decided to first build this marketing mash-up using a development frame work to save some time doing it the right way.
I chose a lesser known php framework called Zoop. Zoop provides a lot that the others didn’t and it was really easy to learn. Something I really liked was the zoop zone development methodology. The code just flowed once I learned the basics. Everything I needed, including javascript effects and ajax controls provided by Scriptaculous and Prototype, respectively, was there without me having to mess around with installing other libraries. The next step was to find a CMS (content management system) that would play nice with a frame work like Zoop.
The goal was to do as little access control and front end development as possible. That way I could build the site fast and keep it focused on it’s real purpose. That is, to save time and make money by allowing me continue to use the marketing components on my own sites and by providing a subscription based system for others.
I went with Drupal 5 for the CMS. After poking around in Drupal and sorting through various Drupal support posts and how-to pages. I figured out how I could integrate Drupal with Zoop. It’s a relatively simple way to make Zoop use Drupal sessions and access management instead of it’s own.
The result was a real development framework with the power of Drupal and all it’s modules hooks, etc. No drupal modules were developed and no Drupal core hacking is involved.
In this case, the basic trick is to swap out the session class used in Zoop with that of Drupal. Then in your Zoop zone file you’ll magically have access to the many Drupal objects. Such as that containing session and user info and more. Obviously it’s a little more involved then that and I’ll get into it later.
After I stuck my Drupal in my Zoop…
I created a content page in Drupal that loads pages from my Zoop app. Those pages are actually javascript files that trigger ajax actions once the page is loaded. Depending on the drupal user permissions Zoop will grant or deny access to the requested component. That’s a simple but oh-so-helpful thing for a developer that doesn’t care to learn how do complicated application development in a Drupal module. Now my app is loosely coupled with Drupal and I can upgrade and extend Drupal all I want with little effect on my core application written in Zoop.
You can even embed flash over ajax and anything else you can image with Drupal controlling the gates with the freedom of a framework and brass tacks php development.
I’m in the process of doing the same thing for a client and will be documenting the process in detail this time. For now you can read more on the Zoop site.
I hope someone finds this useful.