If only I were

Building Great Software

Archive for July 2008

Who and What is ASP.NET MVC for?

with 3 comments

Michael Neel wrote today about what a good definition is for ASP.NET MVC.

I have to admit that many of my descriptions of ASP.NET MVC have been tied to deficiencies and frustrations in the current ASP.NET Webforms implementation. It is time to start talking less about what it isn’t and to start talking more about what it is.

Michael also points out that it is not likely people will use ASP.NET MVC just so they can use the MVC pattern, since you could come pretty close to MVC with some extra work in ASP.NET Webforms.

The main point of the post was to figure out a good definition of ASP.NET MVC that doesn’t rely on problems in Webforms. And here is where I don’t think he captured what ASP.NET MVC is about. Michael ends up with this definition

“ASP.NET MVC is the evolution of Classic ASP, adding an easier separation of concerns while not using an event based model like WebForms.”

First off, I used Classic ASP successfully for several years, but I don’t think there is enough in common to invoke Classic ASP in this definition. What we typed in .asp pages looked like what you make with .aspx pages in the default view engine, but beyond that I can’t find much similarity.

Second, he ends up counter balancing ASP.NET MVC against the event model. I’m thrilled that most of the event model has gone away with MVC, but isn’t this part of the definition implying that there is a problem with the event model in ASP.NET Webforms? So I think to define what value a company would get from ASP.NET MVC you need to counter balance it against the current Webforms implementation (to a degree). But it definitely needs stand more on it’s own as it grows up.

Anyway, Michael’s post has has really got me thinking. In an interview this week I was explaining to an architect why one would want to use ASP.NET MVC and I think I was able to articulate pretty well why you would want to use it and who would not benefit so much from it. I don’t have a better succinct definition yet.

So what benefits does ASP.NET MVC have for me?

It encourages me to separate out fundamental concerns. I want my tools to encourage me along a successful path. They can’t make me build good applications, but they can give me a good model. Having a View that is just about transforming data into a page (or some other format) is good. There isn’t much temptation to put business, data or flow logic in the view. The Controller accepts requests in a predictable format, finds out what Model it needs to call and says what view to render if necessary. The Model can easily be decoupled from the first two parts.

Routing is a first class concept now giving me a prescriptive way to specify a request format. It’s not an after thought like url rewriting.

ASP.NET MVC certainly flattens out the complex Webforms event model. Any time I can cut unneeded complexity from an application I will. I can’t imagine Webforms without preinit, init, render, etc.

As I do more and more TDD with web development, I know that ASP.NET MVC is easier to unit test.

Last of all, it takes me closer to the HTML, CSS and JavaScript. Some people want to pretend these languages don’t exist and want to do Winforms on the Web and others just don’t want to have to deal with the quirks of those languages. I make no claim that they are perfect, but they are good enough and by this point in web history there is agreement on their implementations.

Can we quite having to write ASP.NET MVC? It would be good to have a shorter name for writing. And yes, I ended my title in a preposition, get over it.

Written by Chris Sutton

July 26, 2008 at 3:42 pm

Vista 64 and UAC

with 3 comments

I’ve just rebuilt my main development machine with 64 bit Vista on a quad core. So far I haven’t had any glitches with drivers and I have all of my core development tools installed.

I went through this process a year ago and it was definitely more frustrating then. 

UAC isn’t quite as annoying as it was a year ago either. Before it seemed that every important action I would take would prompt another popup. So either I’m being slow boiled to accept UAC or I’m just more patient and receptive to the security feature now.

Anyway, 64 bit Vista has been a good experience this time around and I can use all 4G of RAM with out the 32 bit limitation.

Written by Chris Sutton

July 25, 2008 at 11:46 am

Posted in Technology, Thoughts

How did you get started in software development?

leave a comment »

Javier tagged me awhile back asking how I got started with programming. So here it goes.

How old were you when you started programming?

I was 16 years old in 10th grade. Harold Fenske was a fantastic teacher and I think he is still teaching at my old school. I googled and found a picture of him (he is second from the left).

What was your first programming language?

Pascal on a Macintosh was where I started out.

What was the first real program you wrote?

I think the first exercise we had was to program the American flag in loops and print statements. Doesn’t seem that hard now, but I didn’t really know what a loop was up until that point. Whoever could write it in the least number of lines won and I think I tied a girl for fewest number of lines.

Later that semester I built a graphing calculator that could plot x, 2x, etc. Nothing complex, but I was getting the hang of it by that point.

If you knew then what you know know would you have started programming?

Sure, it was fun then and it’s still fun now.

If there is one thing you learned along the way that you would tell new developers, what would it be?

Program because you love it, not for the money. Money is nice to have, but it wouldn’t be worth it if programming weren’t fun or interesting.

