Scott Hanselman

DevConnections and PNPSummit MVC Demos Source Code

November 09, 2007 Comment on this post [23] Posted in ASP.NET | Source Code | Speaking
Sponsored By

110207_2058_AnnouncingT1 Folks are chomping champing at the bits to get their hands on the MVC bits. There will be a CTP very soon, so hang in there and be patient. Bits will come as soon as possible, truly.

Until then, I talked to BradA and got permission to share with you the source code of all the demos that Phil, Chris, myself and others worked on and showed at the two conferences minus all DLLs.

<disclaimer>
To be clear, these demos are demos. They were put together for the talks. You won't be able to compile or run them, and they don't represent anything other than interesting proofs of concept for the purpose of demo'ing. They are useless for anything other than reading. If they kill your flowers, it's no one's fault but your own. Read at your own risk and for your own edification. These demos don't represent the final product, nor do they even represent anything other than being an interesting curiosity. Everything can and will change and likely already has.
</disclaimer>

Here they are:

Enjoy. Also, as an aside, I encourage you to go get the new ".NET Framework 3.5 Commonly Used Types and Namespaces" poster and find a printer large enough to print it out.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service
November 09, 2007 13:28
So what's the MvcHandler? I see it's configured in a web.config to handle the .mvc extension.
November 09, 2007 13:49
Also, if you could maybe write a post explaining what you did with the IPostRepository in the BlogEngine example I would really appreciate that.
November 09, 2007 17:07
Aaagh! Frigging work proxy is blocking the download page. Will have to risk the flowers at home . . .
November 09, 2007 17:23
The BlogEngine sample looks neat. I couldn't open the dbproj, though. Is this specific to VSTS for DB Pros? This is totally the way I want to develop for ASP.net in the future.
November 09, 2007 17:36
So you now leave us with our mouths watering for more...Thanks for providing us with these examples.
November 09, 2007 17:51
Florian,

You have to have Visual Studio Orcas Team Edition for DB Professionals installed. It is included in the Team Suite beta that you can download.

November 09, 2007 18:34
Hey Now Scott,
in the addictive versions of .NET Framework you have Cardspace listed as part of .NET 2.0. I could be wrong but I thought it was part of .NET 3.0. I just got the demos & look forward to trying them starting with the classic hello world.
Hanselminutes Fan,
Catto
November 09, 2007 19:01
The additive thing is a bit misleading if you are just glancing at it. The stuff that is in the same circle as the test ".NET 2.0" isn't the 2.0 stuff, it is 3.0 - the stuff in the circle that it rests on is 2.0

It might be easier to see what I mean by starting at the outside and looking in. (Or, alternatively, rather than make the association positionally you could use the color cue. Each group is color coordinated with the label of that group)
November 09, 2007 19:13
I looked high and low and can't find a download for the actual MVC framework anywhere. Is it available anywhere or this demo is some kind of a cruel joke?
November 09, 2007 19:14
Hey Scott,

I haven't seen any examples of routing information in a config file since ScottGu's ALT.NET presentation; all routing information is always shown in the Global.asax now. Is routing via the simple text config still part of the planned release?
November 09, 2007 19:18
Not to be one of those people, but the phrase is actually "champing" at the bit. I used to get it wrong all the time too.
November 09, 2007 20:33
Do you ever sleep? ;) Blogging at midnight and back at p&p early. Looking forward to today's presentation.
Tom
November 09, 2007 22:57
@Alex G -

Uh, I hope you didn't search too long for the "actual" MVC framework. Or if you did it was at least on Company time ;)

ian
November 10, 2007 1:20
I think this is one of the most anticipated or at least talked about features/products coming out from Microsoft in a very long time. There is more buzz from developers I know who want this more than they want VS2008 or LINQ.

This either says a lot about what the team has done so far with MVC or how much we don't really like WebForms. I have to say the latter for myself but I think it's both for most people.
November 10, 2007 1:52
I'm really excited about the new MVC framework. I'm glad Microsoft is comitted to evolving ASP.NET.

