Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are few advantages of Razor view engine over other view engines

I want to know what are few advantages of Razor view engine other then its syntax over other view engines like Spark, NHaml or default aspx view engine. Also what is the performance difference between them

like image 874
Fraz Sundal Avatar asked Jan 18 '11 07:01

Fraz Sundal


2 Answers

For some performance numbers see my blog post:

http://blogs.msdn.com/b/marcinon/archive/2011/01/17/mvc-3-performance.aspx

Razor is nominally a bit slower than aspx but in a real world application (that does database access etc) this would not be a big deal (unless you are running a really big site where you need to squeeze every bit of performance).

like image 177
marcind Avatar answered Sep 23 '22 05:09

marcind


This blogpost by Haack should get you a long way. Also there is a link in the article for the basics.

http://haacked.com/archive/2011/01/06/razor-syntax-quick-reference.aspx

like image 26
Stefanvds Avatar answered Sep 22 '22 05:09

Stefanvds