NEW QDRUPAL INFORMATION

I've centralized all QDrupal Development in the projects section of this website. You can view the latest QDrupal news and download the latest version of QDrupal here.

http://www.amountaintop.com/project/qdrupal

DEPRECATED

UPDATES

  • After some feedback, I've updated the version of QDrupal.  You can find it below.  
  • I added support for multiple datases http://drupal.org/node/18429

 

Over the last few months, I've become involved with the Qcodo and Drupal projects.  I use both projects and believe in both of them.  Because I love Drupal and Qcodo and want to use both, I've created a mashup of the two for use in my own projects.  I've shared this code with a few people and the response has been positive.  So, I've decided to release a preliminary version.  Eventually this code will live in the QForge.  When that happens, I'll update this post.

WARNING

I need to put a disclaimer on this code.  My initial goal in writing this was to create a tool I could use to easily build data driven websites.  Drupal and Qcodo turned out to be a good fit.  I use both frequently, so a mashup was a logical next step.  As such, it started out very much as a "hack".  I didn't follow the Qcodo way of doing this, I didn't follow the Drupal way of doing this.  I went my own way and it worked.  I've been somewhat surprised at the positive response I've gotten regarding this hack.  Hopefully in the future I'll be able to grow the code to a mature state where it will follow the standards of one of the projects.  For now, just realize that this was created out of need rather than to do something the "correct" way.

REQUIREMENTS 

  • Apache
  • PHP 5.0+
  • MySQL 4.0+

Qcodo requires PHP5.  I've tested the database bridge with MySQL 4.1.  I think it would be pretty straightforward to switch over to Postgres as Qcodo and Drupal both support it, just hasn't been attempted.

INSTALL

  1. Install Drupal.  You must use Drupal's MySQL adapter, NOT MySQLi!!!
  2. Download the attached QDrupal file.
  3. Extract it into your Drupal modules directory.
  4. OPTIONAL: Rename the module.
    1. Rename the QDrupal directory.
    2. Rename qdrupal.module to myname.module
    3. Rename qdrupal.mysql, qdrupal.relationships to myname.mysql, myname.relationships
    4. Modify myname.module and change any mention of qdrupal to myname.  You'll notice most of the functions are named qmodule_*something*.  This was done to facilitate easily renaming the module depending on the project I planned to use it in.
  5. Based upon your settings in the qmodule_bootstrap function (name prefix, codegen exeption), create your SQL tables with a 'mymodulename_' prefix (adjusted to your modules actual name, if changed).
  6. Enable the module in the Drupal admin panel.
  7. Enable the menu options you want in the Drupal admin menu panel.
  8. Click on the "CodeGen" menu option to generate your data structure.
  9. View the generated forms in your Drupal theme by using the Form Drafts menu option.
  10. That's it!  None of the Qcodo install steps are necessary because they inherit their configuration completely from Drupal.

 

NEXT STEPS

Qcodo was designed to generate code that may be used as a starting point for your application.  Therefore, inside your new QDrupal module, there lies a pages & templates directory.  When the QDrupal module is enabled, and you go to the URL http://DrupalInstall.tld/installpath/?q=qdrupal you should see the contents of the Hello World page that lives inside the pages directory.  You should place your production forms here. 

Qcodo also uses templates to dictate the design of pages.  These should be placed inside the templates/ directory.  I've created a handy function to help Qcodo find the relative path from the pages directory to the templates directory called "qmodule_tmpl_path('filename')".  Use this whenever trying to point to a file in that directory.  Placing your template file into the pages directory and expecting Qcodo to simply find it (as it normally does) DOES NOT WORK!

BONUS

On a side note, this release of Qcodo also has my REST Server built into it.  The REST Server is currently being rewritten and this is the old version.  Look for it on the QForge when that comes online. 

FILE

QDrupal-06-22-06.tar.gz