General Principles:

  1. This is not a Web page. It's object-oriented software. Use nothing that deals with the DOM as strings of HTML. So no document.write, getElementById, innerHTML, or treewalking the DOM.
  2. The 2 Trees: Javascript and the DOM. Create DOM elements using the DOM's ECMAScript bindings. Create a Javascript reference to every DOM element as it's created. Then DOM elements will persist while added and removed from the display layer. Arrange these JS references in a tree of convenient namespaces, with enough resemblence to the DOM tree that the connections between the 2 trees are intuitive.
  3. The client UI works like a desktop app, not a Web page. One persistent dynamic environment, not multiple pages. No Forward and Back. Deep and intuitive interactions.
  4. Separate data from display. Never store data in the display layer. Data cascades from JS tree (where it lives) to the DOM tree (where it is presented).
  5. 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.
  6. Name freedom: Modules should never force variable names, file names, CSS rules, etc. to conform to internally-defined naming conventions.
  7. Define all layout data (images, colors, dimensions and properties) in CSS. Firstly, because having it all in one place is organized. Secondly, because then we can change skins easily by swapping stylesheets
  8. (more to come)