ASP.NET Razor: Difference between revisions

Content deleted Content added
Luckas-bot (talk | contribs)
m r2.7.1) (Robot: Adding tr:Microsoft ASP.NET Razor
m fixing ref links
Line 34:
| url =
}}
'''Razor''' is an [[ASP.NET]] programming syntax used to create [[dynamic web page]]s with the [[C Sharp (programming language)|C#]] or Visual Basic programming languages. Razor was in development in June 2010<ref name="IntroducingRazor">[http://weblogs.asp.net/scottgu/archive/2010/07/02/introducing-razor.aspx]| Introducing Razor]</ref> and was released for Microsoft Visual Studio 2010 in January 2011.<ref name="RazorsyntaxSupport">[http://blogs.msdn.com/b/webdevtools/archive/2011/01/12/how-to-get-razor-syntax-support-in-visual-studio-2010.aspx]| Razor syntax Support]</ref> Razor is a simple-syntax view engine and was released as part of [[ASP.NET MVC]] 3 and the [http://www.microsoft.com/web/webmatrix/ WebMatrix] tool set.<ref name="RazorsyntaxSupport" />
 
==Introduction==
Line 41:
== Advantages of Razor==
 
The idea of Razor was to create an optimized syntax for HTML generation using a code-focused templating approach using a minimization of transition between HTML and code.<ref name=MVC3rve>[http://www.asp.net/mvc/videos/mvc-3-%E2%80%93-razor-view-engine]| MVC 3 – Razor View Engine]</ref> The design reduces the number of characters and keystrokes required and enables a more fluid coding workflow by not having to explicitly denote server blocks within the HTML code.<ref name="IntroducingRazor" /> Other advantages that have been noted:
 
* Is not a new language (no major changes to learn)
* Supports [[IntelliSense]] (statement completion support)
* [[Unit testing|Unit Testable]]
<ref name=pro1>[http://stackoverflow.com/questions/1451319/asp-net-mvc-view-engine-comparison]| ASP.NET MVC View Engine Comparison]</ref>
 
==Criticism==
 
Using the Razor syntax could be awkward for programmers used to prior markup syntax and although it does cause complex views to be more readable there is minimum editing advantage for smaller views. The current ASP.NET MVC 3 does not yet support syntax highlight for Razor views.<ref name=critic1>[http://geekswithblogs.net/mbridge/archive/2011/06/06/asp.net-mvc-3-hosting--understanding-razor-view-engine-asp.net.aspx]| ASP.NET MVC 3 Hosting :: Understanding Razor View Engine ASP.NET MVC 3 C#]</ref>
 
== References ==