03.21.04

Split Three Ways

Posted in General at 6 pm

So Dwelling has finally switched over to the structure that OrederSomewhereChaos has had for some time: a separation of 1) Document Structure, 2) Page Content, and 3) Visual Styling.

Document Structure is the most basic outline of what an HTML file needs: the HTML, HEAD, and BODY tags plus the barest outline of the overarching layout table that I use to set up the columns, the header and the footer.

The Page Content consists of very basic markup: H1-H6 headings, P paragraphs and a few DIVs and BLOCKQUOTEs. These also have a certain amount of class structure attached to them as well. These classes are “semeantically rich”. Instead of having a class named “smallblackcenteredtext” that would set the styling of the text, I’ve used classes like “sidebarnote” or “calendar”. These classes say nothing of the look of the elements, but simply give me hooks to make them visually distinct.

Finally, I use a style sheet to provide that visual styling. By hooking into symantic classes rather than classes that are tied to a specific look, I can reuse and modify the look of the elements without altering the Page Content or the Document Structure.

So what do we have? Three separate pieces of each page that can be modified with little regard to the other pieces:

A) I can rearrange the major elements of the Document Structure (the header location, the number of columns, etc.) without worrying about getting the visual look to be consistent for the other exisiting pages, or worrying about the content on those pages as the words will flow into their proper ‘buckets’ just as before.

B) I can add and edit the Page Content of any (and every) page and will not have to worry about the HTML structure that it flows into or the look of the page that it gets from the styling.

C) Finally I can change the look: the typefaces, the sizes, the spacing and the margins. I can alter these to my heart’s content, without touching the Document Structure or the Page Content.

I must say that GreyMatter doesn’t take to these concepts very easily. Particularly in the Document Structure arena, it doesn’t really fit well. It’s not bad, it simply has bad default templates and a few tools that have to be ‘massaged’ to make it work.

(I should note that there is a “D) Behavior Commands” layer that could be referenced here as well, but I use JavaScript quite sparingly.)

I can already see that I will eventually want to move away from GreyMatter and into a system that better supports these concepts. I’ve been keeping an eye on {{link http://www.wordpress.org/ WordPress}} and I hope that it will actually be as easy to transition to as it says.

However, for now, I will continue to use GreyMatter simply because it doesn’t require SQL or any other database, or even PHP.

RSS feed for comments on this post · TrackBack URL

Leave a Comment