Programming

Why Flash is still relevant in the HTML5 world

Gonzalo Rubio gives a few very good reasons about why we shouldn’t ditch Flash quite yet. Being a Flash developer, I admit to having my own biases, but I am also impressed by what HTML5 can do. I have been digging around the web for the last few days trying to figure out if at its current stage, HTML5 is capable enough to do heavy interactive data visualization work. The short answer is no. There are, of course, a lot of Javascript charting engines out there, but for performance-heavy things like maps, Flash is still better. As to the Flash vs HTML5 argument, I think a few of us only see black and white. Gonzalo seems to think that each tool has its own place in the future of web development. I agree. Below is the summary of the points he talks about in his article. Head over to his blog to read the complete post.

  1. The HTML5 spec won’t be ready for consumption for at least another 2 years.
  2. Flash is a mature platform, HTML5 is just in its initial implementation phase.
  3. Flash is made by a single vendor, HTML5 sees duplicate efforts by at least 5 different companies on at least 4 different platforms.
  4. Flash is built as a multimedia and animation platform, HTML5 is a progressive enhancement over a content centric and descriptive language
  5. Flash is good at what Flash does, HTML5 is good at what HTML does
  6. The Flash vs. HTML5 argument will implode after every Flash feature is ported into an HTML5/Canvas equivalent

When can I use HTML5?

html5 canvas support
Click on image to go to the guide

Ready to move your site to HTML5? Better check this browsers compatibility guide out before you call the shot.

Cooking an MVC framework for data visualization: Views part 1

In this second tutorial on MVC we will learn how to create a simple bar chart view. We will also cover a new concept called composite view. It is an important concept in the MVC world that allows a view to contain other views. It will let you build complex views out of small interchangeable pieces. When your application grows, it is crucial to write code that is reusable, so your application remains maintainable. Breaking views into small reusable chunks of code is one way to do that. Below is the result of what we are going to build in this tutorial.

The chart shows monthly unemployment rate since 2005 from the U.S. Bureau of Labor Statistics.

Continue reading »

Cooking an MVC framework for data visualization: Hello World!

For the last few years MVC frameworks have become a hot topic in the developer community. Many people love them and for a good reason. They make writing code much easier and more fun to do. The programs written in MVC are more scalable and easier to maintain. One of the biggest benefits is that if you learn one, you can probably learn others pretty quickly.

A few words about my background

I am a web developer and designer who specializes in data visualization. I have been using a few MVC frameworks such as Django, ASP.NET MVC and more recently iPhone SDK for my work and I can tell you, they are very similar. Since I am still learning these concepts myself, please let me know if I don’t make sense or I am completely wrong. I promise I won’t feel bad about it :) .

Preparation

In this series of tutorials I will introduce you to the MVC world. You will learn how to make your code cleaner and your applications more modular. Along the way you will learn a few useful design patterns, one of which is MVC, and how to apply them to your work. Although the main focus is on building a data visualization framework, many techniques are applicable to any kind of work.

These tutorials assume that you have general knowledge of object oriented programming and understand AS3 syntax. If you are not familiar with these, please go here and here.

Continue reading »

Iphone SDK 4.0 license agreement bans ported Flash apps

We are all excited about the new iPhone OS. Every time Apple releases something new, it does miracles or at least we are let to believe so. With features like multitasking, folder support, a new ad platform and the list goes on and on, how can we not be excited. But then still no flash support. Besides that, Apple has gone an extra step by preventing anything flash related from working on its platform.

Adobe announced a few months ago that they will allow you to compile Flash applications for the Iphone. Being a Flash enthusiast I was incredibly hopeful. Then yesterday the bad news came. You can’t use anything but Apple proprietary platform to build apps for the Iphone. I understand that they want to have full control over the apps to make sure that each app performs well and is best for the users, but I feel like living in “1984″ all over again.

I find it ironic that this is what Apple used to stand for.

Dirty Heating Oil in New York City

new york oil
Click on image to view the map

This is a map I created recently for the Environmental Defense Fund. It shows buildings in New York City that burn dirty oil. The map contains information about 9000 buildings that burn either type 4 or type 6 oil. Both types are bad for the environment.

My biggest challenge with this map was the sheer amount of data it has to load, parse and plot. Fortunately, AS3 is fast. It is a pleasure to see the parser churns through thousands of lines almost instantly. Another factor that made my life much easier was the map framework I used. I want to thank the people at stamen.com and the developers of modest map for creating an amazing framework. With just a few tweaks I managed to plot thousands of points on a map.

It seems like the story got a lot of attention. It was mentioned by The New York Times and Daily News.

To view the map, please click here

Stimulus tracker


Click on image to view the map

We learned and utilized many new technologies in this project. Unlike the Adversity index map where we didn’t have proper server-side tool to handle big data set and we had to use hacks, this project uses a brand new server-side tool to do the heavy lifting.

We built the server-side code using Django framework. This is the first time we are using this framework and it is awesome. It makes my life as a web developer much easier, especially when I was completely new to it.

For this project, we built a framework in AS3 that allows flash to communicate with the server and to make requests in real time. The framework makes it easy to parse responses from the server and deliver them to different parts of the application. With that, we are able to support deep linking, back button and breadcrumb.

Last but not least important is the new map engine I built recently. There are two parts to this. The first part is the script I wrote that runs through any ESRI shape file and parses it to native AS3 code. The second part is the engine that takes the code and renders it on the screen. With this engine, we can create pretty much any kind of maps quickly and efficiently.

View the tracker

Page 2 of 512345