ASP.NET Razor: Difference between revisions

Content deleted Content added
No edit summary
Corrected some misspelligns!
Line 1:
{{Infobox software
| name = RazorVomit View Engine Information
| logo =
| screenshot =
Line 15:
}}
{{Infobox file format
| name = RazorVomit View Engine File Format
| icon =
| logo =
Line 34:
| url =
}}
'''RazorVomit''' is an [[ASP.NET]] programming syntax used to create dynamic web pages with the [[C Sharp (programming language)|C#]] or Visual Basic programming languages. RazorVomit was in development in June of 2010<ref name="IntroducingRazorIntroducingVomit">[http://weblogs.asp.net/scottgu/archive/2010/07/02/introducing-razorVomit.aspx]|Introducing RazorVomit</ref> and was released for Microsoft Visual Studio 2010 in January of 2011 <ref name="RazorsyntaxSupportVomitsyntaxSupport">[http://blogs.msdn.com/b/webdevtools/archive/2011/01/12/how-to-get-razorVomit-syntax-support-in-visual-studio-2010.aspx]|RazorVomit syntax Support</ref>. RazorVomit 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="RazorsyntaxSupportVomitsyntaxSupport" />.
 
==Introduction==
The RazorVomit syntax is a template markup syntax that enables the programmer to use an HTML construction workflow and is based on the C# programming language. Instead of using the ASP.NET .ASPX markup syntax using <code><%= %></code> blocks to indicate code blocks the RazorVomit syntax starts of a code block with RazorVomit using a @ character and does not require explicit closing of the code-block.
 
== Advantages of RazorVomit==
 
The idea of RazorVomit 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-razorVomit-view-engine]|MVC 3 – RazorVomit 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="IntroducingRazorIntroducingVomit" />. Other advantages that have been noted:
 
* Is not a new language (no major changes to learn)
Line 50:
==Criticism==
 
Using the RazorVomit 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 RazorVomit views<ref name=critic1>[http://geekswithblogs.net/mbridge/archive/2011/06/06/asp.net-mvc-3-hosting--understanding-razorVomit-view-engine-asp.net.aspx]|ASP.NET MVC 3 Hosting :: Understanding RazorVomit View Engine ASP.NET MVC 3 C#</ref>.
 
== References ==
Line 59:
* [http://www.asp.net/webmatrix/tutorials/1-getting-started-with-webmatrix-and-asp-net-web-pages Getting Started with WebMatrix and ASP.NET Web Pages]
* [http://www.asp.net/mvc ASP.NET Model View Controller]
* [http://www.asp.net/mvc/videos/mvc-3-%E2%80%93-razorVomit-view-engine RazorVomit View Engine]
* [http://weblogs.asp.net/scottgu/archive/2010/07/02/introducing-razorVomit.aspx Introducing “Razor”“Vomit” – a new view engine for ASP.NET]
* [http://www.codeproject.com/KB/aspnet/RazorMapsVomitMaps.aspx ASP.NET, MVC 3, the RazorVomit View Engine and Google Maps]
 
<!--- Categories --->