Except for a select few, I get the feeling people use these, just because they are there. Even more-so than Microsoft cramming them down programmers’ throats. Let’s leave aside the fact that Microsoft encourages its developers to not think when designing (especially web) applications and instead use their own semi thought out solutions, why is it that developers have a tough time seeing these features for what they are? Useless bloat!
When I say useless, I mean for 80%-90% of cases out there, but still implemented as default because it’s a “Best practice”. I wonder if developers have an equivalent for a Kuik-E-Mart guru who lives on top of a mountain where they get this information.
And without further ado :
ApplicationName
This little menace causes more trouble for developers and end users than any other “feature” in ASP.NET 2.0+. Why is it there? What’s the point? Aren’t the vast majority of users more likely to have just one application. And why can’t the existing apps use the root virtual path (“/”) when not specified? Because the programmers who wrote it believe their users will have multiple web apps running on multiple virtual directories. Which is not the case, as most of us living in the real world would know, with many if not most web hosts.
What’s worse, Visual Studio and Web Developer Express insist on creating your test run on a virtual directory (which is a pain to get rid of in Visual Studio), that will obediently be used by all the default SQL providers. Then you have the delightful emails claiming “your program doesn’t work” because you forgot to change the applicationName in the web.config or they forgot to change it back.
Aren’t you more likely to use a seperate database for your web app anyway? Do we even need an ApplicationID in our database?
AJAX
“What? They’re using their own libraries? You say, they work across all browsers and Operating Systems? And they don’t need to be installed, just uploaded and called on a few pages? And they’re 1/8 the size of our code?! The bastards!!! We’ll show them!! From now on all ASP.Net pages will have AJAX by default!”
GUID
Giant Ugly Interfering Demon, also known as a Globally Unique Identifier, which doesn’t even make sense since it isn’t global anyway or, for those of us who realized the Internet existed before IIS, UUID (Universally Unique Identifier).
The only conceivable use for this thing is when you have to replicate your database across multiple servers. But since most of us are content with one database on one server, why is this monster forced down our throat? All it does is add extra complexity to the Data Access Layer.
Even MySQL doesn’t have to put up with this kind of nonsense.
I had to salvage a botched application for a non-profit organization recently, and I couldn’t imagine the level of garbage that was introduced into the DAL. The previous programmers allegedly “rescued” this program from SQLite (ironic, since I consider SQLite to be a far superior product in many ways than almost all of the free and non-free products out there) and converted it to SQL Express.
Here’s a little food for thought…
I need a way to uniquely identify a user. The users will have a unique ID and a unique user name. As such, the user name will be matched against the database to see if there are any duplicates. The ID will always be harder to remember than the user name as it is globally unique and non-incremental. The ID will never be referred to in the open anywhere in the web app (I.E. /users/username.aspx). Other users can, thus, type the URL into the browser manually, if they are unsure and the app will search the DB if there are no exact matches. Are both of these two things necessary or only one?
Stored Procedures
As all true achievers would know at this point stored procedures are bad m’kay? But what do all default SQL providers that come with ASP.NET use?
There’s a time and a place to use any tool. Grandma’s cooking recipe page (as adapted from the Personal Site Starter Kit) is not one of them.
CSS Friendly Adapters
OK, I’ll give you a moment to collect yourself from the belly laugh at seeing “CSS” in a Microsoft product.
Instead of pumping you full of menial rage, I’ll give you a small sample of the output generated by the “CSS Friendly” portion…
<div class="AspNet-DetailsView-Data">
<ul>
<li class="AspNet-DetailsView-Alternate">
<span class="AspNet-DetailsView-Name">Title</span>
<span class="AspNet-DetailsView-Value">
<input name="ctl00$ContentMain$DetailsView1$ctl02" type="text" title="Title" />
</span>
</li>
<li>
<span class="AspNet-DetailsView-Name">Description</span>
<span class="AspNet-DetailsView-Value">
<input name="ctl00$ContentMain$DetailsView1$ctl03" type="text" title="Description" />
</span>
</li>
</ul>
</div>
Notice any <label> or <fieldset> tags? Notice any class name shorter than 20 characters?
I didn’t think so. Goodbye accessibility, hello “CSS Bloat”… er… I mean “Friendly”.
Here’s the same code as rendered properly
<div class="DetailsView">
<ul>
<li class="Alt">
<label>Title
<input name="Title" type="text" title="Title" />
</label>
</li>
<li>
<label>Description
<input name="Description" type="text" title="Description" />
</label>
</li>
</ul>
</div>
I might as well have written a custom control from scratch.
Man, I miss Notepad so much!
…………………………
I’m thinking about creating a simple framework for web apps that don’t use any of this nonsense and releasing it into the Public Domain. If anything, it will at least help out some people who want to start fresh and free from the above plagues. Honestly, I don’t even care if anyone gives me credit. I just don’t need another heart attack from wading through all this garbage.