thinking in geek tagline’s are so web2.0

Posted
29 September 2008 @ 9am

Tagged
.net, architecture, asp.net, web architecture

ASP.NET == Usability disaster?

[This has been in the queue for a long time - over 12 months - codebetter just tipped me over the edge!]

Peter Van Dijck asks:

I’ve only worked twice with companies using .NET for web interfaces, and in both cases the UI was a disaster and the usability problems guaranteed lots of consulting hours.. Why is that? Or was that a fluke? (2 cases is hardly proof of anything) I know it’s possible to make usable and elegant web UI with any technology, but does .NET somehow encourage bad UI?

This is a great question and in my opinion - the answer is yes. (Assuming that Peter really means WebForms.)  spike pit of death

This is demonstrated in so many small ways by framework defaults which are totally brain dead (__doPostBack anyone?). Rather than lead dev’s into the pit of success - the framework leads devs to the spiky elephant trap of death. 

 
What’s that - an example? How about the <customErrors> defaults. When an error occurs during processing an ASP.NET request - the default behavior of a new web.config is to redirect the user to another URL. This is what a new web.config looks like in VS2k5. 

        <customErrors mode=”RemoteOnly” defaultRedirect=”GenericErrorPage.htm”>

            <error statusCode=”403″ redirect=”NoAccess.htm” />

            <error statusCode=”404″ redirect=”FileNotFound.htm” />

        </customErrors>

This is really brain dead behavior! Let’s count the ways: 
1. There’s no way to change the HTTP status code from a html page. (E.g. - should be 404, 500 etc). This is just flat out bad - status codes are important for lots of reasons.
2. The effing URL will change. This makes it difficult to correct typing errors or retry a request in case of a server error (500). 
3. Those files don’t even exist! You can get a 404 when the real error is a 500 because the file that your getting redirected to don’t effing exist! 
This just happened to me - I was just wondering if there is a port of the monorail SmartGridComponent to ASP.NET MVC. I do a Google search and get a likely looking result for Billy McCafferty’s blog. I click on the link and I get the following page: 
Oops something went wrong!
Either the site is offline or an unhandled error occurred. We apologize and have logged the error. Please try your request again or if you know who your site administrator is let them know too.

 

The URL in the browsers address bar is: 

http://devlicio.us/error.htm?aspxerrorpath=/themes/blogs/default/post.aspx

HOW the F$%K do I try my request again?
If I’ve opened this result in a new tab (which is my habbit) I’m screwed! There is no back button, refresh (F5 or whatever) just reloads the error page and will never show me the correct page.
If I just clicked the link - the back button takes me back to my google search where I can click on the link again - refresh is still borked. 

Another example? Linkbutton? Anyone who’s tried to open a link in a new tab/window and got a blank window with a URL like: javascript:__doPostBack(’ctl00$Masthead1$LocaleManagement$ctl00$ctl05′,”) - knows the pain I’m talking about. 

Go on - right now - go try and open a MSDN library page in different language in a new tab. (It’s the little menu up the top right where it says (e.g.): United States - English). 

In my apps - I fix this by disabling customErrors and writing new error handling code which both maintains the url and returns the correct HTTP statuses - but this is code which I should not have to write. This is code which all web servers/apps need to implement correctly - it should be automatic. We shouldn’t have to write custom code to get a HTTP/404 returned when an app encounters a missing file!


No Comments Yet


There are no comments yet. You could be the first!

Leave a Comment

A week on mars.