X

ASP.NET MVC: Comparing same view on ASP.NET and Razor view engine

I ported views of my ASP.NET MVC application from ASP.NET to Razor. Although Razor is very new it is very promising view engine because of shorter and cleaner syntax. In this posting I will show you same view on ASP.NET and Razor view engine. I like Razor one more but what do you think?

My contacts table on ASP.NET view engine is here. You can open both images on separate windows and switch between them to see differences.

And here is the same view in Razor. Notice that ASP.NET MVC 3 RC has support for Razor syntax highlight. Click on image to view it at original size.

If you see these images at original size you see the effect.

For me Razor view is easier to read because there is less noise caused by template symbols. I think this view is not complex one. If there are more loops and conditionals in our view then I am sure ASP.NET version of it looks messier.

Liked this post? Empower your friends by sharing it!
Categories: ASP.NET
Related Post