The ASP.NET Web Development Horror

Wednesday, April 07, 2010

I started playing with ASP.NET MVC almost two years ago and it was pretty much love at first sight. Granted, the reasons for that love had less to do with the virtues of MVC than with the sins of classic ASP and ASP.NET:

But traditional ASP.NET web pages are littered with cruft: hidden fields, obscure Javascript, and a ubiquitous <form> element even on pages which don't look, act, or talk like forms. The ASP.NET WebForms infrastructure extracts a price. That price is the sanctity of your generated markup.

We could almost call clean markup the sacrificial lamb of ASP.NET WebForms development. It's what you give up in order to achieve the illusion of state in that stateless medium known as the World Wide Web. If you develop in ASP.NET, then you've probably spent a lot of time chasing your tail as I have, ferreting out how to clean up ASP.NET-generated markup to make it palatable...

Like many otherwise innocent (?) and well-meaning developers, I've struggled with the messiness of ASP and ASP.NET web development for years. I remember those years as a miserable tour of duty through web development perdition: psychotic VIEWSTATE fields, opaque "what the holy mother of all fuck is that?" Javascript invocations, recalcitrant datagrids that never do exactly what you want them to, and those lovable auto-generated HTML element IDs with names like:

ctl_100_really_long_freaking_annoying_name

The Battle of Yonkers print that made the rounds a while back summarizes my feelings exactly. Developing in ASP.NET is like doing battle with a legion of zombies, only not as fun, because you don't get to band together with your friends and stockpile supplies and go out on patrols and learn the nuances of zombie tactics and takedowns.

In ASP.NET your zombies are things like VIEWSTATE and you can't kill a VIEWSTATE, more's the pity. (Well, actually, you sort of can. But once you get into VIEWSTATE-removal-and-hiding techniques you really need to ask yourself if your web development platform is helping or hindering you.)

