HODGEDEV FLASH BLOG

AS3 Drupal Services Framework

by Brian Hodge on Feb.02, 2010, under Uncategorized

I have been working on a framework to ease the communication between flash and drupals services module via AMFPHP.

Click here to head to the google repository
You will require an SVN client to retrieve the current versions of the individual classes.

The workflow is rather simple,

First you require the Services class, which is built around the Singleton Design pattern and cannot be instantiated directly. Please use the getInstance() method.

Once you have a reference to the SINGLE Services class instance and have set the gateway property, you may then use the public connect() method, which utilizes the System class to connect and disconnect from the database.

The Services instance maintains/holds a valid session id, and NetConnection instance, which are both required by all Service Classes.

The Service class is an Abstract class and is not intended to be instantiated, but extended by the various service classes, such as Node.as.

if you wanted node data, you merely import the Node class, instanstiate a node object passing THE Service object to it and then call getData() on the node object.


Leave a Reply

You must be logged in to post a comment.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...

Archives

All entries, chronologically...