My old high school was deeply involved in Round Square – an international organization of high schools that practiced education that strongly aligns with the following “pillars”:
My XML teacher mentioned this in the current week’s discussion, almost as a passing thought, but I thought this was a poignant list that is worthy of expounding upon here. These pillars are:
- Valid code
- Accessible code
- Semantic code
- Separation of content from presentation
Valid code (standards compliance)
Web code should validate according to the specifications set forth for what you’re using. Browsers today often let you get away with murder here by still allowing tag soup to occur – mostly due to documents being still served as text/html instead of application/xhtml+xml. Blame IE6 for now. But standards-mode does exist in all modern browsers, enabled by the power of the DOCTYPE declaration – a simple declaration of independence from browser-lock. Imagine an enterprise architecture, nay an entire Internet, where web applications are completely standards-compliant and the user could move freely between platforms, applications, browsers, and websites without fear or concern for compatibility.
Semantically correct code
What the hell is this box of beer bottles doing in my garage? Had I tagged it appropriately, I would clearly see that it is glass non-twist-off bottles suitable for home brewing. Not that I am able to drink most homebrew due to the barley malt causing me reactions due to celiac disease, but I digress…
XML encourages the web author to tag their content appropriately, explaining in-line what the meaning is for each item. Using XML technique in coding your XHTML documents means you are applying more meaning than the usual “here’s a paragraph” markup, information that could be used by future generations. Won’t somebody think of the children?!?
Separation of content and presentation
Spend some time at the CSS Zen Garden and you get the point. Content and presentation do not like to sleep in the same bed. They like to flirt with each other, play the field, sleep around. Tying them together with presentational markup and inline styles just means an unhappy, possessive relationship where neither party is able to grow.
So those are the pillars. Things I’m sure the Round Square would approve of. Keep these in mind and help your code realize its true potential as a member of society.