Articles

Monthly Archive for July, 2010

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’