Sunday, May 2, 2010

HTML 5 vs Flash...standards based vs proprietary

I thought of an appropriate analogy. I've spent a lot of time working with both open, standards based technology AND proprietary technology, as have all of us.

There are advantages and disadvantages to both, making them each important in developing commercial software and rich internet applications.

Proprietary platforms vs Open ones are like two cars in a race. One has to follow a set of carefully constructed, committee determined rules. The other can simply race around, unfettered. If the object of the race is "getting there first", the proprietary car will almost always win. However, if the objective is more complex, then the proprietary car will be sloppy and unsuccessful, or too focused and inflexible to deal with unforseen events.

A direct example is rendering speed. When you look at a flash presentation, you dont care how it is rendered by the CPU or if it followed certain rules, you just want it rendered as quickly and efficiently as possible so your presentation is not sacrificed. Flash accomplishes this very well because it compiles into a very efficient, compressed code known as "pCode" that is interpreted by the flash player and pushed to the screen as fast as the processor will allow.

HTML 5 as proposed, is a "JIT" or Just in Time compiler, so the browser has to read fairly english like, inefficient tags and convert them to visual graphics on the fly. This is a relatively slow process, but it means if you go view-->source, you can more easily read how the product was created, and copy bits and pieces and paste them into your own HTML 5 document if you want. This is one of the best examples of open source.

Adobe, years ago, introduced something called SVG, which was like HTML 5 almost exactly, except quite a bit more advanced. Adobe wanted to compete with flash because it was owned by Macromedia at the time, a rival to Adobe. SVG failed to catch on though, primarily because it was slower, and less capable than flash. Adobe gave up, and merged with Macromedia, and now champions flash.

Flash does not decide to run only if the code is written perfectly, or if the content is intuitive and useful. Flash is not capable of making that kind of value judgement. That has made for a lot of bad press for flash, because a lot of coders make annoying ads using flash, or make unintuitive, inefficient programs that crash or use a lot of power unnecessarily. Flash does not test coders for their skill level before allowing them to compile for it, it just lets whoever make whatever, as long as they have a valid flash authoring tool. That has enabled some fantastic flash based content to appear, such as www.homestarrunner.com, and it has also allowed for a lot of really annoying stuff.
Given the coders skill and available processing power, though, in every case flash will run faster and more efficiently than SVG if it were created under the same circumstances.

Apple takes this several steps further, and that has been both its success and its failure. Apple has the philosophy that all development must be censored, controlled, and held to a certain standard before its user community can be exposed to it. This makes for a relatively virus free, consistent experience. Its like McDonalds, or Coke A Cola. You know exactly what you are going to get when you open a can of coke whether you are in Guatemala or Moscow. Apple also only runs on Apple hardware, rarely is compatible with non-apple peripherals, and maintains tight even tighter quality control over its iFamily of products. The result is a consistent experience across all devices you buy from Apple, and content that is guaranteed not to be offensive, annoying, or rude. A clean, happy world that is a digital utopia.

That world isnt desirable by all people though, many people in a free country value freedom of expression, freedom of choice, and the right to decide what constitutes "offensive" or "annoying" instead of having a corporation or government decide that for you. Steve Jobs has made it very clear he will not back down on compromising the user experience on his iFamily of devices, although on the Mac OS they do support flash, most recently announcing they have enabled low level hardware support for it. It appears that mr. Jobs is far more interested in his iFamily of devices, though, as he stated the iPad is the most important thing he has ever done in his career. It is possible the Mac OS may be spun off to another company such as microsoft one day, so Apple can be free to pursue their ideology unfettered by the Mac OS and their desktop/laptop computers.

The internet is not something Apple can control or censor (yet), but they can on their own devices and they are doing as much as they can to protect their digital utopia for their users. They have created the app store where developers can apply to create and sell their games and content as long as it meets Apple's strict requirements for functionality and cultural sensibilities. These apps can communicate with the internet and become special portals for websites that guarantee Apple control over what app developers want their users to see.

They do have a web browser app as well, but, many sites you view on an iPod or iPhone will be specially built to be more efficient on your small device. The website can detect that you are an iPhone user, and actually alter itself so that it is laid out in a way you can easily cope with on your device. So, when you "surf the net" on your iPhone, you are seeing a version of the internet that is special. One that is designed for you and your iFamily device. They also block flash, which most people surfing the internet can see (or block if they wanted to using a flash blocker)


