I\'m very new to MVC...I have quite a bit of knowledge with Silver-light and WPF and MVVM but little knowledge in regards to MVC. I\'m following along the main tutorial on Micr
Razor is a Microsoft internal extension to ASP.NET MVC. You seem to be under the impression that Razor is provided by the community or is an off-shoot of the MVC base components, which is entirely false. Razor also provides syntactically cleaner code than ASPX.
The "extra third party dlls or code" you would be relying on are well established and absolutely no brainers to include. You copy it once and forget about it. It's not like you have to hunt them down, either. It's very easy Xcopy deployment.
As you have seen, the MS MVC site uses Razor. Most (all?) of the sites and books I read are using Razor.
Use Razor, and you'll find a lot more help than with aspx in MVC.
There is no difference regarding dependencies on 3rd party anything. ASPX is fine, but Razor is better, mostly because it stays out of your way.
You should read Scott Guthrie's blog post Introducing "Razor".
You basically replace the opening and closing tags <%
and %>
with an @
symbol, so far fewer keystrokes to do the same thing, i.e.
<%: Model.UserName %>
becomes
@Model.UserName
and
<% foreach (string name in nameList) { .. } %>
becomes
@foreach (string name in nameList) { .. }
There's a little more to it than that, but not much.
Razor is the sloppiest possible thing you could do to your markup. Code and markup do not belong in the same file, period. It is totally beyond me how anyone could recommend such madness.