Future of UI on the Web?

HTML+CSS suck for building apps.

There I said it… I mean lets face it, building apps in HTML+CSS is pretty much like doing word processing in LaTeX.  What ever happened to decent visual tools? And I’m tired of dealing with weird quirky layout issues.

Don’t get me wrong HTML for building apps is definitely (eh) OK and it’s been proven that you can create applications at scale with it.  But I think you end up working around quirks in layout behavior way too much.  HTML was originally designed for making non-wysiwyg “rich” text documents. The ability to build apps is bolted on and feels like it.

Also I can’t help but wonder will the pinnacle of visual application design tools be Interface Builder or Delphi.  I don’t think we’ve really moved forward in terms of the visual tools used to build apps since the advent of these tools.  Rich Internet Application frameworks and plugins like Flash and Silverlight (along with FlexBuilder and Blend) tried to solve this within the browser.  But it’s looking more and more like these are going to fizzle out of existence.

So What to Do?

I think the core issue is that there is too much layout policy baked into the browser.  The included layout primitives (and their paradigms) don’t really do enough and in a lot of ways just get in the way.  And its not like workable application layout isn’t a solved problem.  There are no signs of layout primitives like springs and struts, dock-based layout or flex box layout.  Don’t get me wrong these things should not be baked into the HTML rendering of the browser.  Browsers should work more towards baking in less policy and favor more composible and programmable lower layers.  It turns out that HTML5 already has the right pieces.  Basically we just need a way to express visually what we need to express with minimal policy.  These are in the form of Canvas2d and WebGL.  Why not develop UI frameworks completely on these programmable foundations.  Just some examples of some interesting work that’s been done here and here.

The W3C should really focus on the edge.  HTML apps continue to inch closer and closer to being able to offer the richness of experience that a native app can.  The gaps really come down to insufficient edge interfaces and insufficient integration with the platform that the browser is running on.  Instead of focusing on enhancing HTML’s layout capabilities the W3C should focus on innovations at the edge (some illustrative examples) such as defining a decent programmable audio pipeline for input and output or a programmable pipeline for video decode.

Here are a few more edge problems that i’d like to see solved that currently limit how well applications completely built on top of Canvas2d and WebGL would fare compared to apps being built using HTML.

  • Virtual Keyboard management – The ability to programmatically detect and invoke virtual keyboards and events related to screen geometry changes when these have been invoked.
  • Accessibility/Screen Readers – The ability to expose accessible virtual objects and their metadata (eg. alternate text) to screen readers.
  • Input Method Editors – for inputting international text
  • Better clipboard and drag and drop support
  • Better geometry and orientation change events
  • Debugging - Exposing virtual DOM objects built as Javascript objects to visual debugging tools (in Chrome for example)

Leave a Comment

+ 2 = six