ASP.NET Developers Don’t "Get" The Web

Please excuse some of the broad generalizations that appear in this article, but they are some of the things that I have observed to be true of the ASP.NET community as a whole. Don’t take it personally, as it obviously doesn’t apply to all ASP.NET developers.

There are way too many ASP.NET developers out there that don’t truly understand the web. Developing web applications is a totally different world that developing Windows Forms applications, but the .NET platform’s success has brought many Windows developers into the web world. In my view, this has led to an outbreak of under-performing and obtrusive web applications.

Why Does ASP.NET Attract Windows Developers?

Because ASP.NET attempts to abstract the web to be similar to Windows development, there has been a lot of crossover between web and Windows developers. The WebForm model heavily uses events and components, which is much different than traditional web development, where you are very close the Response and Request objects. In my opinion, this attracts Windows developers, who are more accustomed to this type of programming model and scares away web developers, who tend to prefer frameworks with less abstraction.

There are a number of other features and attributes of ASP.NET that tend to scare away web developers as well. Features such as ViewState, which tries to make the web stateful and Controls that abstract the HTML away just seem screwy to myself and many other web developers. I personally like being close to the HTML and having full control over what I output to the browser. This is the reason that I have never fully embrace the WebForms model and am excited for ASP.NET MVC.

What Too Many ASP.NET Developers Don’t Get…

Usability is a key attribute to developing a good application. This seems to have made big inroads into the web community (especially with Rails and Django) in the past 2-3 years. However, usability knowledge is notoriously absent from the ASP.NET community. The prevailing attitude that I have seen is to just get the application to work and to not worry about creating a good user experience. This means that you should be using javascript to create unobtrusive error messages for the user and styling your forms to be easily processed by users. Learning about usability can help you to convert more sales and make users click where you want them to more often. For some good usability reading, check out Designing the Obvious by Robert Hoekman and Don’t Make Me Think by Steve Krug.

Building a bit off of the last point about usability, javascript seems to be treated as a second class citizen in the ASP.NET community. It is unfortunate, but far too many ASP.NET developers only care about server-side coding or creating the terrible javascript that the ASP.NET framework will create for them. There also seems to be very little awareness about unobtrusive scripting and separating event handlers out from the HTML. Even ASP.NET itself uses LinkButtons and PostBacks, both of which break so many rules of unobtrusive scripting and progressive enhancement. All I can say is good luck to you if you try to build a site with progressive enhancement with the WebForms model.

Continuing on the topic of web standards, most ASP.NET developers that I have met know very little about the standards movement or just plain don’t care about it. There are way too many pages out there that use tables for just about everything - just so we’re clear, tables should be used to display tabular data, not for layout like in the DetailsView. One of my major complaints about ASP.NET has always been the lack of semantic markup that the controls generate and I see this as one of the major benefits of using an MVC framework.

Finally, in terms of performance, there are way too many sites out there that pay no attention to their ViewState. Sending that data to the client is usually more expensive than caching it on the server (or even going back to the database). The web was not meant to be stateful and it really just feels like a giant hack to have ViewState. Unfortunately, it ends up being even more difficult (or even impossible) to turn ViewState off in some situations. Just keep in mind that you are sending data over a potentially slow network to your client on every single request. Stateful web applications have a much greater performance implication than stateful Windows applications since the web is stateless by design.

Maybe It’s the Framework

All of my complaints above about ASP.NET Developers could really just be the weaknesses of the framework showing through, but I really think that it is an overall mentality in the ASP.NET community. I hope that a lot of developers will take a long hard look at the upcoming ASP.NET MVC framework and will at least take some lessons away about what more traditional web development is like.

It is important to remember that javascript is your friend - it is not just about UpdatePanels and the awful MS Ajax library. It is hard to be taken seriously as a web developer if you don’t have a pretty thorough understanding of javascript and its role in web development. Learn about the DOM and unobtrusive scripting and I promise that you will be a better developer for it.

Leave a Reply