Monday, November 15, 2010

The Web, HTML5… It’s a Mess!!!

I sometimes get hassled for preferring to develop software to run on the computer desktop instead of as web sites.  Truth is, I don’t care if I get hassled about it.  I know how to develop for the web… part of my job involves creating web sites in PHP, and I think I do fairly well at it, but it doesn’t mean I like it.  And honestly I ought to be criticizing more people for putting so much emphasis on the web… not because it isn’t going to be the future, but mostly because they aren’t being more critical of the way things work on the Internet.

If you take a step back and think about the way that the web works, it’s really pretty silly.  We download a page with information.  We type information into a form on that page, then click a button to allow a computer somewhere else to process that information, and wait for an entirely new web page to be sent back to us.  It’s slow.  It requires that the same information be sent over and over again (everything on a page that hasn’t changed or doesn’t change).  It makes true interactivity slow and frustrating.  It’s silly.  We have these high powered devices we’re using to display static pages that have been created somewhere else. 

Imagine having a web page to do a simple addition operation: you enter 2+2.  You enter the data, click the calculate button, your browser sends that data off to some computer somewhere in a remote data center, it performs the calculation, and sends you an entirely new web page giving you not just the answer, but your original data, and every piece of the entire web page… You’ve just transferred a ton of data, wasted a ton of computing power, just to figure out the answer to a very simple problem.  Total silliness.  But it’s what we deal with every day, because that is the way that the web works.

Add to that the difficulty that web developers go through to make sure their web sites work on different browsers.  We create a page and it works perfectly in our browser of choice, then we try it in another browser only to find it doesn’t look (or work) right at all.  It’s very frustrating.  Again, it’s silly.  And it’s a very slow process.

Compare this with developing programs that run on the desktop (not in a browser).  They can be developed very quickly.  They run very quickly.  The development tools are mature and work very well.  They’re guaranteed to work the same on every computer they run on.  It’s SO much easier to make something work on the desktop than it is on the web.  We have access to advanced technologies that don’t work on the web.  Interactivity is amazing, performance is amazing, with things responding immediately when clicked. 

I know this makes me sound like a stick-in-the-mud to people who think that the web is the future of apps.  I’m not going to argue that things are moving in that direction, and that there are a lot of advantages to it.  My argument is that the way we’re doing things now is just… dumb, and that we’re making very little progress at fixing the problems.

HTML and the web in general were not designed to do the things that we’re doing with them.  HTML was written with the idea of serving informational pages… You view a page, you see a link to another page with more information on a particular topic, click it, and view the new page.  It was never designed with any kind of interactivity beyond that, and every attempt to make it work that way has been a hack.  Even things like logging into web sites and shopping carts are a total hack.  And despite the fact that we’re nearly two decades into using HTML, things haven’t really gotten that much better.  We’re still primarily serving new pages every time we change any data on a page instead of changing just the parts of the display that are affected by our data changes, waiting on a remote computer to do things that our own computers are perfectly capable of doing themselves. 

Not only that, but there just aren’t any great ways to define the structure of data entry, or how it interacts with the page or the web server that is saving and formatting it for us.  It has taken until HTML5, which still isn’t really implemented (and even then very poorly on virtually every browser) and it still isn’t done well.  Even if web developers choose to use HTML5 for their web sites, even the newest browsers still aren’t implementing most of it.  It’s ridiculous!  But more about that in a minute.

The development tools for creating web sites are still really bad too.  I have tried the “best of the best” of them and have given up on every one.  I have resorted to creating web sites in Notepad, because the supposedly “advanced” editors just get in the way more than they help.  I don’t understand why we keep putting up with this and aren’t pushing for something better.  A lot of it has to do with HTML not being designed for the way we use it, but even more-so is the fact that HTML has been very slow to evolve, and browser makers have done very poorly at implementing the changes that actually have been made.

Some web sites do make an attempt to improve the interactivity by only updating only small portions of a page when something changes through a technology known as AJAX.  You’ve seen it before on sites like facebook and where you click something and just one part of a page will change, but honestly few sites take this step because it’s difficult to implement properly.  And unless your browser settings are just right, it doesn’t work at all.

There are other problems too… like security.  You may have recently heard about Firesheep, a program that captures authentication information from other computers on a network and allows a hacker to visit popular web sites using your account without having your login information.  And most web developers don’t understand how to properly secure their sites to prevent outside access to their data.  Because it’s difficult.  These technologies are being asked to do things that they were never meant to do, and very few software developers understand the right way to do things, or even the importance of doing so.  Or they don’t care.

Most of these problems go away when you start developing software that runs directly on the desktop.  Most of the security issues go away.  The slow interactivity goes away.  The difficulty of updating the screen when data is entered goes away. 

Yes, I know that developing applications that run on the desktop does have its own set of drawbacks.  You have to write versions for each type of computer that might use the software.  The software has to be installed.  You have to install updates.  But in my mind the advantages far outweigh the drawbacks for many, many applications that are currently being developed for the web.  And these problems are being addressed anyway.

