Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Same as most other posts defending one technology choice versus others. It's what I know best...I like the tools...can't we all get along...

The only interesting point is also the vaguest...The AI that's already available in .NET (and, by the way it's stated, apparently not in others).

I also have to counterpoint that ASP.NET MVC is "conceptually" the same as Rails/Django. Conceptual similarities are pretty meaningless. My RC plane is conceptually similar to a fighter jet because it relies on the same four forces. Actual coding-wise, ASP.NET MVC is closer to WebForms than Rails.



> Actual coding-wise, ASP.NET MVC is closer to WebForms than Rails.

How so?

I've never worked with WebForms, but I have done a few Rails projects. I don't see any real differences except for ActiveRecord, which does have a .NET port: http://www.castleproject.org/activerecord/

Also, I wasn't trying to start a fight (really!). I just think that more .NET hackers should be motivated to do startups. IMHO, I think this is the year that .NET startups begin to take off. All the pieces are in place, it's just about motivating the community.


I have several years of experience in ASP.net webforms, MVC, and Rails, and I also don't see the argument that webforms is closer to .net MVC than Rails. Sure, the syntax is more similar because both can be C#. I'm guessing this is what you mean, but the philosophy and architecture of MVC presents such a dramatic difference from webforms that I would argue it is strikingly different.


I have no problem with .net, but what od you mean about "all the pieces are in place"?


I mean the barrier to entry has been lowered drastically. I used to do my projects in Rails because I didn't want to go through the hell of renting and setting up a server for ASP.NET. Also, MVC 3 has really flattened the learning curve and the expert community is finally putting together seriously good OSS and tutorials. Finally, MVC 3 development is also highly decoupled from a lot of the uglier MS attempts at making a totally proprietary stack (MS AJAX -> jQuery, Codeplex -> Github, Azure -> AppHarbor).


It's certainly much better than a few years ago, and an order of magnitude improved over webforms. In some respects, I think the OSS ecosystem has much room to grow to catch up with Rails and Django. Although Rails and Django could also learn some tricks from Microsoft.


I wish I could understand why you feel Asp.Net MVC is closer to WebForms than Rails. Unfortunately I have barely any Rails experience. But as a developer who did WebForms for years and made the switch to MVC, I will never go back.

Edit - I also see you're the founder of badg.ly? I remember checking out your site not too long ago. We seem to be some-what in the same space with our startup http://www.IActionable.com. I'd love to learn more about how that's going for you.


> ASP.NET MVC is closer to WebForms than Rails.

Could you please elaborate on this? I've written many websites in all three technologies and I don't see how standard ASP.NET is at all like ASP.NET MVC. Standard ASP.NET is a train wreck and a simply abysmal environment to be stuck in. People managed to make successful websites in spite of it, not because of it. ASP.NET MVC may be a bit behind the times and a total rip off of Rails and MonoRail, but it's one of the best things Microsoft has ever made.


I guess I owe an explanation.

Most significantly, much of the Rails magic comes from Ruby. So when you say the two (WebForms and ASP.NET MVC) aren't alike, its like you are forgetting that they both use C#. The DLR is a small step, but it isn't in the same league. We can disagree that Ruby is such a significant productivity boost over C# - that's fine. But, if you think language is completely irrelevant, then imagine an MVC framework like ASP.NET MVC where you had to code your HttpModules, HttpHandlers, controllers, models and data access code in C. Concrete example? You don't do DI in a Rails app...yet it permeates through any WebForms/MVC app you write.

Then there's the tooling. WebForms and MVC share the same deployment and package management. Both are young and inferior to Cap and Gems (but they are young and they've done a good job with it so far). They are both hosted on IIS and essentially deployed/configured/managed the same. WebForms and MVC share the same IDE.

Then there's community. ASP.NET MVC and WebForms generally have access to the same libraries (nUnit, NHibernate, JSON.NET), the same resources, and the same community leaders (hey, I was one of them!)

So far, ASP.NET MVC and WebForms share: Language, Community, Tools, Libraries and deployment story. None of these are shared with Ruby.

Let's talk about code. Neither ASP.NET MVC nor WebForms have a cohesive model/data access story. Microsoft doesn't really provide an "M" with ASP.NET MVC. You can pick DataSets (oh wait, we don't like that anymore), or Linq2Sql (oh wait, we don't like that anymore), or Entity Framework (lolz) or NHibernate. Or, you can use Castle's ActiveRecord. None of these are very similar to Rail's ActiveRecord. So, when it comes to modeling and persisting your data, WebForms and MVC are exactly the same - which happens to be quite different than Rails.

WebForms and MVC share HttpHandlers and HttpModules/Global.asax. These are pretty nice (especially managed HttpHandlers in IIS 7). They also share the same built-in configuration management. But those are, yet again, something they share with each other, not with Rails.

Controllers? Ya, ASP.NET MVC shares more in common here with Rails than it does with WebForm's page model. And I agree this is pretty substantial..but even under the covers, things aren't all the similar. Email sending is very different (in Rails it builds on top of the controller core, which is why I include it here). Routing, model binding, validation...ASP.NET MVC and Rails are more similar than ASP.NET MVC and WebForms...but they still aren't that similar.

Views? ASP.NET MVC shares some stuff with Rails, but easily as much with WebForms. Asset management (or lack thereof), nested layouts...

Honestly, the only thing the two share in common is a controller with actions. And, when you look at typical ASP.NET MVC code, controllers/actions tend to do a lot more than than an equivalent Rails actions.

ASP.NET MVC shares more with Silverlight or WinForms development than it does with Rails.

EDIT: Somehow in all that I forgot to mention that WinForms and MVC share the same framework (.NET) and runtime (DLR/CLR). Neither of which is anything like what Rails runs on.


Your argument is mostly that ASP.NET classic and ASP.NET MVC are similar because they come from the same technology stack. The same argument suggests that WinForms and WPF are similar to ASP.NET MVC too. Everyone was surprised by your initial comment because hardly anyone expected anything different from this. Of course ASP.NET MVC uses the CLR, C#, IIS, etc. That's entirely to be expected. It's also a technical detail and doesn't get at the heart of what ASP.NET MVC is really trying to be and the type of development model it is putting forward. Which I would argue is far more important and pertinent than the fact that ASP.NET MVC still uses web.config files.

ASP.NET MVC was written to be flexible, testable (this was paramount), and focus on separation of concerns. Even well written classic ASP.NET applications are very difficult to test. To accomplish this MVC was forced to use a lot of interfaces and yes dependency injection. But that's an artifact of the language and again not a surprising fact at all.

Ruby is capable of things that C# can only dream of. And when C# 6 or 7 finally make it possible, it will come with awful syntax and more stuff thrown into the kitchen sink language. So yes, Rails can win big things here because of Ruby. ASP.NET MVC can't win big things here because of C#. Although it's not as bad as you make it out to be. But again, no one is surprised by this.

Don't forget a major focus of Rails 3 was to decouple things and make them more modular -- Make it easier for developers to choose a data access layer other than ActiveRecord if they wanted to. I'd strongly argue Microsoft looked at Rails 1 and 2 and wisely made the choice to not strongly couple a data access layer into MVC.


"ASP.NET MVC shares some stuff with Rails, but easily as much with WebForms."

It's pretty simple to make ASP.NET MVC to use a different view engine (I prefer String Template, but there are plenty others) - arguably that pretty much removes any lingering flavor of the WebForms.


I see how changing the view engine addresses the 10 bigger points that I made.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: