Devlico.Us
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @devlicious

Derik Whittaker

Thoughts on Software Development, .Net, OOP, Design Patterns and all things cool



Upgrading DimeCasts.net to MVC Preview 4

Today I decided to sit down and upgrade the Dimecasts.net code to run on MVC preview 4.  To be honest I did not know exactly what to expect, and I have to say, it was kinda painful but not too bad.

Let me first start off by saying this.  Anyone that decides to build a production application of any size on a Technology Preview must be willing to accept breaking changes between releases.  Please do not take this post as me 'bitching' or 'complaining'.  This post is just to help others that may be about to do the same thing.

You can get the list of changes and the readme from here.
You can get other information about the MVC framework from codeplex or asp.net.

Ok, on to the issues I ran into.

Problem: Assemblies not being correctly referenced.  The first hurdle I ran into was that VS did not want to accept my new MVC assemblies.  For some reason even though I had added them as a reference they were not being dropped into the bin directory.
Solution: All I needed to do was remove all the files from the bin in the solution and the Reference_Dependencies folders

 

Problem: The MVC team renamed RenderView to View
Solution: Global find and replace

 

Problem: Had to update the web.config because the version on System.Web.Abstractions and System.Web.Routing had changes
Solution: Find the few spots in the file and change the version from 3.5.0.0 to 0.0.0.0.

I was told by Chris Sutton that this was done with intent because SP1 of .Net 3.5 was about be released and the team did not want there to be any version issues.

 

Problem: All my viewdata references stopped working.  I have used the strongly typed ViewData feature a ton with MVC and all my references to it broke.
Solution: Prior to preview 4 I could do something like this in my codebehind:
ViewData.SomeProperty

Now you need to do this:
ViewData.Model.SomeProperty.

The change for this makes since, but it was a pretty painful change.

 

That about does it for my pain points in upgrading to preview 4.  I now need to spend some time giving the site a good run though to ensure I did not miss something.  Then it is off to gork all the new features and figure out how to use them :)

Till next time,

[----- Remember to check out DimeCasts.Net -----]



Comments

Derik Whittaker said:

Well, in terms of doing a major 'enterprise' site i may agree with you.

However, if everyone thought that way then there would be no-one testing the technology.  Think of the people using the MVC right now as the beta testers for the dev team.

The fact it took me about an hour was pretty nice.  A little painful, but not too bad.

All things equal i am glad i went with the MVC, Scott, Phil and gang are doing one hell of a job.

# July 26, 2008 10:18 PM

ASP.NET MVC Archived Blog Posts, Page 1 said:

Pingback from  ASP.NET MVC Archived Blog Posts, Page 1

# July 27, 2008 2:04 AM

Christopher Steen said:

Link Listing - July 27, 2008

# July 28, 2008 6:14 AM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add

About Derik Whittaker

Derik is a .Net Developer/Architect specializing in WinForms working out the northern suburbs of Chicago. He is also believer and advocate for Agile development including SCRUM, TDD, CI, etc.

When Derik is not writing code he can be found spending time with his wife and young son, climbing on his bouldering wall, watching sports (mostly baseball), and generally vegging out. Check out Devlicio.us!

Our Sponsors

Red-Gate!