This site is now just an archive over the rise and fall of Flash. The domain flashmagazine.com is available for sale
Login | Register
Web Services, it’s about time.

Web Services, it’s about time.

You've heard about them, how great they are to use, how they have been a long time coming. But what are they really?

Written by David Vogeleer Once I was asked to build an app that would look through thousands of rows of products in a Fox database and I kept getting the same problem over and over again. Somewhere in the description of the products there would appear a comma. For those of you who haven't been messing with integrating Flash and middleware, when Flash receives data back, it gets it back in query string format of name - value pairs which means variables are set equal to pieces of data and each piece is separated by a comma. Here is an example of what might come back to flash:


Name=David,Mike,Todd&Age=23,33,25



You can then separate it into individual pieces thanks to the commas separating them. So imagine how fun it was to have to figure out where the extra comma was in one of the descriptions….it wasn't fun at all I assure you.

Thankfully though, at least I was writing the middleware, so I made it drop extra commas and replace them with something else, but imagine if I couldn't make changes I wanted to the middleware pages, I would never be able to fix it. Even worse, what if I couldn't even view the pages sending data back, I would have no idea what was being sent back to me.

This is problem that many developers are dealing with still (myself included), is the data isn't being given back in a common format, it's very difficult to scale middleware for multiple applications and more often than not, its easier to rewrite the pages sending data back, than to use the ones another developer built for a specific task.

Then comes Web Services. We've all heard about them but what makes them so great? Simply put, they return self-describing well-structured XML data that anyone can tie into on multiple platforms for multiple applications.

Web Services can do the same things as middleware pages (and a lot more), but unlike middleware pages, which return html or query string data, web services return nicely formatted XML data so anyone can use it, its not tied to any particular software or application. This is what makes it so readily available for anyone to use, and very easy to port over to different platforms. Also, because it sending back XML, it is self-describing, the tags holding the data relate to the data being sent back.

The web services themselves can be written in several languages, but they have a self-created XML document called the WSDL, which stands for Web Services Description Language. The WSDL is used to describe how the service itself works, showing each web method, and the arguments that need to be passed to it, as well as showing the hooks for several different ways to get the data out.

Web Services are popping up all over the place for things ranging from chess moves to translators as well as a few high profile ones such as Google and Amazon. Most are free to use and develop with, and both Google and Amazon require you to sign up and get a key to use them (free of course).

And here are a couple more links to web services:

http://www.webservicex.net/WS/default.aspx
http://www.xmethods.com/

This was just an introduction to what Web Services are and how they will become very important to web applications as the Internet progresses.

In the next article, I will show how to integrate Flash with a Web Service and what the key points are.

 

Get new stories first

Click to follow us on Twitter!

 

Comments

No comments for this page.

Submit a comment

Only registered members can comment. Click here to login or here to register