by JamesChambers · 14y ago · 0 comments
I agree it's not just about the templates. We have support for scaffolding (controllers, views, migrations and more). Our models are POCOs, so they are trivial to write, and we have great helpers for that.
Agreed fully on #2. About time.
#3 - I haven't had to wait for anything. Most parts that I don't like I can and have just built my own parts for. The MVC Framework (and ASP.NET runtime) are pretty much pluggable up and down the stack.
As for the maturity piece, I think you're taking the VS comments out of context. I'm not saying MVC is an IDE and I'm not saying RoR is or isn't. My comments on this were from the segway from "tools" in the previous paragraph.
> Are you seriously positing all languages have same amount of activity and features?
No, I'm simply saying you can find bad features in any language. :o)
Again, I'm not saying "You have to drop what you're doing and try MS's implementation of MVC", I'm just saying, "Don't knock a horse before you try reading it."
Or however that goes.
Thanks again, great comments.
The amount of sheer idiocy in this thread is really surprising considering the website.
It's like people see "Micro$0ft", foam at the mouth, and start rambling on about FOSS. Without even using MVC3 for anything substantial.
To compare Razor with any other view engine and say it's more or less the same is SO IGNORANT it makes my blood boil; especially since people are upvoting those same stupid remarks.
How can you compare Razor's elegant syntax with Rails really smelly view engine:
@foreach (var person in Model.Friends)
{
<p>@person.Name</p>
} <% Model.friends.each do |person| %>
<p><%=person.name %></p>
<% end %>
Or: <% for person in Model.friends %>
<p><%=person.name %></p>
<% end %>
I don't even like Rails, but I fail to see how that is "really smelly". Or as I prefer Mustache, I'd probably rather pass Model.friends to the view as a variable and do: {{#friends}}
<p>{{name}}</p>
{{/friends}}
But regardless what engine you do, you'd be hard pressed to find any big differences in terms of iterating over a collection. I find it very hard to believe that you're a Rails developer yet somehow find the above syntax so much more elegant that you'll use that as an example of how rails has a "really smelly" view engine.How can you compare that, to a simple `@` symbol? ERB (or even Mustache for that matter, feel like a relic compares to Razor.
I don't think you are doing an objective evaluation.
1. All goddamn editors can be configured to do a short key for the expression(I have mapped \1 to `<% %>` and \2 to `<%= %>`)
2. If that is too much of work, use Haml http://haml.info/tutorial.html or Slim http://slim-lang.com/
# slim
- persons.each do |person|
p = person
# haml
- persons.each do |person|
%p = personIf it matters, it'd take about an hour to put together a wrapper to let you use the @foreach ... { } syntax with Rails. Nobody bothers because this is about item #1045 on the list of pain points in web development.
FWIW: For my part I consider it a massive smell to have what appears to be code in the templates, which is why I prefer Mustache and similar which explicitly force the logic to be kept separate, so to me the Razor example and ERB examples look equally hideous.
Wow. That's revolutionary. Iterating over a collection.
/s