What are few advantages of Razor view engine over other view engines
Asked Answered
V

3

7

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

Virge answered 18/1, 2011 at 7:16 Comment(1)
To me, Razor is the most intuitive and fastest (in typing) compare to other view engines.Wearisome
A
7

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).

Actable answered 18/1, 2011 at 8:39 Comment(1)
This is preposterous from a pragmatic standpoint. Since performance becomes an issue in any mature implementation, it is a big deal, so stay clear of Razor unless you plan to be tossing away the site in a year.Londalondon
W
4

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

Waterbuck answered 18/1, 2011 at 7:21 Comment(0)
A
0

Does not require you to explicitly close the code-block, this view engine is parsed intelligently by the run-time to determine what is a presentation element and what is a code element.

Athodyd answered 1/10, 2013 at 2:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.