Sunday, January 16, 2011

Best practices on the Web

I learned how to build Web things between 1994 and 1996, and kind of kept doing those same things until I switched professions in about 2004. This means that my use of HTML is incredibly naive. I've been watching Google's best-practices course (HTML, CSS, and Javascript from the Ground Up) and it's really making me think.

The key is the separation of semantics, presentation, and behavior - especially the first two. In looking at my Win32::Word::Declarative, I realize that I've hopelessly confused semantics and presentation there as well. Obviously, I need to think carefully about what I want to do there, especially in regards to tables.

I could put table headings into the column tags, for instance. The renderer would then create a row based on the column definitions. But I still don't have a clean way to define a table renderer yet. So that deserves some thought.

And then there's actual output for the Web. The Site::Declarative (that name is very tentative) module should have a reasonable page definition semantics that allows us to separate these things easily. It might even be based specifically on Google's presentation.

Food for thought.

No comments:

Post a Comment