| Subcribe via RSS

XML-RPC in Actionscript 3.0 – couple of gotchas

July 25th, 2008 | 2 Comments | Posted in Actionscript 3.0

As part a recent project, I’ve needed to integrate a Flex 3 application with an existing XML-RPC webservice. Over the years I’ve not done a huge amount of webservice integration with Flash. In the past I would typically choose to send data back and forth from the server using the built in XML or LoadVars objects available in Actionscript 2.0. On a couple of projects, I ended up using the Flash Remoting API and AMFPHP to achieve what I wanted and everything turned out pretty well, and once I integrated an application with some .NET SOAP webservices. But XML-RPC was a new one on me.

Anyway, after a bit of research, I was a little surprised to discover that XML-RPC hasn’t already been supported by the Flex framework, but after looking around I came across as3-rpclib, an open-source library that not only supports XML-RPC, but also AMF0 and JSON-RPC (I’ve currently only used these classes with XML-RPC, so can’t comment on the other formats implements).

So far, the classes have worked really well for me. However I did hit a couple of stumbling blocks along the way which I’ll attempt to detail here.

Continue reading XML-RPC in Actionscript 3.0 – couple of gotchas »

Tags: , , , ,

PureMVC – Multicore vs Standard / Singlecore

July 23rd, 2008 | 2 Comments | Posted in PureMVC

I’ve recently started using the Actionscript 3.0 Multicore implementation of PureMVC in order to use the framework within a modular Flex application. At the time of writing, most of the PureMVC examples and tutorials online are relevant to the Standard, or Singlecore,  version of the framework.

In general, the methodology and syntax is indentical across both versions of the framework. There are, however, a couple of minor differences which are pretty important, as without understanding these little quirks, many of the sample applications built using the Singlecore implementation will break when ported to Multicore.

The Standard version of PureMVC uses Singletons to provide access to the framework’s core actors. Within the framework, access to the Facade, Model, View and Controller are all provided using a standard getInstance method. To allow multiple instances of the framework to co-exist, the Multicore version of the framework uses Multitons, and then access to the various actors is provided within the framework by passing a unique instance key to the getInstance methods. The idea is simple – each separate instance of the framework has its own unique key, and so multiple instances of the actors may co-exist without interfering with each other.

Continue reading PureMVC – Multicore vs Standard / Singlecore »

Tags: , ,