ASP.net & designing with web standards (Zeldman aloud #4)
Time to dive into real chapters!
Chapter 1. 99.9% of Websites Are Still Obsolete
- Most sites on the web have been built with only major desktop browsers in mind. This makes sites incompatible with screen reading software, mobile devices and the like.
Modern Browsers and Web Standards
- No browser is perfect, but some are less perfect than others. Bear in mind the perfection scale when designing your website.
- Old browsers had very inconsistent standards-compliance. This ended up being more detrimental to standards than no compliance at all. This way, standard technologies like CSS gained a reputation for being great cross-browser compatibility breakers.
- Even though browsers are very good at following standards, reputation and practices prevail, making non-standards ways of coding web pages the norm in most cases.
The "Version" Problem
- Many developers resort to propietary techniques even when need not. Sniffing techniques are being passed generation after generation, therefore perpetuating the per-browser tailoring approach to developing sites.
- Propietary techniques lead to the ever escalating problem of creating and updating many versions of the same site. Ad-hoc mobile browser versions can easily reach plague status.
- Versioning also increases total page size, as users end up downloading all versions every time they visit a site.
- Versioning hurts findability, as search engines end up being confused by complex coding tricks.
With its browser sniffing technology, that usually divides the world into Internet Explorer and the rest of mortals, ASP.net is in part to be blamed as far versioning is concerned. Previous versions of Microsoft.com would only show a very interactive and dynamic menu system if accessed using IE. Any other browser would receive a plain, static version. Some browsers, such as Opera, would go the extent of presenting themselves as IE, so that could receive the full-fledged version of a site.
Backward Thinking
- Using age old markup techniques only makes sense when backwards compatibility with obsolete browsers such as Netscape 4 is intended.
- Conservative estimate: moving from obsolete sloppy markup to standards code cuts page size in half.
- Case "small business": moving to standards can save 1500$ a month in server costs.
- Backwards compatibility means determining a baseline. Using tables for layouts, for instance, means that Netscape version 1 will not be supported, because it does not render layout tables correctly.
- Designing a site with only IE in mind means losing lots and lots of customers. And that share might even be bigger as time goes by and market conditions change.
When Good Things Happen to Bad Markup
- Garbage in, garbage out: Programming languages simply reject badly-formed source code; similarly, graphic designers learn that they will never obtain an output with decent quality if the source material is not of the highest grade.
- Browsers, on the other hand, are very lenient when it comes to poor input. This has not only encouraged many a bad habit in developers, but it has also made developers view languages such as XHTML or Javascript as primitive tools.
- "Those who do not respect a tool are unlikely to use it correctly"
- Bad code is seldom immortal. As browsers become more skilled at interpreting and rendering standards-based code, they also turn less and less tolerant to broken source code.
ASP.net developers should consider that with great power comes great responsibility: widely used controls that emit non valid code can very easily fill a website with literally hundreds of errors. Using a code generation tool like ASP.net should actually call for even greater attention on outputted code from developers, not less, as it is usually the case.
The Cure
A brief summary of what web standards offer:
- Greater styling control for designers
- User's ability to change styling to suite her needs
- Cross-browser, cross-platform compatibility of client-side scripting
- Compliance with accessibility laws
- Reduced cost of changing the design of a site
- Cross-browser rendering equivalence
- Instant support for mobile devices, screen readers, braille readers and even printers.
- Rest assured that your site will continue to be compatible with future browsers and devices
- I reckon a brief mention about SEO benefits is lacking in the original list...
Alan - yet another Aggiorno evangelist