Articles

introducing the amfserver, a zend based drupal 7 module

After the release of Drupal 7 last januari there has been a lot of work done on integrating Drupal 7 with flash, flex and air.

We released the amfserver module about a month ago which is a drupal 7 module which allows you to integrate all your actionscript clients via the amf protocol to drupal.

The DrupalProxy classes from our opensource actionscript 3 library have also been upgraded and they now work with both Drupal 6 (amfphp module) and Drupal 7 (amfserver module) even though the underlying implementation has changed.

For you as a programmer, nothing will change and you can use the DrupalProxy as you would have done in D6.

We’ve added some pretty exciting features, like the zend framework as the underlying amf engine. Classmapping is implemented and configurable. It also works for standalone flash clients; you can login and keep your session via low level amfheaders if cookies are not enabled.

It makes use of the services 3.0 module and has much more configuration options than previous amf based integrations.
There’s a lot of information on the amfserver page on drupal.org, so check it out! There is info on how to use it, how to install it and demo code is included in the module itself.

Another step forward for integrating our favorite content management system with actionscript based clients.

cheers!

Article on DrupalProxy featured in webdesignermagazine.nl

We recently published part 1 of a 2 piece tutorial on integrating drupal 6 and flash in the march edition (nr 34) of the Dutch leading web design magazine webdesigner.nl.

The second article will feature in the may edition and is an advanced tutorial on how to use drupal services with the DrupalProxy. Handling authentication and security, views, the cck, custom modules and some more.

The tutorial is supported by a demo site where you can download the full source code and other info.

check out our facebook page for more info and we’ll keep you posted on the next article.

dpdk opensource package now available for download in zip format

We have now posted a link to a zip file containing the latest iteration (currently 505) of our opensource package. You can find the link in the source code page.

There is no more need to check out the source code via subversion (svn), although you can still do that. The svn version might be a more recent one if we add new features so be sure to check out the revision number of the zip file download against the revision number of the svn repository.

presentation and code of the adobe user group xl (augxl) 2010 online

Yesterday we presented a session at the adobe usergroup xl 2010 event about integrating drupal and flash via the drupal services module, the drupal content construction kit (cck) module and our opensource library with the DrupalProxy. On the accompanying website for the presentation you can find the demo, the demo source code and a download of the presentation itself, click here to get it.

We also introduced the new DrupalInvokeTask which makes it enormously easy to use all calls to core and custom service call in a sequence of tasks that execute asynchronously. Read up on how to use sequencing with our very powerful sequence package in this earlier blogpost about them.

The demo code of the presentation that you can download gives you an excellent insight in how to use sequencing and the power of it, with some tasks (including the DrupalInvokeTask) of our library.

DrupalProxy as a bridge between flash as3 and drupal via amf

Drupal is a multiple award winning opensource content management system. With the drupal services module, it’s possible to consume data from drupal in flash. Drupal is a very powerful tool to provide data to flash movies and with the community investing much time in drupal services, now is a great time to be using drupal to power your flash websites. Services will be part of the drupal 7 core release.

We decided to UPGRADE our nl.dpdk.services.gephyr package, which is a drupal as3 service which acts as a bridge between drupal and flash. It has all the functionality of the drupal services built in, including the ability to connect to existing core services and any custom service implemented, out of the box. There is no need to extend it or customize it. Furthermore, it makes use of all drupals’ security mechanisms via key and session based authentication.
It has more features and packs more power than any other opensource actionscript 3 based drupal package out there at the moment, inluding our now obsolete DrupalService, so be sure to check it out from svn and start using it today.

It has a well thought out and consistent api, very tight and tested code, is easy to use, and features the ability to use the security mechanisms that are used for the drupal services backend module.

We feel that this is the implementation that ends it all and provides no more need for any other package for communicating from as3 to a drupal backend via amf and the services module. If you do however need to alter or add code, you can either subclass the class and implement some of the protected hook methods we have put there just for that purpose, OR, you can write an adapter for it. As stated before, that should not be necessary.