However, at the same time, it's a little frustrating to see the hacks involved in integrating IronPython and IronRuby. I hope the DLR team solves the serialization issue some day so that IronPython and IronRuby can become true first-class .NET citizens.
November 10, 2007 2:26
You're a cruel man Mr Hanselman, very cruel. However thank you for posting these even if it's just a big tease.
Cheers
November 10, 2007 2:54
@Rob Bazinet:

Wow. Really? More than LINQ? LINQ in many ways was a groundbreaking enhancement, I tend to think of MVC framework as an implementation of something pre-existing for ASP.NET and do you really think that most people hate webforms? I admit that the jump from classic ASP to 1.1 (in my case) was a bit nerve racking; but now years alter it's just a different approach to accomplishing a task. While I can agree that viewstate was (maybe still is, I dunno) probably one of the more abused items of the webform model; the page lifecycle was one of the most powerful evolutions in web development in years.

I am all about options. Platforms, IDE's, design concepts, whatever. They're all just different choices for solving a problem that is demanding a solution. So, while the nerd in me instantly downloaded these tantalizing samples as I follow the road to the first community preview; I really think its a cool new "choice". Not necessarily a "better" one.

Then again I am not exposed to the framework already like Scott, Phil, and now Rob Conery are, so what do I know?
ian
November 10, 2007 5:09
I really hope that the recommended view engine isn't Brail or NVelocity. Those things are a step backwards when it comes to developing views. The problem may be endemic to HTML. Doug Crockford got it right when, in his State of AJAX video on YDN, he lamented that HTML wasn't composable.
November 10, 2007 5:50
@Edward - This DLR Examples is is just me screwing around to prove the concept. The support will be first class and I'm working personally to shepherd it through. The DLR Team will work with the MVC Team to make that happen. Don't worry.

@ian - You're right...LINQ is the bomb and is the engine that makes much of this work. C# 3.0 is huge in making this whole thing pretty and easy to write against.

@Joe - The base ViewEngine (Factory) will be WebFormsViewFactory, minus ViewState, ServerSide Forms and PostBacks. You can plug in whatever View system you'd like, including but not limited to Brail or NVelocity.
November 10, 2007 23:38
@ian - I am not saying MVC is a more distinct feature or a more important feature than LINQ. LINQ certainly has more overall impact on .NET development. My point was only that there seems to be a lot more excitement for MVC than LINQ. The reason may be that LINQ has been talked about for longer and not as much of a surprise as MVC. I think the .NET community was blown away with the announcement.

Webforms are popular but like any technology, has it's good and bad. In my opinion webforms has a bunch of downsides that an MVC framework will help avoid. I am not a huge fan of webforms and am anxious for MVC.

I agree that choice is good and I am all for that as well, each technology has it's place.
November 11, 2007 17:17
I agree with Rob.

When I have first seen the asp.net I was immediately attracted to it, because of the bunch of built in functionality and similarity to windows platform development. But doing more complex applications I have realized it flaws, especially lately since I have started to use TDD. And since I spend the most of my time programming the UI, I am more excited about MVC than LINQ (although LINQ is also a great technology - good by TableAdapters :-)).
November 16, 2007 13:28
Big thanx Scott! That's so much better than Powerpoint slides :-)
December 04, 2007 14:24
There seems to be an error on your page ! below the Dell laptop add on the right bar!!

Error displaying xml file:
The process cannot access the file 'd:\domains\hanselman.com\blog\SiteConfig\local_89718.xml' because it is being used by another process.

mscorlib

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.StreamWriter.CreateFile(String path, Boolean append) at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize) at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding) at Hanselman.TextLinkMacro.WriteAllText(String path, String contents, Encoding encoding) at Hanselman.TextLinkMacro.TextLinks(String adID, String inventoryKey)

Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.