Migrated to Razor View Engine for MVC 3

I just finished converting my views from .aspx files to .cshtml Razor view engine files. It took about 4 hours for 38 views. The key lesson I learned is, “If you didn’t do anything very fancy in a View, just delete it and recreate it.” I think that would have caused it to go faster. That time also included the time required to understand the whole model and some of the syntax. Phil Haack has a great post titled, “Razor Syntax Quick Reference” that helped with the migration.

It is a pretty nice an concise approach. My son was working with the Music Store sample site this afternoon and was very impressed with how much you can do with so little code.

I still need to do some more testing. Of all the code on the site, it’s all these views that lack any for of automated testing. The only way I can think of to test all that is using Coded UI tests. Since the site is small right now, I’ll probably just test each page once for the moment. I hope to push that version of the site up next weekend.

I’m looking forward to working with the Razor view engine going forward.


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.