Hacker News new | ask | show | jobs
by irahul 4964 days ago
> I can use default project templates that are included in Visual Studio, download starter projects from the web, or, if I prefer, start with a completely empty solution and use Nuget to cherry-pick functionality that other developers have made available.

It's not about just the templates(I have personally never used one). Rails has useful code generation(scaffold, controller, model, migration). I would rather not type what I can generate. This isn't something you can solve with project templates.

How is this a myth that you can bootstrap a project faster using Rails? Here, take this:

http://guides.rubyonrails.org/getting_started.html#creating-...

Show me how I do the "10 minutes blog" in your framework of choice.

> Myth 2: It's Easier to Manage Packages Rails

Great. Good on them for realizing adding assemblies using Visual Studio dialogs is a fucked up way to manage dependencies.

> Myth 3: It's Better to Develop with RoR Because it's Open Source

It's better to develop with RoR because it's open source, and when something breaks or I need to augment, I don't need to wait for my overlords.

> If your personal opinion or corporate agenda is that it's "better" to develop on OSS solutions, then good on you.

It's neither. How hard is it to understand that black boxes are a pain?

> Myth 4: I Get More Options for View Engines/I'm not Limited by Microsoft View Engines

> First of all...what limitations? The Razor view engine â the default for MVC â is likely one of the best view engines around right now.

And how is razor one of the best? http://www.asp.net/mvc/tutorials/views/introduction-to-razor... This looks like another run of the mill template engine.

> Maturity isn't dictated by age, and what is really important is how comfortable you are with your tools.

Maturity of a framework is independent of how comfortable you are with it.

> but it doesn't mean you can dismiss VS for what it is

Umm. RoR isn't an IDE. What has RoR's maturity got to do with VS? If you want to talk about tooling, please do, but how does RoR's tooling the same as RoR maturity?

> You're likely to find just as many bad questions, answers, arguments and features in any language, if you look hard enough.

Are you seriously positing all languages have same amount of activity and features?

> I know exactly where my models go. And my views. And helpers. And filters.

And I am least interested in learning a new project layout every time I work on a different project. You know your project layout - I don't and I am not interested in learning it. The point of a standardized layout is "it's more clear where things go".

2 comments

Hey thanks for this. I will indeed take you up on the "10 minutes blog" and put it on YouTube. I do it all the time during presentations.

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.

I wonder why you bother posting things like this here of all places. I agree with you, I'm an MVC3 and a Rails developer - I put food on the table for my family using both (and even sometimes CakePHP).

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>
    }
ERB (one of a ton of view engines you plug into rails):

    <% 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.
You don't see how uncomfortable for the hands it is to type `<%` and closing `%>` every single time you want to output something using code?

How can you compare that, to a simple `@` symbol? ERB (or even Mustache for that matter, feel like a relic compares to Razor.

> You don't see how uncomfortable for the hands it is to type `<%` and closing `%>` every single time you want to output something using code? 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 = person
You're comparing something that comes out of the box (Razor) with something you can achieve comfort with after wiring up hotkeys and snippets. That's not a fair, clinical comparison.

Are you kidding me?

Slim looks like something much MUCH better than the crufty old ERB.

If you don't like that, you can use haml for example, or any number of other engines. It didn't even occur to me that anyone would care enough about the <% for that to be the point.

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

How can you compare Razor's elegant syntax with Rails really smelly view engine: @foreach (var person in Model.Friends) { <p>@person.Name</p> }

Wow. That's revolutionary. Iterating over a collection.

/s

For Myth 4, you're agreeing with his point. He says:

> For the record, the MVC Framework is [also] completely open source... [thus] This is not a differentiator for Rails.

I am responding to his "open source about corporate agenda or personal motto". Working with open source frameworks and libs(at least for me) has nothing to do with corporate agenda or personal motto.