ASP.net reality check

The What, Why & How of web standards ASP.net development
IE8 beta2 out - make all your sites unbreakable!
Internet Explorer 8 beta 2 is finally out, and standards-aware developers should rejoice: the de facto standard browser is now more standards-compliant than ever. Converts beware:wicked Internet Explorer 7/6/5 hacks will simply render wicked things in Explorer, and that is a very good thing. Yet, you want your page to work until you move to standards. The people at Aggiorno have just released the beta version of a free tool that can add the compatibility tag needed for your decrepit sites to look nice in IE8. Give it a try and tell me your impressions on it. Cheers, Alan
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

ASP.net & designing with web standards (Zeldman aloud #3)
Zeldman aloud: Designing with web standards - the ASP.net companion #3

I'll try and finish the introductory section all in one shot. Not too many ASP.net stuff here. Good read nevertheless!

Ending the Cycle of Obsolescence

  • Loved this phrase:short-sighted proprietary "solutions" that contain the seeds of their own obsolescence.
  • Web standards are not for purists or theorists, but rather for pragmatic people who want to do the job only once.

What is the W3C?

  • Founded in 1994, creates specifications and guidelines.
  • Some of these guidelines, which are officialy referred to as "recommendations" by the W3C, have been relabeled as "web standards" by the Web Standards Project.

What is forward compatibility?

  • Zeldman defines it as write your site today following standards, and see it run seamlessly on current and future versions of browsers, no matter the platform. Especially as browsers become increasingly standards-compliiant.
  • Standards: XML and XHTML for markup, CSS for presentation, DOM for the object model and ECMAScript for behavior.
  • Standards-compliant browsers: browsers that can read and correctly interpret documents written in these languages.
  • No browser is 100% accurate in that respect. What is more, standards are complex, sometimes resulting in ambiguity when combined in complex scenarios.
  • Most browsers released after the year 2000 comply with standards, at least to a basic extent.

No rules, no dogma

  • Standards-compliance is not a dogmatic, all-or-nothing issue.
  • In areas in which standards-compliance is lousy, good all Jeffrey says we should not be blind dullards. Neither when dealing with scenarios that are vaguely defined by current standards.
  • Transition to standards need not be immediate (although it could be if you used Aggiorno ;o): non semantic markup and table-based layouts are not correct, but sometimes are an inevitable evil.
  • Same with Flash, Quicktime, and the like. Purists say they shouldn't be used at all, but sometimes they need to be used.
  • Lesson of the day: standards are cool, but life is life and you might end up with a non standards site. Don't feel bad about it.

Practice, Not Theory

  • Following web standards is not a matter of simply being a purist, but rather a question of diminishing current development costs.
  • Not following standards made sense when not all of them where completely defined and/or when browser support was too weak. This is not the case any longer

What Is The Web Standards Project?

  • Non-for-profit group of designers and developers that strive to have browser and development tools makers follow guidelines recommended by the W3C.
  • Has been influential in making big players, such as Microsoft and Adobe, focus their products towards becoming standards-compatible

Is This Trip Really Necessary?

  • The W3C is not very effective at communicating to the general public what standards are and how they are best applied.
  • The web's growth was so fast, that literally millons of sites mushroomed before standards were sketched. It's high time we started using them.

Mostly introductory stuff. Haven't found any ASP.net comment to make yet.

Alan - yet another Aggiorno evangelist

ASP.net & designing with web standards (Zeldman aloud #2)

Still in overture mode I guess...

Spiralling Costs, Diminishing Returns

  • Some coding tricks (such as using nested tables for layout or font tags bloat our pages.
  • This swelling causes users to wait longer for our sites to download and increases our expenditure in hosting.
  • Having to code different versions of our site for different browsers and devices increases developing costs n-fold.

There's a very interesting catch here for us ASP.net people (actually this very same point could also be made of every other server-side technology, such as PHP or ColdFusion): a lot of this code excess is inadvertently created by some of the (seemingly simple) controls we use in our code.

An innocent ASP.net tag such as a grid can eventually result in a plethora of tables scattered all around. And yet, the extra price we're paying for all those tags can very easily go unnoticed. But I like ASP.net grids!. I'm not recommending solutions (yet), just pointing out risks and problems. Patience, dear reader, is quite singular a virtue.

Alan - yet another Aggiorno evangelist

ASP.net & designing with web standards (Zeldman aloud #1)

Well people, I guess it's time to begin my reading aloud of Designing with Web Standards, Second Edition, by his standards highness Mr. Jeffrey Zeldman.

Part I: Houston we have a problem

Before you begin

  • The main reasons for following standards when developing web sites are:

    Financial
    Developing becomes less expensive
    Compatibility/Wider Audience
    Our site will be consumed by more people
    Functional
    Our site will work better (too vague on this one, Jeffrey!)
  • Sites usually break when a new version of a browser comes up. We're used to this, but it really is an unnecessary cost we're paying for.

Pretty straighforward so far, huh? I reckon I must mention that whenever Jeffrey mentions code he is referring to what we in ASP.net understand as outputted HTML/rendered code/what you see when you click on View Source while in the browser. Do we have control over that code? Yes, no, sometimes...but we'll talk about that later.

Reading Zeldman aloud: an experiment

How many of you have read the now famous beanie book by Jeffrey Zeldman.

I did, some time ago. And I very much liked it. But, being from the ASP.net world, I felt some sort of chemistry was lacking. Web standards gurus are all great guys, but for one reason or the other, only a few of them are Microsoft-oriented. So I thought: what the heck, let's try and re-read the book aloud, trying to bridge concepts and examples to the ASP.net/Microsoft world.

The result? I got no idea, but hopefully something like the sadly unknown "Design Patterns Smalltalk companion", a priceless guide to the mother of all design patterns book: the GOF. Anyone here wants to help out?

Valid markup and semantic code: SEO building blocks
If it happened to CodeProject, it can happen to you. Just as the findability guys say, SEO tricks are cool, but might be pointless if your markup neither valid nor semantic. We at Aggiorno have just made this short video to try and illustrate this idea. What do you think about it? Are we overemphasizing the importance of validation? What has been your experience?
ASP.net and web standards
Hi everyone out there! My name is Alan Cyment and I work in the Aggiorno team. I'd like to make this blog a place where ASP.net developers can find interesting information about web standards: why they are important, how to make your web site compliant and who's working hard to help you get there. Hope to see you around!
More Posts