integrating zoop and drupal 5
Hi all,
I'm very happy to see the new site is up! No more archive.org for docs... wooohooo!
Anyhow...
I recently needed to mesh a zoop/ajax application with Drupal 5 to take advantage of Drupal's wealth of components. In a nut shell, I have my zoop app using the session bootstrap from Drupal 5 instead of zoop's session class. This allows me to manage all my subscribers via drupal and any subscription and/or payment modules I need. The zoop app accesses Drupal session object where I validate the user access level, etc, etc. So far it's worked out incredibly well with 70+ simultaneous logins and different user types managed via drupal. I assume this pairing could handle many more but that's all my subscribers can muster. I thought I'd share.
...feed is certainly welcome.
thanks,
Jeremy

Drupal Tutorial space and a Drupal tutorial quicky
Steve,
Having a spot to easily document this would probably make the difference in if I actually do it. I'm a freelancer with kids and have to put my time where the money is. So, yes. Please do.
1. Setting up an actual Drupal content page to use zoop/ajax is really easy. Just include all the js and css components in the Druapal page content like this:
CONTENT OF ONE OF MY DRUPAL/ZOOP PAGE....
<?php
/* All js from the jerbroo app */
drupal_add_js('skeleton/index.php/zoopfile/gui/fValidate/fValidate.core.js');
drupal_add_js('skeleton/index.php/zoopfile/gui/fValidate/fValidate.config.js');
drupal_add_js('skeleton/index.php/zoopfile/gui/fValidate/fValidate.lang-enUS.js');
drupal_add_js('skeleton/index.php/zoopfile/gui/fValidate/fValidate.validators.js');
drupal_add_js('skeleton/index.php/zoopfile/gui/common.js');
drupal_add_js('skeleton/index.php/zoopfile/gui/sorttable.js');
drupal_add_js('skeleton/index.php/zoopfile/gui/ajax/prototype.js');
drupal_add_js('skeleton/index.php/zoopfile/gui/scriptaculous/scriptaculous.js');
drupal_add_js('skeleton/public/resources/flash/js/swfobject.js');
drupal_add_js('skeleton/public/resources/js/ab/datagrid/dhtmlxGrid/codebase/dhtmlxcommon.js');
drupal_add_js('skeleton/public/resources/js/ab/datagrid/dhtmlxGrid/codebase/dhtmlxgrid.js');
drupal_add_js('skeleton/public/resources/js/ab/datagrid/dhtmlxGrid/codebase/dhtmlxgridcell.js');
drupal_add_js('skeleton/public/resources/js/ab/datagrid/dhtmlxCalendar/codebase/dhtmlxcalendar.js');
drupal_add_css('skeleton/public/resources/js/ab/datagrid/dhtmlxGrid/codebase/dhtmlxgrid.css');
drupal_add_css('skeleton/public/resources/js/ab/datagrid/dhtmlxGrid/codebase/dhtmlxtree.css');
drupal_add_css('skeleton/public/resources/js/ab/datagrid/dhtmlxCalendar/codebase/dhtmlxcalendar.css');
drupal_add_js('skeleton/public/resources/js/ab/embedbm.js');
drupal_add_js('skeleton/index.php/ab/reports_js');
drupal_add_css('skeleton/public/resources/css/main_bmc.css');
drupal_add_css('skeleton/public/resources/css/datechooser.css');
?>
...END
In the case above, reports_js (third from the bottom), is the main js for the app. It creates a body onload event that kicks everything off and loads the initial content into yourAjaxContent (the div). At that point all the Prototype, scriptaculous, etc js is already loaded and ready to use. Obviously, I have more stuff loading then just Zoop, Scriptaculous and Prototype. Once you have your content in the div, you're outside the scope of Drupal and you can treat the page like any simple page with the drupal theme, etc wrapped around it.
tip: Sometimes I use firebug in FF to peek at the HTTP responses and requests instead of writing the entire debug output to a page. Alternatively, set your zone to test (instead of dev) mode and open the zoop log in another window to keep from overloading firebug.
2. Doing the session swap stuff is *easy* for a seasoned developer.
My app is dependent on Paypal subscriptions, the Taxonomy module and others managed via drupal. My Zoop/Ajax app uses the session/user-type info in the session to grant/deny access. So, a user must login to the site (drupal) before any of Zoop zone functions will grant access. A description of this is better left to a tutorial.
3. Building a Drupal module with Zoop calls is not something I've done. But, if you're using Ajax... it should be as simple as anything else provided you read the Drupal module developer docs.
-Jeremy
Tutorial Book (Wiki) created
Jeremy,
Created that page for you. You should be able to add child pages and content once logged in. It is wiki style so others will be able to add content as well.
http://zoopframework.com/docs/integrating-zoop-and-drupal
----------------------------------
Co-Author of Zoop Framework
Drupal & Zoop!
Jeremy,
That is awesome. It would be great to share how you did this with the Zoop community. I think it really speaks to the flexibility of Zoop being able to be paired with Drupal in a clean manner. Personally I am quite excited to see how this is done. I actually have a number of small projects that would work great as Drupal extensions, but are written in Zoop. Would this sort of thing be possible with your approach?
I can setup a tutorial page for you in the documentation section if you are interested in writing a tutorial.
----------------------------------
Co-Author of Zoop Framework
Drupal Integration, WOW
We are developing a site that centers on Drupal. Drupal is great but having an interface between ZOOP and Drupal sounds very interesting.
Q. Is you integration a Drupal Module?
Q. Would you have a tutorial or other write up?