What’s the most fun you’ve ever had … programming?

In college I stayed up all night writing an algorithm to walk through a cube and … well I don’t exactly remember what the exercise was, but I remember figuring out the core of it at 3:30am and being pretty happy.

I’d like to hear from:

Tim Barcz

Arian Kulp

Written by Chris Sutton

July 9, 2008 at 9:04 pm

Posted in Learning, Technology

New MVP in Eastern Iowa

leave a comment »

A friend of mine, Arian Kulp, just received the Microsoft MVP award. Arian has been writing for Coding4Fun for quite some time, speaks up at CRIneta periodically and has produced a lot of content in the form of Hands-on-Labs and articles.

Bryan Sampica is the only other MVP that I know of in Eastern Iowa. Good job guys.

Written by Chris Sutton

July 6, 2008 at 11:30 am

Hard Visual Studio 2008 Crash

with 4 comments

Visual Studio 2008 has been silently crashing when I open projects which is pretty bad when you are trying to get work done. By “silently crashing” I mean there is no dialogue window with any explanation, there is no beep, nothing. The process just silently vanishes.

I checked the Event Viewer and it is a .NET Runtime error: “.NET Runtime version 2.0.50727.1434 – Fatal Execution Engine Error (79FEC5F0) (80131506).”

It sounds serious to me, so I went into Programs and Features in Vista, right clicked the Framework 3.5 item selected Uninstall/Change and then chose the Repair option. Visual Studio 2008 works fine again.

Written by Chris Sutton

July 3, 2008 at 7:21 am

Posted in Technology

PowerShell and \\live.sysinternals.com\tools

with one comment

This is still a bit rough, but it works. The point of this script is to get updated versions of the sysinternals tools by running a single script.

cls

$targetdir = "c:\Utils\"

$tools = @{autoruns="autoruns.exe"; procexp="procexp.exe";
zoomit="zoomit.exe"; whois="whois.exe"; adexplorer="ADExplorer.exe"}

foreach($tool in $tools.Keys)
{    Stop-Process -Name $tool -ErrorAction SilentlyContinue    }

foreach($tool in $tools.Values)
{    copy -Path "\\live.sysinternals.com\tools\$tool"  -Destination $targetdir -Force    }

procexp /t

if ($error.count -gt 0)
{
    foreach($e in $error)
    {    Write-Host "error: " + $e }
}
else
{    Write-Host "completed successfully"    }

If you know ways to make it better, please post them in the contents.

Written by Chris Sutton

July 1, 2008 at 10:43 pm

Posted in Learning, Technology

Fourth Blue Screen

leave a comment »

Blue screens are never great, but 4 in 1 1/2 years isn’t so bad when compared to the XP or Win 98 days. I think this Vista build is the longest I’ve kept a stable development build around without it degrading.

I think it is hilarious that the actual error name is "BlueScreen." It seems that Blue Screen should be the description of what happened. Shouldn’t the error name be something like "Massive IO Failure?"

Problem signature:
  Problem Event Name:    BlueScreen
  OS Version:    6.0.6001.2.1.0.256.6
  Locale ID:    1033

Additional information about the problem:
  BCCode:    7f
  BCP1:    00000000
  BCP2:    00000000
  BCP3:    00000000
  BCP4:    00000000
  OS Version:    6_0_6001
  Service Pack:    1_0
  Product:    256_1

Files that help describe the problem:
  C:\Windows\Minidump\Mini063008-01.dmp
  C:\Users\Chris\AppData\Local\Temp\WER-69109-0.sysdata.xml
  C:\Users\Chris\AppData\Local\Temp\WER57D5.tmp.version.txt

Read our privacy statement:
http://go.microsoft.com/fwlink/?linkid=50163&clcid=0×0409

Written by Chris Sutton

July 1, 2008 at 6:19 pm

Posted in Technology

Web Development

with one comment

I put in my notice at work 2 weeks ago and am actively searching for some cutting edge .Net web development work.

The last 2 1/2 years have been great with my current employer. I’ve learned a lot in the technology training space and have met many good people along the way, but it’s time to get back into full blown development.

Here is what I’m looking for:

Cutting edge web development (not necessarily bleeding edge)

Some flexibility in the work schedule.

A company that is as concerned with maintainability as they are with speed of development. Hopefully they are at least unit testing, using an automated build process with good source control.

A team environment would be preferable to a one man show.

Getting to mentor and periodically teach a class would be a big plus.

I would like to be working out of Iowa City, but that is optional if there is some work flexibility.

If you work at a place like this and are looking for a web developer, please contact me through my About page.

Written by Chris Sutton

July 1, 2008 at 5:11 pm

Follow

Get every new post delivered to your Inbox.