The sickness of ASP.NET technology (and it is a sickness, and no, I'm am not down with the sickness) can be traced back to ASP.NET's overarching goal, which is to make web development as much like desktop development (i.e., as idiot-proof) as possible. Why? You're an idiot, that's why. You need hand-holding. You're unfit to work with technologies that don't hold your hand. The unspoken message of ASP.NET seems to be:

Hey, man, forget about all that difficult/confusing HTTP request/response stuff, the web is a design surface, you get? (Puff, puff.) Web development, desktop development, eh. It's all one, baby. (Puff.) Just drag and drop your controls, set a few properties, and bada-bing. You're done. You won't hardly have to write any code at all! (Exhale.)

And once you start going down this path, you've entered a world of framework and boilerplate and auto-generated cruft and tricksy little hobbits doing obscene things in the cupboards. Auto-generated cruft is what's required to untangle the impedance mismatch that results from trying to manhandle a web page with dynamic and asynchronous behaviors into, essentially, an overgrown dialog box.

Oh, look. Drag and drop. How cute.

It's what Scott Hanselman calls cargo-cult programming (giving it a slightly different connotation than the Wikipedia definition) an apt term, and one that describes the typical ASP.NET programmer to a T. Ironically, Hanselman has been one of the big proponents and popularizers and explainers of ASP.NET over the years.

(And if only the average ASP.NET consultant had one-tenth of Hanselman's enthusiasm and talent, the ASP.NET websites of the world might not be the celebration of worst practices, wasting-your-corporate-dollars-by-the-millions boobery that they in fact are. I say that as a former ASP.NET consultant who's participated in this grand fuck-off of money. No wonder your corporation can't turn a profit. You spend eighteen months and three million dollars to build an ASP.NET website any two competent developers could have built in three months for 20k. Two six year-olds running a lemonade stand have better fiscal sense than the average corporation, at least when it comes to IT expenditures. Believe it.)

Don't be a dragtard, America. World.

You are being marketed to.

The desktop is a completely broken metaphor for the web.

That ASP.NET is a deft execution of that metaphor doesn't make the metaphor itself any less broken.

No matter how many bells and whistles you hang on it, it remains broken.

Under ASP.NET 1.0 it was broken.

And under ASP.NET 4.0 it's broken.

Broken.

ASP.NET vs. ASP.NET MVC: No Choice At All

The sad truth is that ASP.NET is simply another throwaway business technology that will one day occupy a proud place of implicit or not-so-implicit deprecation alongside ASP and MFC and ATL and ActiveX and all the other proprietary Microsoft cast-offs, desktop, web, or cloud, in their various stages of decay.

(Nasty, brutish, and short. So goes life as a Microsoft "business technology".)

I'm not saying that ASP.NET has been or will be deprecated any time soon. It's achieved critical mass, and rest assured, ASP.NET websites around the world will be keeping the Internet in a happy surplus of cruft-laden, obfuscated markup for years to come.

And maybe that's the real ASP.NET web development horror; not that ASP.NET is doomed to obscurity, but rather that it's doomed to a long and frenetic sort of half-life, and many of you with it, as legions of developers go forward like zombies to swell the ranks of throwaway high-maintenance ASP.NET web applications spewing forth broken, bloated markup by the terabyte. It makes me glad that I was born a human and not a Google spider, because what a shit-eatingly miserable life that must be.

All of which is why I say: the choice between ASP.NET and ASP.NET MVC is no choice at all.

Despite having used and endorsed ASP.NET for years, I would now only recommend classic ASP.NET for one specific application type: namely, the Throwaway CRUD-Friendly Forms-Centric Line of Business App, little-loved as it always is, used internally by 10 to 100 employees for 2 to 5 years before being shuffled off its mortal coil in yet another inane round of corporate "strategizing".

But in this arena, you'll find that classic ASP.NET is everything you'd ever want it to be. Short-lived, high-dollar, with a nice set of drag and drop controls so that you can crank out those crappy UIs in record time, thereby hoodwinking your not-very-technologically-savvy client or manager into thinking value has been added, rather than subtracted, ultimately justifying your paycheck or your project's existence or your sense of ego or whatever tune you dance to, and allowing the great hamster wheel of clusterfucking waste which we've all participated in and bought into at one time or another, to continue...

But for websites that actually matter?

For blockbuster sites and labors of love?

For social sites, blogs, and forums?

For games?

For any website where subtlety and precision of HTTP request and response are important?

You either bow to the dirty utility of ASP.NET, acknowledging it for what it is, or you try to focus on true craftsmanship with ASP.NET MVC; trusting that when people like Steve McConnell (the author of Code Complete) say things like this, emphasis mine...

There's no such thing as a free lunch, and even if there were, there's no guarantee that it would be any good. Software development is a far cry from haute cuisine, however, and software quality is unusual in a significant way. The General Principle of Software Quality is that improving quality reduces development costs.

...that they know what they're talking about. ASP.NET is simply not a quality-producing technology. If anything it's a quality-nullifying technology. Labyrinthine, opaque, tightly-coupled, lousy with dependencies, leading to a hodgepodge system that's difficult to mock up, difficult to test, difficult to debug, and in general, just difficult. ASP.NET works great, except when it doesn't. When it doesn't, you'll often find yourself drowning in a sandpit of technical debt.

Compared to all of that, ASP.NET MVC is a breath of fresh air.

Far from being an experimental development curiosity put together by a talented-but-idealistic group of people in some Microsoft white tower, ASP.NET MVC is a shining example of how good it can be when Microsoft gets something right. Clean, capable, precise, completely open, extensible to the Nth, partaking generously of the same almost philosophical beauty that we see in certain areas of .NET, and in portions of Java, and in classic Bjarne Strousstrup-style C++. Etc. ASP.NET MVC is the most encouraging technology to come out of Redmond since .NET itself.

And having sipped but once from the MVC Kool-Aid, I really would rather face zombies than another year—another minute—of ASP.NET. And if you give it a try, I'm reasonably sure you'll feel the same way.

Tags: Internet, ASP.NET, ASP.NET MVC, HTML, Microsoft

63 comment(s)

James, we switched to ASP.NET MVC at work two weeks ago and couldn't agree more.

However, one technical point you may want to clarify: ASP.NET MVC relies on a couple core (but clean) pieces of ASP.NET, such as HTTP Handlers and the like. Nit-picking I know. ASP.NET MVC sidesteps a lot of the ASP.NET junk, but both technologies share a common trunk.

BTW, I've never seen a top 10 or top 100 website done entirely with asp.net mvc or whatsoever.

Facebook: PHP, Youtube: PHP, now Python, Wordpress: PHP, Wikipedia: PHP, All Zynga: PHP and the list goes on.

If I had to minimize risks and inversion, I would go directly with PHP and smarty (ie. razor is just a copy of smarty).

.NET is becoming too bloated to do really stupid things, and I do not see the benefit of all this bloat, except for elemental stupid blogs.

I recently ran across this thread on ASP.NET viewstate vulnerabilities via XSS. Funny how you write this just after upgrading your comment form to HTML. ;)

I completely disagree. NOBODY CARES ABOUT CLEAN MARKUP because you don't need to care about clean markup, because the Internet (and search engines) can handle even the most bloated content. That being the case, everything you say here is bullshit. We've used ASP.NET for years and have had success after success with it.

To "Try Again": Search engines may be able to handle bloated markup, but just think of the implications if they didnt have to?

And its still bandwidth that is unneccessary, granted in these days if a high mutimedia content web, not overwhelming bandwidth, but extra data just the same.

Clearly, there are those who DO care about clean markup.... Just like there are those of us who care about clean code of ANY sort. Sure spaghetti code will get the job done, but I take pride in my code, I want a programmer in 12 months who has to come along and extend it (or just reads it) to easily understand it (maybe even say 'Jeez this guy is good'). And I want my code to represent an elegant and clean solution, not just the one that took me the least amount of time to hack together.

Be interesting to see exactly the type of projects you are claiming so much success with ASP.NET (and perhaps even your role in them?) I have just come out of a 6 month 'discussion' with IT 'managers' (who somehow, always seem to know sweet f all about IT) convincing them (finally) to switch to MVC or even an ASP.NET AJAX framework.... (we have to use ASP.NET for certification/security reasons) And for pretty much the exact same reasons stated in this blog post! Come to think of it, you sound like an IT manager, if not a fool code cutter who doesnt give a rats about the quality of his/her work.

You certainly would care about clean markup if you developed non-trivial apps and had to debug problems with asp.net, and if you weren't a dragtard. Saying both technologies share a common trunk is like saying Lawrence and the tree sloth share a common ancestor.

I care about the cleanliness of my source code much more than the compiled output. Very rarely do I have to debug an ASP.NET page in the browser, so I don't need to care about the odd control IDs and javascript. I'm not saying MVC isn't "better", but your post reads like a sensationalist high school presentation by Bill O'Reilly

Okay, so you don't like WebForms. That's fine. But to insinuate that all WebForm developers are stupid (which is exactly what you've done here) is just asinine.

Not only is that assertion just plain WRONG, it is a huge turn-off to the very people you seem to be attempting to convince.

I agree with you that WebForms doesn't always encourage the best coding practices. But, guess what? Neither does MVC! (Remember Oxite, anyone?)

Slapping together an MVC application doesn't automatically make you a great programmer, any more than using WebForms automatically makes anyone a crappy programmer. Great developers (NOT frameworks) write great programs. Shitty developers write shit. Plain and simple as that.

Yes Virginia, there ARE plenty of developers out there who have and are writing great programs in WebForms. If you don't realize that, you really are stupid.

I've enjoyed your previous posts. This one made me laugh and think about this:

Lucille Bluth: Everything they do is so dramatic and flamboyant. It just makes me want to set myself on fire.

source: first episode arrested development

Anyway, yes, public sites that are AJAX heavy are really tough with ASP.NET WebForms. I know, I've done it and lived to tell about it. Not fun. And intranet sites that are LOB (line of business) are pretty easy and slick with WebForms. Especially if paired with something like CoolStorage (Best F*cking ORM EVER).

I looked at ASP.NET MVC but I guess I was nonplussed. I might take another look. Seems to be a no-brainer for public sites. However, I don't do many of those these days.

Very nice entry. My agreement is absolute. ASP.NET from the outset was built entirely to ease (and cripple) web development for people who were accustomed to desktop development. I remember first using it and it actually made me look back fondly on classic ASP (ASP has the advantage of not trying to lubricate the process, thus is doesn't burden you with hundreds of just-broken-enough-to-kill-you abstractions).

However I do think as a note of clarity that the core target of your argument is ASP.NET Webforms and the structures in place to support those. I built a blog system on ASP.NET -- this was pre-MVC by the way -- and use zero elements of Webforms, and have zero of downsides, using the same URL rewriting functionality et all. It really is one single ASHX page that orchestrates some back-end logic to power the entire blog.

Smart people have been working around the mistake called Webforms for years.

Off topic: Why did you uglify your blog? It looked much nicer before.

I pick the Zombies scenario, please. Do I get a shotgun?

I'm right with you, I just realized this 2 years prior:

http://litanyagainstfear.com/blog/2008/09/18/switching-to-rails/

I've lately been looking back into ASP.NET MVC and I'm glad to say it is a step in the right direction but it has a long way to go to catch up to Rails or other modern web frameworks. Keep fighting the good fight.

It's what Scott Hanselman calls cargo-cult programming (giving it a slightly different connotation than the Wikipedia definition)

"it" in this case being the way drag-drop programmers work who don't understand why they're doing what their doing. "It" is not a reflection of all ASP.NET Web Forms programming in general. for example, VIEWSTATE is just a replacement for having hundreds of hidden fields and having to encrypt/decrypt their values yourself so they can't be client-manipulated. this is a good thing, if you use it right. the connotation is that if you think "using it right" is "putting in this magic string here" without understanding why or how it's affecting the application, then you are undertaking wikipedia approved cargo-cult behaviour. i'd say that's honestly not the norm once you've used the platform for a year or so, unless you make no effort to team up with others who know more than you to learn from them.

MVC, on the other hand, is "fresh" in that it's empty. it does nothing for you. which is good if what you need is "nothing". no standardized controls that match other sites you've built, no security or validation on "page state", nothing. "PHP" is just as "fresh", but you don't see people singing its praises without being laughed at. MVC can be as clean or as dirty as you care to make it, just like anything else. "true craftmanship" means starting out by building your own tools before you can use the tools toward building your real goal... and most of us don't have time for that.

see also, what Lee wrote. you're definitely in a "honeymoon" phase with MVC. it'll pass...

I could not deal with the messiness of ASP.NET (and on top of that I was shell-shocked by a couple of years of Sharepoint), and MVC.NET was not around back then. Thankfully I realized that giving up Microsoft technologies is a lot easier than living with the zombies. Why would you want to ever use a technology whose masters drove you into a zombie-infested nightmare?

You should also give Ruby and PHP with a good MVC like Zend Framework a go. But ASP.net MVC looks promising.

All the best!

Keep in mind that ASP.NET is a year and a half shy of a decade old. At the time it was released it was a step forward. It provided a level of abstraction (which we now see as too much) that developers wanted. Back in the Classic ASP days I wanted to scratch my eyes out because every single app I worked on 60% of my time was spent maintaining state. As much as I hate viewstate it solved my problem 8 years ago.

Fast forward to 2010. MVC is the widely accepted model that embraces the web, and provide good separation of concerns which practically wasn't a priority even in the java world at that time. The popularity of ruby on rails (06) and spring (04), has brought a refreshlingly simple model to the "broken" nature of the web. I say broken because businesses want the power and ease of deveolpment of a desktop in a web model that has autonomous connectivity. For years we have tried to come up with a web platform to mimic desktop developement and interactivity (AJAX, Silverlight, Adobe Air, Flash). MVC makes sense to you and probably most developers because it doesn't "live a lie". It exposes the broken nature of the web.

MVC is a less leaky abstraction of the internet than WebForms. This is the only valid point you make in this blog.

Correct, ASP.NET doesn't generate spectacularly clean HTML, appends some usually unnecessary viewstate cruft and potentially large amounts of incomprehensible auto-generated JavaScript, forces you to use a (god forbid), etc.

But who gives a shit? The extra markup takes about a fifth as long to download as the 68kb logo on this blog. It looks like nice XHTML in the designer, why the fuck would I care what the output looks like? Do you spend all day long scouring your compiled HTML? You don't like drag-and-drop? Welcome to 2k10. We use GUIs here. Are you authoring this blog in Pico running in a console-only OS? Grow the fuck up.

There's nothing wrong with event-driven web development. There's nothing wrong with ASP.NET WebForms; a mature and proven web framework.

A great and entertaining read, thanks for the post. I couldn't agree more. Excuse me now whilst I fend off the zombies in the webforms app I have to maintain.

Unfortunately, some are compelled to write their Web apps (amongst other software) using MS products (including ASP.NET, SQL Server etc), because their employers require them to. Writing software in the defence industry for example. They just refuse to use something like Postgresql or an Open Source AJAX framework, as they cant be 100% certain they are not getting a 'tainted' copy, and seem to think that only software from large corporations which charge them $10,000s+ is trustworthy...

I am not saying I agree with these management decisions, or think they have much foundation in reality, simply that it is forced on lots of developers every day.

I suspect ASP.NET MVC will end up in the trash bin just like the failed attempts before it.

If want to build a "real" web app that you'll be able to enhance and maintain, use a proven open source language like PHP, Python or Ruby.

All Microsoft dev technologies from Visual Basic forwards are built to be "throw away" and break each time a new version is released.

Meanwhile, my PHP site from 1999 still runs perfectly on the latest versions of PHP, Apache and MySQL.

@Lee Drummond: Oxite ! Someone who remember the beguiling, yet abandoned, "Killer App" of ASP.NET MVC. Funny how people forget ( we'll just brush it under the rug....no one...will notice ..Shhh ) crap that isn't "convenient". Oh, I'm sorry, did I just step on your pretty little MVC toes ? I'm glad some people around here remember the taste of the ASP.NET MVC KoolAid flavor. I remember it as not too long ago when through the P&P group MVP(!) was being touted as the way to go ( Anyone who used the Web Client Software Factory knows from whence I speak ). What a crock. Sure WebForms aren't the pinnacle of refined design, but ASP.NET MVC is simply the same pendulum swinging clear across the room ( careful, it'll knock you aside as it's swinging past you ) to the "I must have control of my markup !" weenies. Grow up, people.

Don't kick the anthill, James. Don't prod the bee's nest.

I've been working with ASP.NET since 1.0..

I went through this "wow this is awesome phase".. Thought ASP.NET controls were great and were going to emit the right HTML for the different devices on the network (WAP, ETC)..

Well.. it turned out the be the worst way to solve the issue. After several years of fighting .NET controls HTML output (ie, inheriting and overriding a controls render methods)

Today I am writing ASP.NET MVC and ASP.NET code without the ASP.NET controls. I end up with webservices, .aspx pages with almost no codebehind and lots of Javascript and jQuery code.

Pages are faster and behave much more like programs that webpages when they need to be..

ASP.NET UI controls are dead to me..

You write... ASP.NET MVC is the most encouraging technology to come out of Redmond since .NET itself.

Hello? Microsoft is just copying ruby on rails with asp.net mvc. nothing original from them.

If you compare ASP.Net to ASP.Net MVC I can agree, but if you see it in a historical perspective and compare it to the old ASP of yore, then I would praise ASP.Net to heaven and back.

I don't see the point in bashing old tech. It was better then what we had when it came out and saved us money then. And when new things come out, it will save us even more.

It's called evolution :)

Agree with the author here but disagree that this is an MS issue only. All companies produce crappy web technology. Not just MS.

Another problem with VIEWSTATE:

http://www.communities.hp.com/securitysoftware/blogs/spilabs/archive/2010/03/30/configuration-is-half-the-battle-asp-net-and-cross-site-scripting.aspx

You're a c**t.

@Wolf:

And you're a Microsoft-certified partner! Lol.

I just read your article and am impressed with your knowledge about asp. I've wanted to get into this for awhile now but I swear I'm just feeling lost and frigging bewildered.

Can you suggest some websites or books where I can start? I'm mainly lost in the Visual Basic, VB.NET, ASP, ASP.NET and now there's ASP.NET MVC

Where in the world do I start? My main goal at one time was to create a website that will interact with a sql db. Letting me pull information / reports from the server to display the results on a webpage and also a page where the user can enter information.

I have Visual Studio 2008 Enterprise I also have SQL Server 2008

I've visited Amazon.com and bought books on SQL. ASP.Net and Visual Studio but I'm still lost in this maze.

Any help would be greatly appreciated.

Thanks

Doug

Just for the sake of it, I decided to give ASP.NET a try last month, coming from PHP. My desktop application language of choice is C#, so it's natural I'd give a shot at this "C# for teh webz? OMGZ!" thing.

I then downloaded Visual Web Developer Express 2008. Though I thought the IDE would be nothing like Netbeans (which is my tool of choice to develop in PHP), so I expected the drag-and-drop functionality to be there, since it's a Microsoft IDE and all. And I thought I could just skip it, and make us of ASP.NET without being a dragging monkey.

But after following the first few chapters of a book I borrowed from a friend, I came to this conclusion: I'll never ever get those 2 days back. That book (and no other book or tutorial I've managed to find - even if a review) would teach how to code ASP.NET from scratch. It's all a mix of dragging components and, as you mentioned in your entry, crazy-ass, magical form entities from beyond.

I really love .NET, and programming in C# is both easy and fun, but ASP.NET was to me like a spray of pepper directly in the eyes followed by a kick in the crotch. I'm scarred for life, and I won't be checking ASP.NET MVC either. The experience was THAT bad.

Maybe it's because I'm used to the PHP way of things - and yes, I care more about clean markup than I care about clean air - but this is just not for me.

Having a Windows Form code (and all it's properties) generated automatically for you in a desktop development application is one thing, and Visual Studio does a great job in keeping it clean too. But HTML is different. Once you learn it and understand how much control you can have over it by just doing it right, you won't let go off it.

Just the (not so) random rant from a PHP developer.

I read this article and reread it searching for actual arguments against ASP.Net, and was only able to find a few:

1) HTML generated markup sucks.

To which I can safely and rationally reply: So what? The VAST majority of my support time is spent on the back end in one of my non-UI layers which are completely testable (and without MVC). When I do need to be concerned with the UI on the front end, I use jQuery, which makes grabbing even the "ctl100reallylongfreakingannoyingname" a piece of cake. As far as bandwidth is concerned, I don't know anyone who has less than a 5Mbs connection at home. Again - so what?

2) Viewstate sucks.

Why? Because I'm passing back a few extra kbs of on a round trip? Who cares? Personally - I love the viewstate. Sorry, I suppose it's the "dragtardedness" in me, but I think Microsoft did a great job of minimizing a lot of the front end headaches. While I am perfectly capable of dealing with httpresponse and the mechanics of client-server interaction, I don't necessarily care to, and if the framework exists where that work is safely minimized (and yes, with ASP.Net, it is), I can put my focus where it needs to be.

3) Don't be a dragtard.

I'm not even sure what that means. I'm sure there's some ultra-trendy wikipedia article on it, but I don't really care.

4) "But for websites that actually matter?"

