Tuesday, April 29, 2008


holyApp is a pure javascript framework for building desktop-like applications in a browser. It provides a rich environment of services, an ever-growing library of constructors for complex GUI elements, and some big ideas that tie them all together. It was released under the Clear BSD license by MetaCarta in November of 2007.

This framework - and the rich client applications built with it - follow a set of general principles:

  1. The UI works like a desktop app, not a Web site. There is one rich and dynamic workspace, not multiple pages.
  2. The code is object-oriented software, not dynamic HTML. Instead of generating HTML strings and injecting them into the document with document.write and innerHTML, holyApp uses the Document Object Model's ECMAScript bindings to directly create, destroy, and manipulate interface elements.
  3. Data, logic and UI are separate. There are distinct data and UI layers in the code. UI components known as Viewers are coupled with data structures to allow users to view and interact with data.
  4. The 2 Trees: Javascript and the DOM. We create a Javascript reference to every DOM element as it's created. That way, DOM elements will persist while added and removed from the DOM. These JS references are organized in a JS tree - with enough resemblance to the DOM tree that the connections between the 2 trees are intuitive.
  5. Because all elements are referenced through the JS tree, there is no need to reference by their HTML id property, as is the common practice. This is a big improvement because HTML ids are a one-dimensional namespace, and the multidimensional namespace of the JS tree is very well suited to the complex components being generated by constructors. Also, using getElementById() can slow down processing.
  6. All layout data (images, colors, dimensions and properties) is defined in CSS. Having it all in one place is organized. And we can change skins on the fly by swapping stylesheets
  7. The client runs the show, not the server. The server does not sent commands to the client. It sends only libraries and data. The server should know nothing about the client's internal workings. It should act only as a data store, network proxy, and occasionally a Web service for processes that cannot be done on the client.

No comments: