It’s been an exciting two weeks. I visited user groups in San Antonio, Houston, Austin, and Fort Worth, and I got to meet and connect with a lot of interested developers about the new ASP.NET MVC framework.
Two of the events were recorded, so if I ever get my hands on the recorded bits, I’ll post them here in an easily watchable format. (Don’t hold your breath though.)
My presentation had a minimal amount of PowerPoint. I decided to focus on real code. And people have thanked me for it!
I covered:
This is a lot to tackle in my 1/1.5 hour time slot. And I do get a lot of blank stares when I talk about mock objects and dependency injection, but I think more presentations need to present realistic code, rather than simple examples. The feedback I’ve gotten about this has been overwhelmingly positive, and I’m really glad people liked it.
Some questions that were asked during my tour…
“Ben, you are phenominally good-looking? Are you available?”—umm no, I’m married (and now terrified)
“What is that cool zoomey tool you used? That’s awesome!”—that is called ZoomIt, by sysinternals.
“What are you using for data access on your entities?”—It’s called Castle ActiveRecord, which uses NHibernate underneath.
“Can I use ASP.NET validators?”—Well not really. The validators have viewstate, which won’t work. Your validation definitely belongs in the Model, so you could just do server-side if you want. If you want clientside validation, you could accomplish a similar result by using marker css classes and some clever javascript (think <input type=”text” class=”required” name=”address1” /><span class=”error_message”>This is required</span>
“If we use this on IIS6, will performance suffer?”— Probably. On IIS 5/6 you have to send all requests through ASP.NET, which can be slower. I’m not an expert in this area, so definitely do your research before making any rash decisions. When we have Windows Server 2008 and IIS7, expect vast improvements.
“Do you know Justice Gray?”—Sure do. I’m a bona-fide potential friend of Justice Gray, and even have the certificate to prove it. It’s serial number marked 00000000000003. I carry it with me at all times for just such a question.
“Can you use co-exist with webforms?”—Yes! If you hit a page with the .aspx extension, the PageHandlerFactory will pick it up and you will be in WebForms Land. If you instead hit a route, you’ll be in MVC Land. Learn to know the difference and you’ll be fine.
“Isn’t it dangerous to output strings directly like that?”—Yes it is. Read my post about html encoding your values.
“Your hair is impeccable? What kind of gel do you use?”— It’s called Fructis something-or-other… and it’s awesome!
“So Microsoft has two methods of developing web applications? Which should I choose?”—If you like the rich eventing model and the ability to save state and mimick a smart client ui, then choose web forms. If you value clean html, urls, separation of concerns, and testability, then choose MVC. I will be choosing MVC more often than not from here on out.
“When will it be released”—Gawsh, I don’t know? Fall 2008? As soon as I know I’ll post it here.
(admittedly, a couple of those questions were not asked — I’ll let you guess which ones)
You can download the code and the presentation here:
File Attachment: save the world with asp.net mvc.zip (1612 KB)
I’d like to thank the user group leaders for having me speak, it was certainly a pleasure. Where will the next tour be?
I'm Ben Scheirman. I am a .NET software developer with a strong interest in agility. I work as a Principal Consultant with Sogeti.
Read more here.
email me
Ads by The Lounge
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.