UI Development (2)

January 17th, 2008

For the sake of memory leak, I couldn’t tell the exact time but it should be around VB 5.0 timeframe, there was a “new trend” in UI development, the HTML.  Desktop applications embedded HTML engine to render their UI.  The reasons that I could remember were:

  • It feels cool!
  • It’s much easier to deal with i18n problems with HTML.
  • The look-and-feel of the UI is no longer constrainted by Windows Control, and sometimes it’s easier than doing full customized GDI drawing by playing GIF tricks in HTML.
  • One can seperate presentation from business logic in a cleaner and easier to understand ways.

The most popular way to do embedded HTML UI (till today) is to embed Internet Explorer via IWebBrowser2 COM interface.  There are some additional benefits to do so:

  • One can penertrate firewall and transmit data with backend servers by utilizing existing HTTP/HTTPS functionality built in IE.
  • By creating a desktop application, one can do something that can not be (easily) done by pure browser-based thin clients, such as drag-and-drop or fine grained printer control.

However, as we all know, there are many drawbacks to embed IE in the application, such as carrying over the vulnerabilities of IE, memory/resource consumption, crappy error handling in JavaScript, … etc.  Many ISVs still choose to use this technique regardlessly because the benefits of using it are too huge to trade-off. 

By the way, IE (or should I say, Microsoft) is not interested in supporting non-XML-based CSS.  As a result, one is forced to use alternative ways to achieve things that could be done easily with CSS, which increases the complexity and maintenance cost of the program.  Did I mention that JavaScript is super slow and super hard to debug?

There are other choices of HTML rendering engines, such as Firefox Gecko, or HTMLayout.  Both engines provide better support for CSS.  Maybe we will see more applications that are powered by Gecko in the future.

Reviews & Comments, Technical, Windows | Comments Jump to the top of this page

Comments are closed.

Chef Peon's Melange

Archives

Meta

Social Links