There is, however, something strange here. Apple realizes that in order to sell their devices, people will want to look at the internet. Apple has, however, blocked flash on their devices to protect their digital utopia and encourage people to use their app store apps instead of playing flash games or viewing flash videos. Then it gets confusing, because Apple has publicly come out in support of HTML 5. HTML 5, they claim, can do everything flash does, and they want people to use it instead of flash. This is strange because if HTML 5 does everything flash does, why block flash in the first place? My guess is that Apple knows HTML 5 is much slower than flash at rendering interactive experiences, and that it presents less of a threat to their proprietary app store system than flash does. Also, since HTML 5 is open and easy to read the source for (as opposed to being obfuscated like flash's p-code is), HTML 5 sites are easier for Apple to censor, even censoring specific parts.

I dont pretend to read Steve Job's mind though, so I can only be confused like most of the rest of the world is.

To be clear, Apple is not acting out of character. They have been dedicated to the proprietary model since the beginning offering a "different" experience than their competitors. This has been welcomed by many consumers, because it makes the experience of using a computer and going on the internet less frustrating and confusing for them.

Competitors and corporations have shyed away from Apple for this reason though, because Apple does not allow them the same freedom that other platforms do, so they have chosen to risk the viruses and pitfalls associated with them for the benefit of the freedom to do what they wanted without having to check with Apple first, or in some cases, create their own proprietary systems and take responsibility for the viruses etc. themselves. I think this is the fundamental reason Apple maintains a relatively small but loyal sliver of the overall marketplace.

HTML 5 vs flash is more about standards vs proprietary, and the proprietary approach is the one that allows corporations to compete with each other and give their end users something optimized specifically to their needs without compromising. The standards based approach makes a platform more open and transparent, and fosters innovation by providing a common set of tools for many to use. If you want to build a product that is "better than the rest" and meets a specific need, you probably need to create something proprietary. This allows you to protect your investment from being copied easily, and enables you to demand support by paying for it as your budget allows. If you want to build something just to improve the plight of mankind and expect nothing in return, Open Source is the way to go. HTML 5 is great for websites where you dont care or even would encourage copying. Flash is great for building "rich internet applications" that you want to compete with others and do something just a bit better for a price.

Saturday, May 1, 2010

Many ludites suggest flash is going to be "killed" in the long term. Wrong.

Its hilarious to listen to ludites express opinions about things they have no concept of. They state that "one day, people will no longer have to download plugins and that is why flash will eventually die"

Flash is simply integrated into the browser, so no plugin or download required, this is already the case with Google Chrome. Remember when you would buy a PC with or without a math coprocessor? Probably not, but they arent "dead", they are embedded and its impossible to buy a computer without one. No one cares, no one buys a math coprocessor anymore or even knows what it is. Math coprocessors are there, they have not "been killed" they simply are invisible to the end user. This is what flash will eventually become, invisible to the end user. They will just see cool content and wont care if it is HTML 5, flash, or whooza wooza.

The future as I see it...HTML 5? Flash? whatza whooza?

I see Flash/Actionscript it as I've always seen it, a specialized UI tool for building rich internet applications, and there isnt anything else on the market that accomplishes this task as well as flash at the moment - and in the forseeable future. Should something come along that does it better, I have no particular loyalty to Adobe and would be the first to embrace the new technology, in fact, for the latest stuff I have been building flash files in non-adobe products for the most part, only using the free flash compiler that comes with the flex sdk to do my compiles - but I could be using something else if I felt it was worth the effort.

I think if Adobe is smart, they have an opportunity to blur the lines between HTML 5, flash, and anything else by simply making an authoring tool that compiles to any format, and even player technology or scripts that interpret flash to HTML 5 and back on the fly. This would effectively end the debate of HTML5/flash, and render "player technology" irrelevant, which it pretty well already is since flash is embedded so deeply in most browsers outside of the iFamily. End users dont care if their games are HTML5, flash, javascript or whatever, the only people who care are developers, so the drama continues. Adobe clearly realizes it is not in the "plug in" business, it is in the authoring tool business, so their authoring tools should continue to output in every possible format for every possible platform, the only limitation being the platforms and formats themselves. Adobe is in a better position than most companies, it knows how to write RIA authoring tools better than anyone, hell, it invented the concept. Adobe is capable of being so flexible, no other large corporation can really hurt it. For example, Apple said no flash on iPad. So, adobe makes a compiler within a few days that authors app store compliant software for the iPad. Apple gets angry, and responds by blocking any content that is authored by flash cs5. This is ridiculous, because you can bet almost every visual on the apple platform was partially designed using an adobe product, including the hardware. Apple has succeeded in making itself look like an immature baby, and Adobe simply says "fine, we did everything reasonable, and if you want to act retarded, we simply will focus our energy on another platform...android". Apple thinks they've beaten adobe...ha ha. Adobe's dreamweaver is CURRENTLY the best authoring tool for HTML 5, which Apple believes is competition to Adobe. Again, ha ha. Adobe outputs in SVG (HTML5's parent technology) - which Adobe essentially invented, and compiling html 5 from the flash authoring system is actually very logical, and flash CS5 will likely be the #1 choice for making html 5 canvas based content. Apple makes more money than Adobe, but they dont get content authoring like Adobe does. Neither does Microsoft for that matter.

What I am suggesting means that if a user who does not have a flash capable browser visits a flash site, the site could, on the fly, prepare an HTML 5 version for them automatically. This is not difficult, or particularly processor intensive, as it would only need to be done once for the particular platform. A "flash to html5" converter could reinterpret almost any flash site into HTML 5 automatically, so the legacy content would all continue to work without a hitch, and new content could be published directly to HTML 5. That is why HTML 5 is not the future. The future is..."who cares technology", IE the path of least resistance, lowest cost.

If I am an animator and it will take me 25 weeks to produce a cartoon in HTML 5 vs 2 hours in flash, there is no contest. If I can output in both formats with a 1 button publish, then there is no debate, not even a conversation about it. My animation will work on old browsers, new ones, iPads, apeDods and dewDads. THAT is the future, I believe. Whatever is cheapest, easiest, and gets the nerd junk out of the way so creatives can express without having to ftp the htp and mno the qrs. Html whatsit? Flash-a-who-eee?

There will always be a need for niche, customized software in spite of all the attempts by the drupals and nings of the world to provide an easy button because if something is too easy, it becomes nearly impossible to differentiate yourself from everyone offering the same product for free. So in this respect, the best language for the job will be the tool of choice, and right now the clear winner is OOP ECMA. All modern languages are ECMA compliant, and the others are dropping off because they are hard to use and clumsy in comparison, like Objective C, C, C++, Perl, PHP, etc. are the "olden days" and ECMA represents the modern languages like C#, Javascript and its growing libraries, Actionscript 3 etc, all of which can now be authored in eclipse. Again, path of least resistance for developers. I can write in ECMA languages for pretty well every platform, and they are all standard compliant, so the only difference is the compiler/player, which, quite frankly, I dont give a damn about. For me to publish our LMS in HTML 5 in two years, I likely wont have to rewrite any code, there will simply be another checkbox for "output to html5" and voila, done. Company saves millions, and I can concentrate on adding features instead of trying to comply with a non standardized language to rewrite everything...which is incredibly inefficient. ECMA is the "english" of the programming language world, and its already won. Javascript, jQuery, C#, and Actionscript 3 are all together on that front.

They used to say "content is king". I imagine that is still the case, and the amount of flash content out there that is in flash is massive, several orders of magnitude more than what is contained in the "app store". At the same time, only some of that content is video based and can be easily converted to HTML 5 for the iPad/iPhone. Its much easier to write a translation tool than to redo all that content, so that is most likely what is going to happen. Check out www.homestarrunner.com on your iPad for example. Those guys will NEVER spend the time and energy to convert 3 years worth of weekly flash episodes to HTML 5 manually, but a converter would take care of it instantly. The ONLY thing stopping a converter from being made is HTML 5 itself. The format simply isnt ready to handle the complexity required by that content to render properly, but you can bet the second it is ready, some free converter will be available and it will all run smoothly everywhere. For Steve Jobs and the iFamily's sake, that will hopefully happen sooner than later, otherwise many consumers will drop their iFamily product in favor of Android or whoever offers a full flash player because they can get all the app store games for free, as well as all the legacy flash content out there that will likely never be converted to HTML 5 manually. "If I can get "boob shake" app that Apple refuses to allow in its app store on Android for free without having to use iTunes or sign any kind of confining DCMA and basically remain anonymous...well, my iPod touch is going in the bin of old adapters and pocket pcs." says joe daily show fan.

Sorry about the long post, of course, but the issues here are complex and intertwined.