The Joys of Consistent Web Practices
Ever since I have been flying the web developer pennant in my occupational corner I have been trying to develop my own best practices based on existing web standards and accessibility requirements, and then applying them consistently. My goal is to gain the ability to perform a task the same way time and time again without having to think about it, meanwhile ensuring my works conform to standardized usability practices to guarantee at least satisfactory experiences for my site’s users. Consistency, after all, can be a very good thing for everyone. Let me explain.
Consistency and Usability
Site-to-site consistency as it applies to a web site’s user interface is an important part of web usability. Certain things should be supplied while others avoided. Things like obscure “Mystery Meat” navigation should be avoided by the developer as it can destroy web site usability. The things that should be supplied have been determined by the web’s organic growth as user expectations and some consistent user habits have come to be. An example of this might be a clickable masthead, banner, or logo taking the user home (this was and is on my mind right now as it applies to this blog and my site). I would guess that most web users have grown to expect this. Another example might be the underlining of in-content links. And yet another example may be to provide an About page for the user. Or maybe a site map provision. I don’t wish to stifle creativity or visual design, but consideration needs to be given to the application of these site attributes.
Consistency and Maintainability
I can go to just about any site I’ve created in the past year and float an embedded image using a left, right, or center style class without ever looking at the style sheet to see what class name to apply to the image element. That may not sound like a huge time savings or anything of significance, but multiply that by the number of possible elements to style or identify and it adds up. I own six other domains and maintain others contractually so that can be worked into the equation for me. Using the same element classes and section IDs — footer for example — is a blessing. It makes life so much easier when going back.
My own development of these practices hasn’t fully matured yet, but my cognizance of their value is absolutely ripe on the vine. That’s why I’m passing this along. I haven’t yet achieved my goal of absolute across-the-board consistency, so until I do there will be variances from site to site, even post-to-post. But going in that direction now will correct this situation in time. Even though there are older works to contend with, in time I will eventually reach my goal.
Consistency of Your Own
My advice to you is to start immediately if you don’t already draw from an elemental toolbox, so to speak. Create a universal style sheet for starters, adding semantic classes and IDs you’re comfortable with. Also be sure base your web development practices on a simple list of web standards — they do have value — then meet some minimum criteria of web accessibility and common web usability expectations (the latter can be determined by your own site preferences and a bit of common sense in most cases). Then apply these practices to all your future works, consistently. It’s a worthwhile pursuit solidly confirmed in my eyes by my own experiences with the joys of consistent web practices.
JackP responds:
Posted: November 27th, 2007 at 5:12 am →
This is where I start arguing with the semantic purists who insist that classes like “float_left” aren’t semantic enough because you can’t then change what the css does without the text being misleading if you suddenly want them all to float to the right…
But I’m with you: it’s practical, pragmatic, resuable, consistent, and sensible.
Stevie D responds:
Posted: November 27th, 2007 at 9:07 am →
Sometimes, there is no appropriate semantic description. An image is purely decorative, as with the images in the article above, and it has to be positioned somehow. Yes, I suppose you could have classes for decorative-image-style-1 and decorative-image-style-2, but that is going to be difficult to remember and work with.
Yes, if you can classify something as, eg class=”decorative”, that’s great - but there are times when all you want to say is “This goes on the left”, or “This bit must be in red”, not because of any particular reason for it being that way, but just because that’s how you want it - in those cases, I’m happy to use descriptive rather than semantic class names … but it is definitely the “last resort”.
Mike Cherim responds:
Posted: November 27th, 2007 at 3:00 pm →
You guys are right about left, right, center not really being very semantic, but I doubt I’ll one day decide to change the direction of my floated images so I decided to keep the practice in action — to be consistent. As far as color classes, I won’t do that and will instead define its purpose in the class name (the semantic method). Red, for example, would be “error” in my style sheets. A generic color styling might be highlight, etc.
My thinking is left will always be left on any site so it helps the consistency and aid my memory of these classes. Whereas an error might be red on one site yet may be white on a red background on another so with respect to consistency, I feel color classes are best avoided.
Joe Dolson responds:
Posted: November 27th, 2007 at 3:25 pm →
Ah, this is one of my weaknesses: consistency. I find myself using a smorgasbord of similar but not quite identical styles: floatleft, leftfloat, left_float…
I’ve just GOT to set down with myself and establish some guidelines - but what about applying them to my past sites? Arrrgh!
Paolo responds:
Posted: December 3rd, 2007 at 9:59 am →
Maintainability is my first target. Changes and systems updates are easier with an organized strutcure.
links for 2007-12-04 by Silvia Ferretti responds:
Posted: December 4th, 2007 at 9:25 am →
[…] The Joys of Consistent Web Practices - Beast-Blog.com (tags: webdesign) […]
David Zemens responds:
Posted: December 10th, 2007 at 8:28 am →
I agree with Joe on this one. As I struggle to “get-it-together” as a web developer, consistent use of markup and styles is critical to standardizing and simplifying the development process.
Sometimes I get so involved in the end result of the project that I don’t tidy up the underlying styles. This article is a great reminder to move doing so to the top of my “to do” list.
Best of the Beast in 2007 - Beast-Blog.com responds:
Posted: December 23rd, 2007 at 12:22 am →
[…] November: The Joys of Consistent Web Practices […]