You are not logged in Log in Join
You are here: Home » Members » logik's Home » Why use XMLRPC with Flash

Log in
Name

Password

 

Why use XMLRPC with Flash

If you are going to be communicating with Zope via Flash, why use XMLRPC?
So you want to use Flash to display dynamic content on your Zope/Plone site. In the past you have written server-side scripts to create XML and then ActionScript to parse the XML because this is the method you are used to and comfortable with (as was I) - or you have used the horrid text&file&get&string&format.

So, Maybe you've heard of XMLRPC but wasn't sure how to implement it or thought you might have to first write a whole XMLRPC compliant library for Flash! Well there's great news - the Library has already been written in ActionScript 2.0 and it is a piece of cake to use. But lets first compare our traditional method to using XMLRPC.

Steps for the traditional method:
1. Write server-side query to pull data from portal_catalog
2. Write server-side script to format data (XML, csv, etc) (ugh)
3. Write ActionScript to load data
4. Write ActionScript to parse data
5. Perform desired task with data


Steps for XMLRPC method:
1. Write ActionScript to load data
2. Perform desired task with data


Wow! With XMLRPC the biggest PITA's (steps 1,2,4) are no longer needed because they are taken care of by Zope and the Flash XMLRPC library.

Just to show I am not lying about how simple it is, check out the sample below



As you can see, I didn't have to write any server-side scripts or ActionScript to parse data files. All I had to do was call the 'contentIds' method on my Member folder. I was then returned the ids in an Array. Magic!

Start using XMLRPC with Flash now: http://xmlrpcflash.sf.net
E-Mail Me: xmlrpc AT dopelogik.com

Comment

Discussion icon The power of Zope :)

Posted by: d2m at 2004-09-16

There is really no magic in that - its all available with Zope since 5 years now. In case people are seriously interested in using Zope and XMLRPC i recommend reading a book like Programming Web Services with XML-RPC (ISBN: 0-596-00119-3).

Comment

Discussion icon authentication and binary objects.........

Posted by: neelixx at 2004-12-06

I looked at the docs for the xmlrpc actionscript library, but I didn't see any authentication methods. Since xmlrpc is still dependant on zope authentication, how do you go about this in actionscript?

Also, is there a way to bring over binary content into a Flash MC? Since I can't "query a database" for the image location, how can I bring this over to flash from a zope object? Any workarounds?

If I can get through these two hurdles, my zope/plone/flash programming should be kicked off! :) I already have a project to start........