I find this insulting. Matter to who? You? I don't care if they matter to you. I care if they matter to my customers. If they do, and my support time is minimized, which it is, mission accomplished.

5) From the rest of the comments: "Go with a real language, like PHP"

Puff. Dude, PHP is REAL man, it's like, free, like linux and mysql man, just like the way the interweb is SUPPOSED to be. Puff.

4) "But for websites that actually matter?"

I find this insulting.

It's not an elitist statement. Some websites (especially in the corporate arena) are essentially throwaways. Other sites are the opposite. Some sites are private. Some sites are highly visible. Some sites have money and security on the line. There are differences, and the point was that if you care about your site, craftsmanship (including clean markup) is important. That's all.

[To anyone who cares, this is an update to the comment up there, I'm the same Mike - PHP developer.]

After the initial shock (and the sworn statement of a fellow developer I trust), I decided to take a guided look at ASP.NET MVC. There are two reasons I do have an interest in this:

  1. It allows me to code the logic in C#, my desktop language of choice.
  2. ASP.NET, despite being crazy in it's drag-n-drop, < SURPRISETAGFROMHELL /> nature, is valued by employers, so it's a nice addition to one's skill set.
  3. .NET Framework. Yes, it is from the dark side. But it is GODLY. (If you are not into Windows, just skip it).

To my surprise, ASP.NET MVC development actually looks very simple, and close to PHP when it comes to allowing you to decide what HTML is rendered - no bullshit added. I'm talking about the < asp:ContentPlaceHolder ... /> things, and Master Pages.

Another (very nice) thing about it is the routing design. It can be daunting at first, specially if you think "OH NOES! mod_rewrite from Microsoft? It must be an unholy battle against evil, random JavaScript MagiCode!". It is not!

The thing with ASP.NET MVC is that you have to deal with some conventions, at the expense of beloved configuration. And that's probably the biggest barrier I'll be facing, coming from WAMP/LAMP environments - yes, I've used PHP under Windows, and it behaved nicely.

For instance, I was "stuck" for a good 30 minutes trying to figure why I had to name a controller class < RouteController >Controller ("HomeController" or "WhateverController", for example). It is just because. It depends of course on the routing configuration on your global configuration file, so the name you choose for the controller assigned to a specific route defines (appending "Controller" to the name) which class must be used*. That's not really a bad or overwhelming convention, but it is something I would like to have control over. Using PHP I have the power to name my classes "potato", "chickenPoo", or "iHateIowa" if I want to - without appending any conventional names to them to make the framework happy. But that doesn't really matter.

To sum it up: I will be learning MVC (MVC2, actually). I don't think it will replace PHP as my favorite language for the web right away, but with a possible few tweaks to vanquish the mystical components surrounding the core of application configuration, it might get on par rather quickly. I've managed to render clean HTML with only a few minutes of experience with it, and the template/placeholder system (the curiously awesome Master Pages) instantly KOs PHP's Smarty - not that they are exactly 100% related to each other, it's just that Smarty is, indeed, black magic overkill if you know your HTML/CSS.

That's about it. Just sharing some insights. Maybe another PHP programmer will find this useful. Cheers.

*If that's not the way it works, someone please correct me: that was just what I could get from a few tutorials and the first few chapters of an MVC 1.0 book. I might be wrong about it.

I think I should be handed some sort of "Counting Fail" badge.

While stating that there were TWO reasons why I was interested in ASP.NET MVC, I've listed THREE.

And I should have listed a fourth one, that now comes to mind:

  1. ...
  2. ...
  3. ...
  4. Yes, WYSIWYG "designers" should have rocks thrown at them. But the IDE (Visual Studio) provides something else, which is something that no PHP development environment (up to this day, and I have not tried them all - only a few enhanced Notepad like editors, Eclipse, and finally Netbeans) managed to deliver: blazing fast, complete Intellisense. Does loving it make me a "Microsoft ho"? I hope not. Then again, I care not.

@Mike:

I've managed to render clean HTML with only a few minutes of experience with it, and the template/placeholder system (the curiously awesome Master Pages) instantly KOs PHP's Smarty - not that they are exactly 100% related to each other, it's just that Smarty is, indeed, black magic overkill if you know your HTML/CSS.

That was exactly my experience coming from PHP!!!!!!! It was the first thing I noticed about MVC which made me say, at least I'm in a world where I have control. Clean markup isn't so important to me. I disagree with JD on that. But working with a technology that doesn't prevent it, is.

I find it amusing to say the least, that many people here have old and outdated ideas about ASP.NET.

If you took even a minimum time to actually read up on the subject at hand, you would discover that VIEW STATE in the new .NET 4 framework can be completely disabled, and you can then enable it only for those components that you actually want to use VIEW STATE.

---SNIP SNIP ---

"The value of the ViewStateMode property determines if view state is maintained only if the EnableViewState property is set to true. If the EnableViewState property is set to false, view state will not be maintained even if ViewStateMode is set to Enabled. A good use for this feature is with ContentPlaceHolder controls in master pages, where you can set ViewStateMode to Disabled for the master page and then enable it individually for ContentPlaceHolder controls that in turn contain controls that require view state."

Clearly, there are those who DO care about clean markup.... Just like there are those of us who care about clean code of ANY sort. Sure spaghetti code will get the job done, but I take pride in my code, I want a programmer in 12 months who has to come along and extend it (or just reads it) to easily understand it (maybe even say 'Jeez this guy is good'). And I want my code to represent an elegant and clean solution, not just the one that took me the least amount of time to hack together. Inbound Links

-1'

-1'

-1'

-1'

-1'

-1'

I wonder do we need asp.net? With the state-of-the-art javascript libraries like JQuery, MooTools and web services who needs asp.net. Single page apps like Facebook can be designed with Web services with proper navigation methods. Back in 2000 I started to learn ASP, after reading few chapters I came to conclusion that this is not a technology to put your time in. I visited asp.net in 2006 but after few years of development I've come to conclusion that this is not going to be future of web development.

These are very classic, I like!

ASP.NET can be bad in the wrong hands. But with expertise, you can have success. I have not tried MVC yet but I will. ASP.NET is like any tool, use it unwisely and you will have bad results. Mine have been good......very good.

Thoroughly enjoyed reading your article post. I find that the ASP framework is quite good to work with. Although there are some times when it gets a bit frustrating. I saw a good post about this on a site that was doing a registry booster review. Check it out when you can. Thanks again.

Sorry, adding the link now. registry booster review

Why must sites be MVC? Does it really improve?

very nice

I love my ghd outlet Glattetang! It heats up very quickly and works well. My glamour hair is annoyingly thick and poofy, but ghdstraighteneroutletaustralia works wonders! I have never been so fully satisfied with just ghd straightener outlet supplier! What a pleasure shopping at this ghd outlet australia! Thank you very much for this wonderful shopping experience. I will be shopping ghd outlet very very often.

I love my ghd outlet Glattetang! It heats up very quickly and works well. My glamour hair is annoyingly thick and poofy, but ghdstraighteneroutletaustralia works wonders! I have never been so fully satisfied with just ghd straightener outlet supplier! What a pleasure shopping at this ghd outlet australia! Thank you very much for this wonderful shopping experience. I will be shopping ghd outlet very very often.

辞任したのは牧義夫厚生労働副大臣、森裕子文部科学副大臣、黄川田徹総務副大臣、主浜了総務政務官の4人。4日の持ち回り閣議で了承された。小沢元代表は同日夜、東京.赤坂の料理店で牧氏らと会食した。

 辞任を認めた理由について、藤村官房長官は4日の記者会見で「辞意が固かった」と説明した。しかし、民主党内では「続投させれば国会の空転を招くと考えたからだろう」との受け止めが支配的だ。

I really like your articles so that read all of your articles

jerseys hockey

I like all the reviews have been posted by the visitors ofthis site ,some of them are very good suggested regard the article.

Use the form below to leave a comment.






Coding the Wheel has appeared on the New York Time's Freakonomics blog, Jeff Atwood's Coding Horror, and the front page of Reddit, Slashdot, Digg.

On Twitter

Thanks for reading!

If you enjoyed this post, consider subscribing to Coding the Wheel by RSS or email. You can also follow us on Twitter and Facebook. And even if you didn't enjoy this post, better subscribe anyway. Keep an eye on us.

Question? Ask us.

About

Poker

All in all you're just another spoke in the Wheel.


Hire

You've read our technical articles, you've tolerated our rants and raves. Now you can hire us anytime, day or night, for any project large or small.

Learn more

We Like

Speculation, by Edmund Jorgensen.