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.

No comments:

Post a Comment