Saturday, April 21, 2007

Going flash and webservices

We released today our new home page. Given the nature of the site being real time and sports related we needed to have some level of dynamism that was best served by a flash design. The web services were developed with GeneXus, which made it really great to maintain all the advantages we get of having a great database modeling tool. We did have some issues consuming the web services from flash. For some reason the web service output as it is generated by GeneXus is not exactly the format that Flash was expecting and thus we could not consume it from Flash the easy standard way, we had to go to a more manual way of consumption.

We decided today to limit the number of times we're calling the web services to limit bandwidth consumption, so after a while the website stops refreshing and keeps a static look unless the user interacts in some way. We will not be able to do this for the inside leader board (this should be one word all together but no dictionary takes it) as people will use it specifically to do the automatic refresh and they will keep it ongoing as they play.

There are two concerns at this point.
The first is, as we get ready to change the look of the internal pages, we face the decision of how to integrate HTML aspx pages with flash components. The obvious is to reuse the flash header, menu and footer, although being that the header has the login embedded we already had some issues right there. Furthermore, we have to decide which inside page flash components are going to substitute aspx components and which ones ought to stay. It's like OK, where do we draw the line?
The second one, is the refresh issue. We have some loading time every time the page refreshes, when we show the borrowed progress circular animation we borrowed from Mozilla. It gets kind of annoying after a while specially when you go to an internal page and then come back and you have to go through the loading times again and again ... I'm thinking we need to implement some type of cache for these flash components but of course it's hard with flash limitations to do so. I thought of saving some xml as web services return values so Flash can read the xml of the last web service execution so the first time it loads it can get data from the xml instead of pulling the web service. Talking to our Flash expert in our software factory in Uruguay, South America (grande Mauro!!), we are not sure this would make a difference. Probably we'll do some testing soon. Another route is never leaving a Flash movie then you only load the first time. I don't think we'll go that way specially because of concerns about tabbing and other forms standard behaviors hard to emulate in Flash, as this is usually one of Flash's weak sides.

We're really happy with how the website turned out, the development was very fast and the result pretty stunning (borrowing some of our users comments). We'll keep experimenting and having fun with this type of interface that will allow us to have ajax like behavior in the home page with most likely a nicer look and lower development nightmares (yes, as in love with ajax as I used to be, I'm suggesting Flash is a better, more natural tool to make web 2.0 developments than ajax is).


Bijoy said...

Nice post, its a really cool blog that you have here, keep up the good work, will be back.

Warm Regards

Biby Cletus - Blog

Enrique Almeida said...

Good work!!.
I like it very much the UI of