Raymond Camden's Blog Rss

Yahoo Traffic API with ColdFusion and Flex 2

15

Posted in Flex, ColdFusion | Posted on 09-29-2006 | 3,531 views

I've talked before about how much I love Flex 2. While I still have trouble remembering the syntax and API at times, I love how it is just as RAD as ColdFusion. How RAD is it? I tend to wake up pretty early. This morning I had a good hour before the kids woke up for school. In that time I took my Yahoo Traffic API sample and turned it into a quick little CFC. I then built the UI you see below. It is a bit big so you may need to increase your resolution a bit. As always - don't hate me because my UI skills suck.

This is one hour of work folks. I've attached the source to this blog entry. As with my other demos, I changed the app ID used in the CFC. That should really be passed in by Flex. I also didn't make the image sizes for maps configurable via the client, but hey, it was a quick demo!

Download attached file

Comments

[Add Comment] [Subscribe to Comments]

Really nice work! Just FYI - if the 'Details' text is long, you'll get a scroll bar (no big deal really).This is pretty handy though.

I am a big fan of Flex also, just haven't found the time to put together the demo I've been thinking about yet.
Nice work Ray!
Niiiiccceee. I'm actually a been Duran Duran fan. I actually saw them in concert back in high school.
Q: How come Flex2 wasn't called reflex?
Ray,

As always, I love your blog, and I am a big fan of (most :)) of your work, but this same application could have been built w/ CSS and AjaxCFC without the Flex2 overhead.

Now, I must admit that I am a bit impressed - this did seem to load MUCH more quickly than Flex apps were loading the last time I took a look at them (and its been a bit), but I am still not overly convinced that Flex2 is the best method by which to build RIA applications like this.
Ray,

Never ever again should you admit that you saw Duran Duran in concert :)
Well, it is a rather simple example so it may be a bit contrived. I like AJAX myself (now that I've gotten into Spry).
Don't misunderstand me (and yes, I remember we've had this....disagreement? in the past) I understand the potential of Flex2. I just think that one can reach the same goals without the overhead with AjaxCFC (and no, I truly have nothing to do w/ Rob - only laid eyes on him once).

AjaxCFC's communication w/ the server after the app if loaded might not be as speedy as Flex2, but the initial load time is miniscule, and (at least for our users) that is the big deal. They simply don't want to wait for the page to load.

If there weren't any other options, then maybe I'd be willing to live w/ the load time. But there ARE, and while I would never say "I'll NEVER use that" about ANYTHING, I am always going to look for the best compromise between 'look-and-feel' (which, lets be honest, is really what Flex2 is all about) and functionality.

Anyway, again, I apologize for (once again) using your blog as a soapbox in my crusade against Flex2. And to be honest (though I haven't looked at it in....hell, months, I think) I am not overly impressed w/ Spry - just doesn't seem like its grown up yet...

But believe me, Ray, I will be looking over your shoulder to see what you're doing and keeping an eye on how you're doing it :)
I want to see this working but I can't get a zip code that produces any results. And, I've tried a few major metros in the south florida area.

What radius are you using? Can you make that a drop down?
Brett: Try city and state. Ex Dallas, Tx
Why am I getting reports from May 2005? (try Houston)
No idea Sam. The API doesn't have a date option, so it isn't anything I can control.
Does it have a radius option?
Yep. I'd suggest checking the API doc I linked to.

[Add Comment] [Subscribe to Comments]