| Register
Thursday, August 07, 2008   

Call for Entries: Flash Zen Garden

Created By  Jed Wood, at  9/9/2004 - 9 comments.

Click to view this author's website.

First, I just want to make the official http://www.flashzengarden.com/blog/?p=2. I'm in a bit of a chicken-egg problem here, because a main function of each entry will be to display info about the other entries. For now I have some dummy titles and fake descriptions up there, so you might have to use your imagination a bit.

Okay, now for Remoting vs. XML.

In my http://www.actionscript.com/flashweek/00000657.html introducing the idea of the Flash Zen Garden, many of the comments said something like "Make it be an XML feed! Don't use Remoting!" That didn't really make sense to me, so I pinged a few experts. They all confirmed my suspicion that XML is more widely understood and accepted, but that they use Remoting whenever possible because of its advantages. Here is a diagram showing what is currently happening with the Flash Zen Garden setup:

Diagram of Flash Remoting

The arrays and objects of information come into Flash ready to be used, no translation or parsing required. Alternately, with just a few div tags and some CSS, I'm able to pull the same data objects and display them in the browser as XHTML. Now let's look at what it would take to add XML support to Flash:

Notice the extra steps? Not to mention that the data transferred via Remoting is in binary format, making it much smaller (unless you use http://www.actionscript.com/flashweek/00000652.html). So why wouldn't you use Remoting? I'm going to guess at three possible reasons, answer them quickly, and then turn it over to you for comments:

  1. Remoting requires all this backend set-up stuff. I'm a Flash developer, not a server geek. Fair enough. Remoting can be a pain to initially set up. However, it's already been done for you in this case. Cross that one off.
  2. Remoting costs money, not only for the Remoting software, but for the server-side languages it's supported on (ColdFusion, .NET, etc). True, which is why we're using http://www.amfphp.org/. There's also http://www.openamf.org/ for the Java fans out there, or you can even use http://simonf.com/amfpython/ Of course, even if we were using ColdFusion, that part of it would still be provided for you in the case of Flash Zen Garden .
  3. I'm just used to XML, and have never bothered learning Remoting. This is the one answer I sympathize with the most. I spend a lot of time working with Flash, but I'm just now getting used to AS 2.0, have never even looked into FlashComm server, and have been waiting for months to try out the educational license I received for http://moock.org/unity/. It's easy to just stick with what you know. Well, by now you can probably guess what my answer is going to be: yup, solved that as well. Rather than exposing the remoting calls directly, I've created another layer that handles the calls and results. It's a pretty simple system of creating your own object, adding it as a listener to the main "FZGcore" object, and specifying the callbacks.

The sample FLA has a few comments. If you know how to use basic arrays, objects, methods and properties, you should be able to create a Flash Zen Garden interface without ever learning a thing about Remoting. Now, if you still want the XML option, tell us why. I'm sure there are other reasons I've missed. I'm especially interested to hear from those that have used both Flash Remoting and XML extensively, as I will admit that I've rarely used XML with Flash.

Need Professional Help For Your ActionScript Project?
ActionScript.com Consulting Services provide top quality professional ActionScript consulting to businesses around the globe. If you have a professional project in need to world-class talent, tell us about your project by requesting a quote today.

Reader Comments

  1. emberton  Replied:
    ( 9/10/2004 At 11:51 PM)

    Congrats on getting this happening man, but what's so difficult about writing an XML packager for your objects? It wouldn't have to come from the XHTML source as your diagram suggests, just an alternative PHP function spitting out markup instead of AMF.

  2. Brandon  Replied:
    ( 9/12/2004 At 1:45 AM)

    There is a sub-section to reason number 1, above, as to why I haven't delved into Remoting yet. That is that I simply never have control over the hosting environments that I design/develop for. Clients have internal IT departments or external vendors who simply will not install Remoting at my request. For that reason, I've learned the server technologies that are available from project to project. The first time Remoting is an option, I'll be all over it. Until then, I’m being held down by the man!

  3. Jed Wood  Replied:
    ( 9/13/2004 At 2:17 AM)

    To Brandon's comment: Lately, that's become one of the first things I ask about when I'm approached with a potential project. If they are not going to either host through me, or give me a decent level of access to their servers, I make I very clear upfront that the work I deliver might suffer from those restraints. Not to mention the extra time involved in bouncing messages back and forth with IT departments to make sure cross-domain policy files are correct, folder permissions are set appropriately, etc. It's surprised me how much of that "server geek" stuff I've been forced to learn over the past 3 years.

  4. leland  Replied:
    ( 9/14/2004 At 10:33 PM)

    i agree with brandon's comments. i have learned remoting and use it when i can (ie on my own site), but i have yet to have one instance of a client that had the appropriate server set up to handling remoting or were willing to change their server configuration to do so. also, of the projects i have been involved with (there have been many) that had server interaction, more often than not the backend teams already had xml solutions in place or were developing them. usually .NET guys working with flash scripters like myself in my experience opt for xml, especially since the remoting option for .NET is about a grand per processor. depending on the application and server support this could run into some serious money. for instance, on a project i was working on at verizon they had 40 servers that would have had remoting support...that's a nice chunk of change.

  5. Mr. Potato  Replied:
    ( 9/15/2004 At 7:45 PM)

    It would be great if the zen garden had a forum for component themes.. Halo is nice but what if you want to have something look more integrated with the OS you are using.

  6. guleraz  Replied:
    ( 3/10/2005 At 11:45 PM)

    Weeeeeeeeeeeee

  7. Mariano  Replied:
    ( 3/13/2005 At 10:17 PM)

    I agree 100% with Brandon comments.

  8. mizanur Rahman  Replied:
    ( 4/3/2005 At 2:54 PM)

    Goody goody goody Goody goody goody Goody goody goody Goody goody goody Goody goody goody Goody goody goody Goody goody goody Goody goody goody Goody goody goody Goody goody goody Goody goody goody Goody goody goody Goody goody goody Goody goody goody

  9. Cal  Replied:
    ( 3/29/2007 At 12:56 PM)

    I guess the plans have been delayed indef. or abandoned?

    Did the sample FLA also get removed?

Login to post your comments. If you do not have an account with us please Register.
Copyright 2005 by ActionScript, Inc.   |  Privacy Statement  |  Terms Of Use  |  ActionScript Client Extranet