If you would like to comment on this post, please email me at edward.bilodeau@gmail.com.

© 1998-2009 Edward Bilodeau

Disclaimer: The opinions expressed here on this site are my own and do not represent those of my employer in any way.

« Previous Post | Up | Next Post »

Teaching the fundamentals of XHTML

This morning I'm putting the finishing touches on tonight's lecture on XHTML fundamentals, and though I would share the approach I'm taking this semester.

Seagulls

First, a bit of context. The course I'm teaching is an undergraduate-level web development course, taught to students who for the most part are not familiar with web development. This is a regular 13 week, 3-credit course, and not a one-day Dreamweaver seminar. What I mean by that is, it's not enough for me to just show them how to get the page to display, without having them understand what is happening and why (within reason, and as far as that can even be known and explained to mortals).

I also have a responsibility, and in some ways the leisure, to spend time talking about an idealized world, about the ways things should be. I can create an alternate reality ("In this course, we will be assuming that...") in which our learning will take place. Of course, I'll map what we learn onto reality at the appropriate places, but I don't have to dump students form day one into the nitty-gritty of production web development. Such is higher education.

In the past, and in most cases, XHTML is taught from the context of how it differs from HTML. That you can cover in one slide and be done with it, questions and all, in ten minutes, tops. The students learn how to write valid code, and all is good. At first glance, they may even appear to be modern web developers. The problem is that their mindset is still grounded in a Web = HTML + browser-on-PC world, with XHTML nothing more then a less-forgiving version of HTML, but one that results in cleaner, more compact markup, etc. Although this is much better then someone using FrontPage 4.0 to blindly churn out page after page, site after site, I still think these developers would be missing the point.

My approach this semester was to begin by covering standards, what they are (in a general sense), how they are established, and why they are important especially in a networked world. I then focused the discussion on the standards most relevant to web developers, and more specifically, those that we'll be seeing throughout the course of the semester (HTTP. XML, XHTML, CSS, DOM, etc). I wanted to make sure they understood why standards are important, so that as they move through the course (and through their careers) they can bring this understanding to bear on problems whose first-pass solutions may suggest a non-standard approach. While there are cases where this might be a valid approach, without a deeper understanding of the role and importance of standards, students will be unable to fully assess the pros and cons of their non-standard solution.

Tonight's lecture is officially titled "XHTML Fundamentals", but my idea is to spend a fair amount of time on XML. From there, I'll go on to XHTML as an XML application derived from the HTML 4.01 feature set. That done, we'll start looking at the basic tags for document structure and markup.

sgml to xhtml

It how the students approach the subject that I think will make all the difference in how they make sense of the rest of the material in the course. Focusing on the XML-ness of XHTML should help students to understand web development at a deeper level, and prepare them for future careers that will, most likely, not be as mired in the webpage/browser/PC way of viewing the Web.

Some might say I'm doing them a disservice, that I'm wasting their time, but I disagree. I could justify my approach by saying that its the Right Thing To Do (which it is). Let me say a bit more. The whole point of standards is that is allows us to build our applications and author our content without knowing before-hand every possible way they can be used. We've established some baseline agreements to ensure interoperability across the network, and respecting those agreements allows our applications and content to be part of the network today. But more importantly, they also ensure that we will be able to participate, as is, in the network of the future. To a degree, standards future-proof the investments we make in our technology.

This is why XML is important. This is why authoring web pages as XML is important. Is there an application today that can make use of your pages? Yes: the web browser. Are there any others? Probably, but it is still early. Will there be other kinds of applications in the future that will take advantage of the XML-ness of my web pages? Most probably. In fact, you may be the person who writes that application!

But I don't know for sure. And that's the great thing about it! It would be a sad thing if the Web was limited to what we know and understand today. Its also fairly arrogant to think that we could sit down and figure it all out before hand. Lets give future generations some credit: they are likely to be more web and tech savvy then we are. Whats more, their world is likely to be different from the one we live in, the problems they face different from our own. We can't possible know the future or try to solve its problems today. But we can try to build a solid foundation upon which the work of others can rest. Not a foundation that will need to be torn up and redug every fifty years, but a foundation that will persist and grow stronger with time.