The architecture of the nl.dpdk.services.gephyr.DrupalProxy class is based upon using our drupal code extensively in commercial projects and from user feedback from the drupal community. It is based on the proxy design pattern as a remote proxy to the drupal services module.
Continue reading ‘DrupalProxy as a bridge between flash as3 and drupal via amf’

Reconfiguring the Loader with custom load tasks

In a previous post about the loader package, we explained how it can be used to bulk load different files into your application. That post also mentioned the possibility of adding custom mappings and load tasks to the loader for any use cases that are not supported by the default implementation. This post will explore these features in more detail.
Continue reading ‘Reconfiguring the Loader with custom load tasks’

a configurable, pluggable, thread safe prioritized bulk loader with object management

To solve the problem of loading assets in flash for once and for all, we’ve decided to release our nl.dpdk.loader Package containg our Loader class.

We’re very proud to release this package since it solves all problems with bulk asset loading and object/data mangement, at the same time making it extensible by other users to write their own loading schemes if necessary. On top of that, it is prioritized so you can rearrange loading priorities (so you can decide which files will always be loaded first in an application, or even change that at runtime), you can instantiate multiple Loader objects and they are automatically managed behind the scenes making sure that the loaded files are queued up and managed centrally behind the scenes. Data that is associated with the file you want to load is managed for you and keeps it’s association with the file to be loaded, so that when it has been loaded you will have easy access to the associated data. Each module in your application can instantiate it’s own Loader object but because of priorities that can be managed, each module can make sure that it behaves as a good citizen and set their own priority, so that important files can be set with a high priority and will be loaded before lower priority files, without each module knowing other stuff is being loaded at all.

It features file progress statistics about how many files have loaded, the bytes, how many files to load etc.
You can load different types of files (xml, bitmap data, swf, binary data, sound, text etc) and if they are not available by default (eg: zip files) you can easily write your own task to do that and plug it in the system and it will work with all the functionality already made available through the loader.

There are lots of details to cover and to explore which we will do in this article, and if you want more details, take a look at the source code to find out about the full power of the Loader.

Continue reading ‘a configurable, pluggable, thread safe prioritized bulk loader with object management’

Sorting and custom sorting

In an earlier post we introduced the Collections package, which includes several ways of keeping track of objects in your application. The Collections package includes a number of very powerful features, such as search using the specification pattern and many ways of sorting your data. The latter will be elaborated upon in this article.
Continue reading ‘Sorting and custom sorting’

Soundex algorithm for indexing strings by sound in Utils package

We’ve just released a Soundex class which enables you to get an output string from an input string that represents how the input string sounds. This enables you to find string and words that sound alike.
As an example “Ralph” and “Rolf” and “Rolph” have the same soundex output. This class might be very handy when doing a phonetic lookup on a search string, when you don’t know the exact spelling of a word or when you’re interested in getting results ‘near’ your search query.

You can find more information on the soundex algorithm here on wikipedia
The usage is very simple:

//outputs the soundex string "r4l0"
var output: String = Soundex.create("rolf");

There’s lots of other useful little tools in the utils package, so be sure to check them out

Wait for user input in your sequence

We’ve been using the task based sequence for a while now and are very pleased with it. One thing we missed, was the possibility to listen to an event.

Besides the ConditionalTask (which waits for an other Task to be completed), we’ve now added the EventListenerTask. This task waits until an object has dispatched an event before continuing the sequence.

Here is a code example

//create a new sequence that will hold tasks
var sequence: Sequence = new Sequence();
//wait until the user clicked on the 'myButton' instance
sequence.add(new EventListenerTask( myButton, MouseEvent.MOUSE_DOWN );
//call a callback method in the present scope
sequence.add(new CallbackTask(onDone));
//start the sequence
sequence.execute();

With this new Task it’s very easy to (for example) pause the Sequence until the user pressed a button or pressed a key… or until some other object dispatched an event.