Have We ASP.NET Geeks Lost Something?

When I was in Redmond a few weeks ago I begged ScottGu for a copy of the MVC bits so I could "muse" over how SubSonic would fit in. Scott's a big supporter of what we've been doing with SubSonic, and he gave me his "demo proto bits", which, as Hanselman put it, are but shades of the real thing.

When I was in Redmond a few weeks ago I begged ScottGu for a copy of the MVC bits so I could “muse” over how SubSonic would fit in. Scott’s a big supporter of what we’ve been doing with SubSonic, and he gave me his “demo proto bits”, which, as Hanselman put it, are but shades of the real thing. Scott was good enough to share with me (I’m under NDA as an MVP so please don’t ask – I simply can’t share) and yesterday/last night I geeked out a bit.


I’ll have more on SubSonic/MVC things in a future post, but I did want to share with you a disturbing experience I had yesterday when I was working up a goofy little demo site: I realized I forgot a lot of HTML and javascript.

I can’t tell you how demoralizing this was.

MVC and Server Controls
You can still use server controls with MVC, but you don’t have the “WebFormy Postback” sugar that you do with WebForms. To be sure, this is a great way of doing things, but it abstracts away the whole programming thing in general. In other words – there’s very little HTML or javascript needed since they do it all for you.

So as I’m working up my demo page, I come across a problem that hits me sideways and really made me feel dumb. Not one to pass up an opportunity to let my readers share in my ignorance – here it is for you. My moment of pain..

The Problem
OK so it wasn’t that dramatic. I just had to relearn some HTML and javascript that I forgot. Oh sure, I know how to do tables and divs and all the layout stuff – that’s not what I’m talking about. I’m talking about hand-coding radio button lists, checkbox lists, and dropdowns (what we used to call select boxes) that do auto-postback.

Specifically my problem was setting an auto-postback that would refresh a radio button list based on the selected value. Yes, this is embarrassing to be sure! I can’t even believe I’m blogging this. I’m sure you know how to do it off the top of your head. So did I! Just a few years back too!

It took all of five minutes to “remember” it (and I decided to use jQuery instead of the “old ASP way” – a lot more fun this way), and I had a good chuckle thinking back on how I “used to do it” with ASP Classic. And that sort of scared me. But then…

Sobering Thoughts
I’ve lost a whole lot of “Programming English” (insert your native language there) over the last 7 years working in .NET. I have to say it’s embarrassing. Yes I can work up most anything in javascript, but it doesn’t come to me as quickly as it should and I have to resort to Google far more often than I’d like to. I don’t do ANY form-based HTML, however.

Many of you will take this as a justification to keep using WebForms (why should we code all this stuff by hand, etc) – and I think that’s just fine. I think you lose a little in the end, but WebForms aren’t going anywhere!

Personally, as a “web programmer” I feel pretty disconnected, I must say, from my brethren “across town” who sometimes cross the tracks and make fun of us MS/ASP.NET guys. Throwing stones at our IDE and it’s designer surface – calling our “one form per page” a big sissy.

Sometimes I think they have a point. I just wish they could express it without the tired FUD rhetoric. We really ought to be listening to each other - isn’t this what MIX is all about (aside from showing that “look it works on a Mac!”)? 

If I may – I think their point is that VS and ASP.NET are pretty cushy (aka Big Massive Abstraction) and do all the work for us, and we’ve become “platform engineers” that have strayed pretty far from the core of web programming, which is HTML, CSS, and javascript.

Sure we may know about it at a high level – but can you call it up when needed? Like in an interview? OK then! You’re on!

Thank you for coming today to interview for the position of Web Alpha Geek. I’ve worked up a little technical question for you here… let’s see… oh yes, here it is:

“Create an HTML page, without server controls, that posts data back to a server when the selection in a select box has changed. The page needs to work in all browsers, and the selection needs to remain “in state” in the select list. No javascript libraries please – this must be done by hand.

You have 5 minutes and no Google…”