Consuming Amazon with Flash Remoting
Subject:   Challenges for newcomers and many typos
Date:   2003-01-19 14:31:53
From:   anonymous2
Folks, I appreciate the article topic and the generally useful info shared by the author, but I have a couple of concerns. Since some may point to this as a good intro to using Flash to do web services, it seems worth pointing out some challenges, especially for those looking at Flash for the first time.

Sadly that article falls victim to the mistake many such "intro to flash remoting" articles do--presuming too much Flash understanding by the reader.

It says "create a new Flash File and open the action's dialog for frame 1", but if you don't know how to do that, or even what a frame is, you're lost at that point. Later it says "Using the text tool, create two text boxes on the main movie clip." Again, if one doesn't know how to use that tool, let alone what is meant by a movie, they'll be lost.

Of course, the info is valuable to those with a little more experience, but even then as an O'Reilly resource, it's shocking how many typos and otherwise challenging aspects there are:

- brick and motor placement firms (mortar)
- as if it where its own (were)
- build a Flash spotlight that dynamically list (lists)
- and we'll use to provide (use it to)
- to know about a XML (an XML)
- the elements wrap to the ("wrap to" doesn't seem to make sense. what is meant in this context? Perhaps simply "wrap"? See also "object that wraps to our XML Web Service's" and "callbacks wrap to the AsinSearchRequest")
- build a proxy, or interrupter, to our XML Web Service (interpreter?)
- for a ASP.Net server (an ASP.Net)
- let's build a interface (an interface)
- creates a AsinRequest (an AsinRequest)
- you should use load the jpeg (strike use?)
- we can call the AsinSearchRequest method and sent our AsinRequest (send)

It might also have been helpful to define ASIN somewhere (which is Amazon's identification number used as an alternative to ISBNs).

And while the article concludes that "the file will not work with out Flash Remoting installed and running on your computer", it should more technically add that this specific example won't work unless one is using ASP.NET. Again, for newcomers, it might have been helpful to at least point out that all would be needed would be to change the value for setDefaultGatewayURL, as well as perhaps show values that would have worked for CF and J2EE servers.

In the case of CFMX users, for instance, we would want to change that line to:

NetServices.setDefaultGatewayURL( "http://localhost:8500/flashservices/gateway" );

assuming the user is running CFMX with the built-in web server, or leave off the port for those using CFMX with an external web server.

One last concern: the error handling function only writes Trace statements rather than offering any feedback in the flash movie itself. This becomes more important because my attempts to use the code as is failed (after applying my own Amazon developer token and changing to point to my own CF server with flash remoting installed). The error indicated that:

Web service operation "AsinSearchRequest" ...could not be found

It may be that this is more a bug in CFMX's ability to process the web service as provided by Amazon (there seem to be some sensitivities about its support for some web services, perhaps due to the stub generation that CF does for us). If any other readers figure out what CF folks need to do get it working (even in just a CFINVOKE as a test), I'm sure many readers would appreciate it.

Again, I don't mean to knock the article entirely. There is lots of useful info for folks. It's just that for those coming to it on recommendations from others, they should know of some of the challenges (and hopefully I've saved someone the effort who would have wanted to post these same observations).

Even so, I'm sure other readers may disagree with some of my assertions. I look forward to further discussions.