Eventually many the advantages of running software on the desktop will probably go away.  But we aren’t moving in that direction fast enough.  Developing for the web isn’t really any easier than it was 10 years ago.  Development tools have improved, but not much.  The technologies that power the web have gotten better, but not much.  And yet we as web developers continue to accept it, and some even criticize those that don’t condescend to using these bad technologies.


Last week I finally sat down to see what’s so great about this new HTML5 thing that’s getting a lot of press.  Frankly, I was sorely disappointed.

HTML5 doesn’t really add a lot of new capabilities to web sites.  It does add a few, some are kind of cool… graphics rendering and interactivity is one area where things are supposed to get a lot better.  There is the promise of a standard way to display video and audio (finally!!!! it has only taken nearly 20 years).  There are new ways to handle and validate data in forms.  But the changes basically stop there.  And honestly, most of these things aren’t even usable.

Each of the new features is either not implemented in a major browser, or isn’t implemented properly.  A few examples…

  • The new graphics features are only supported by IE9, Firefox 4, and Chrome.  Safari (which is what the iPhone, iPad, and Macs use) doesn’t.  And Chrome is the only one with a “current” version that even attempts it.
  • The new methods for displaying video are a mess.  Apple and Microsoft have elected to use one format for video, while Mozilla (FireFox) and Opera have elected to use something else entirely incompatible.  Google is taking a more neutral position with Chrome, supporting both.  But there isn’t a single video format supported by all of the browsers.  So you have to create two versions of every video, and provide two versions of every page that contains video to allow users to view it.
  • Audio is the same way.  The different browsers support different types of audio files.  No one format is supported by all browsers.
  • There is still no way to watch live video.  Only pre-recorded video and audio sources are supported.
  • The new features to format and validate form data are only supported by Opera and Chrome.  And Chrome’s implementation is horrible.  The other browsers don’t even try, even in their unreleased beta versions.  These features, which would be very useful and make web programming easier, are completely unusable to the 99+% of people not running Opera as their browser, and therefore are useless to developers.

You may have heard a lot of hype around HTML5 being a cure-all for some of the problems we deal with on the Internet (like Adobe Flash).  But based on what I have seen, it isn’t going to help anything because those creating browsers aren’t doing their job in implementing HTML5 properly.  It’s also very ironic that the most vocal of all of the HTML5 supporters, Steve Jobs, also has by far the worst HTML5 implementation of anyone.  Apple’s Safari browser is, without question, the least HTML5-compliant browser in use today.  It doesn’t even attempt to support the vast majority of the new features being added to HTML5, even in its latest version.  Not that the other browser creators are doing much better.


Ideally someday we’ll have a sort of hybrid of the two ways things are done now.  Store the software and data on remote computers, but download the necessary pieces to our local computer on demand, where things like interactivity and calculations can be handled locally.  If designed properly, most of the things we do now that require entirely new web pages be downloaded would be done entirely locally on our own computers, with only data changes being sent out remotely.  (Some might say this sounds like Java… but… ick, no.  What a terrible language.)  We would standardize on the tools for creating application user interfaces, and the way that the applications respond to user interaction.  We have sort of started on that path with technologies like DOM and AJAX, but they are too limited, too difficult to use, too inconsistent, and too slow to be able to develop meaningful applications that run primarily locally.  We’re still far too reliant on remote computers to do extremely basic tasks that have no place being run remotely.  I believe someday we’ll get there, but at the pace we’re moving now I’m not holding my breath… we’ll be lucky to see anything like that before 2020.

The Truth

The truth of it all is that even though I get criticized for preferring to develop desktop software most web developers deep down know that they’re using inferior technologies.  They know the pain of making stuff work across multiple browsers.  They know the pain of hand coding HTML and CSS to make sites look and work the way they should.  They also know that native applications work better than web sites too.  All one has to do is cite the iPhone as an example.  The first version of the iPhone couldn’t run native apps, and had to rely on the web to do anything other than what the included software could do.  Almost nobody took the time to create sites to run on the iPhone.  It wasn’t until the second version of the iPhone, with the ability to run Apps, came out that it started to really take off.  And everyone with an iPhone knows that running an App instead of going to a web site in Safari is a much better way to do things.  It’s much faster, cleaner, and easier.

It’s really a shame that web developers will criticize me for still preferring to work on native applications rather than the Internet.  Or is it more of a shame that most of them continue to believe that they’re working with state-of-the-art tools with state-of-the-art technologies, and not put more effort into trying to make things better on their end?  It’s also a shame that so many pieces of software that really should live on the desktop are being written (and being written poorly) for the web.  Each has a place, but because the internet is “cooler” than running programs on your computer, too many things that should be on the desktop are being pushed to the Internet, and are being done improperly.

In many ways things I was doing more than 20 years ago worked better on the computers I used then than things do today on the Internet.  Internet technologies have improved, but they are moving at a glacial pace.  And it both makes me laugh, and cry a little on the inside.

Google Search