The sad state of ASP.Net programming

I have been doing some Microsoft ASP.Net programming over the past few weeks. Compared to my beloved Linux – Apache – MySQL – PHP – HTML – Javascript platform, programming in Visual Studio is a lot like flying a modern jet airliner: it’s all done with wires.
I call it “programming by holding your mouth right”.
You never see the code generated by endless clicking and dragging. There’s literally nothing to debug. You delete and recreate instead.
The saddest aspect of ASP.Net is the lack of reliable documentation and code samples. I spend hours Googling error messages and reading forum posts looking for solutions. Many of the answers are wrong, and I suspect never worked even for the people posting them.
Code samples downloaded from tutorials — even those published by Microsoft — often do not work. The code is for a previous .Net version and the author forgets to mention that. Or a class name is changed. Or you are presented with delightfully emphemeral error messages like:

Class blah-blah is obsolete. Please use the replacement class.

Huh?
I am beginning to wonder if the only people who can make the highly touted AJAX.Net work are the Microsoft developers who created it.
Don’t get me wrong. There are some things about ASP.Net that are wonderful. It’s incredibly easy to wire-up a data grid to a database table, for instance.
But that example illustrates what to me is the problem with most of Microsoft’s web programming products: Visual Studio and Sharepoint, to name the two biggest offenders, are specifically designed to give great demos.
“See how quickly your programmers can produce that report you’ve been waiting months for?”, the Microsoft rep says. Click, drag, drop. Ka pow. It’s done. Sale made.
But try doing something useful.
Like an AJAX autocomplete search box so that your user doesn’t have to scroll through that nice big table. What? The AJAX Control Toolkit version of autocomplete returns only the matching text — NOT the record id. Useless.
Want to add a new row to that GridView control? Easy. Just click on an existing row and then you can click on a “new” button. Is that intuitive, or what?
About the only good thing about ASP.Net is that with it, Microsoft has created a fertile field for consultants.
I’m thinking of charging a Microsoft surcharge on the next job.

2 comments

  1. People laugh at me, but this is why I still develop in Visual J++. Sure, it’s unsupported, but what has MSoft support ever really done for me? I write straight SQL, I populate every dialog field/list/whatever by hand. No magic, no confusion. It helps a lot, of course, that I’m the only developer on the system, and it also helps that I set my own deadlines for the most part. I still get things in the hands of the users surprisingly quickly, though.

  2. I’ve noticed the farther down the rabbit hole you get with any framework the more black magic there is to deal with. I develop in Delphi, ASP.NET, PHP and Rails and each one has areas that make me pull my hair out.

    With PHP it’s PEAR, I hate coming across code samples that just assume you have PEAR installed or, oh, sorry, this only works in PHP 5.0 or, oh, you *did* compile PHP with such-and-such switch right?

    Rails has so many wonderful “helper” methods that you often can’t find where anything is coming from, don’t know if the snippet you’ve just grabbed is using someone’s home-grown helper extension or is one of the unofficial extensions that everyone seems to install but no one talks about.

    ASP.NET has the issues you mentioned, plus the whole infrastructure of webforms which destroy the ability to use server controls with any client-side library that uses ids like jQuery.

    Basically each platform has it’s pros and cons and a lot of how much you enjoy working in any of them is how well you know the entire ecosystem. When I first did PHP programming I thought it was the biggest mess of poo out there, with so many conflicting ways it could be configured, so many random folders it’s config could be pulled from, the huge number of sites with horrible samples that lacked any type of proper url encoding or sql-inject prevention. Now I think it’s great for small sites, though I still prefer ASP.NET for larger sites because of the easy bolt-ons like logins/roles, theming and internationalization support. With the new MVC bits they just dropped it’s actually a lot of fun again.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s