Organization and Chunking!

I have been working on the Theme Builder UI for a while now, and I have come across some typical problems when working with large-scale software: organizing the data into meaningful section, or “chunking” the data.


To overcome these problems, I have broken the toolbar sections into their own HTML pages, and used server side includes to piece them together. This will be replaced in the future with some PHP code. I originally chose SSIs, so anyone can add or remove sections by simply adding the appropriate SSI directive to the page.


Since the toolbar sections are seperate pages, it allows me to test each page separately, and only one page at a time. Each HTML page has two sections: the javascript, and HTML display. This allows me to edit both the HTML and javascript without having to switch between two or more editors or editor tabs.

There is one main page, toolbar.html, which has the code for the main toolbar UI. The main object is called CMSThemeBuilder, which includes a few functions:

  • CMSThemeBuilder.dump([outputDIV]) – this function calls the dump() method in each object., optionally writing the output to the named div tag, outputDIV.
  • [window.]print() – this is a global method which prints to the FireBug console, if installed.
  • CMSThemeBuilder.register(StyleObj) – this function registers the given StyleObj with CMSThemeBuilder.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: