Follow me

No Deus ex Machina needed…
February 14, 2005|BlatheringsflashFoo

No Deus ex Machina needed…

It’s like the end of a movie, you know the last 5 minutes minutes when the Gods of Atlantis set forth their clarity of purpose, align the planets and all that was wrong becomes good? It was like that today. Well, [i]not really[/i], but it sounded good right?

Today we launched the new [url=http://www.zippohottour.com]zippohottour.com[/url] site, and it went off without a hitch. Everything works, there were no major catastrophies, no last minuted ditch efforts to kill the whole thing due to some random peice of nothingness that was forgotten, overlooked or left out cus’ someone forgot to have the double latte espresso-mocha-chino some 4 Fridays ago. So that’s why I find myself quoting Hannibal Smith.

Original? Nah… Apropos? Yurp.

So why the double topic post? Well, this is sort of another step in the long process of creating dynamic Database driven Flash sites using MX 2004 components and interacting directly with SQL databases. This is another example of that. Unlike [url=http://www.zippo.com]zippo.com[/url], the Hot Tour site uses the SQLXML components, not the XML connector. The difference?

The SQLXML components interface through a virtual directly and do not require a coded page as the middleware, rather it uses [url=http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/html/anch_sqlxml.asp]Microsofts SQL XML[/url] 3.0 as the middleware. This enables Flash to directly query an SQL database using a URL with a query attached as a querystring. The data is then returned in [url=http://www.w3.org/XML/]XML format[/url], an parsed directly by the SQLXML component in Flash.

The XML Connector on the other hand must have a coded page (such as ASP.NET, PHP, ASP, etc…) as the middleware to create an XML document from a set of static instructions or passed variables. This page, which in my case is all ASP.NET, then parses the data and reformats it as an XML file for the XML connector to parse in Flash.

The biggest difference is in how the data is returned. Right now the default way that XML is returned in .NET is [b]node[/b] based.

This produces a large file as there is a ton more text generated for each document. This also slows down the data transfer and parsing inside Flash itself.

SQLXML returns the XML data in an [b]attribute[/b] based format. This cuts down on file sizes and increases speed and efficiency within Flash. It also makes the document itself much easier to read (at least in my opinion). SQLXML also seems to run the data transformation faster than if it were run by an ASP.NET code page.

Right now, each of the sections of the Hot Tour site has its own SQLXML component and DataSet Component, to call, organize, store and display the data. Next I will be working on getting the entire site to use 1 set of connectors to call the data for the entire site. This could reduce the overall download of the site by 50k to 150k, not to mention make it easier from a development stand point since everything is all in 1 spot, not 6.

I will be working shortly on creating a tutorial for both of these uses in retrieving data from a database.

no comments