This week I am gonna come back and do some Flex applications. I still think that the technology is just a tool to make our life happy no matter how advanced the technology is. Some friends of mine always talk to me about new technologies or new program languages. And I am also very happy to listen and I wish I have time to learn and try these new stuffs. But still, my philosophy of programming is using the most efficient tool to solve the current problem.
Are Flash and Flex Dying?
Currently, lots of people say that flash is dying and HTML5 will be the future for website games. Even in the mobile platform like iPhone, iPad or Android tablet, html 5 will get widely used. For native mobile applications, HTML5 still can play the role, working with Phonegap, even though Object C for iPad/iPhone and Java for Android Phone are the first choice. And the risk of flash is that less and less mobile platforms want to support it by default. For the least Windows 8 and IE 10 news, they will not support the flash player by default either. Even Adobe itself also announced they would stop the support for flash player in mobile platform. Does it mean they already surrender? To be honest, as a plugin for web browsers, flash player technology is so easy to be killed without support of other web browsers companies.
Why is Flash still there?
I always argue with my colleague about the Flash and Html 5. Not about whether it will die, we are talking why Flash is still there. From my point of view, Flash still has been live for a long time because there is not a better solution to replace the Flash. You may point out that HTML5 can do everything which Flash can. Yes, that’s true. But do you know how long it will take to create a simple tween animation by HTML 5? And there are even no standard ways to do it. You can implement the animation in SVG, Canvas or CSS 3. But are you sure your implementation will work in all browser? I have tried lots of examples in html5rock. But not all of them work well in my iPad with latest IOS 5.
What does the flash take to us?
The smooth animation both in 2D and 3D are the key features which still protect the Flash from extinction. Many people don’t agree this because the HTML 5 already has these features. HTML 5 can render the 2d animation in HTML5 Canvas component or SVG object. And Using the CSS 3 with Javascript, you can do some 3D animations. But neither effect nor performance of the animation which is implemented with HTML5 can compare with that implemented by Flash. I think that is the main reason why most of the Facebook games are still implemented by Flash.
Survive By AIR 3.0 For Native Apps
I think Adobe also realized that there are too many risks when they rely on the flash player plugin technology, so that they updated their AIR technology to support multiple platforms like Windows, Mac, iPhone, iPad, Android phone and tablets. As they said, the AIR applications can be compiled to run in all platforms with the same piece of code. But the fact is it is not so easy. I have programmed in Flex language for almost three years. And there was a big updated in the middle. For the flex 4 with spark skin update, we can not find any way to update our applications but reprogram the whole project. And for me, the most complicated job is customizing the skin (UI). Maybe there is a simple way to do it, but I only find a few tutorials about it and all of them ask me to write a skin class for each component skin. (In Flex 3, we just need to make UI in the flash and assign to flex component by CSS.)
HTML 5 Features I like
I am a flash/flex programmer, but I totally support the HTML5. And there are lots of features I like, such as application cache, localStorage, web SQL & indexed database, web sockets and server-sent events, local file access, and graphics. Especially for the graphics, there are many new features which deal with graphics on the web: 2D Canvas, WebGL, SVG, 3D CSS transforms, and SMIL. In the feature posts, I will try the HTML5 technologies and give out some examples which I feel they are full of fun.