views:

496

answers:

3

I've been working quite extensively with ASP.NET MVC and I find it extremely useful (compared to WebForms), however I have some experience with other MVC frameworks and I feel there are definite gaps in capability.

For one, in Drupal you can hook into just about anything and override it's View action. e.g. You can hook into the Drupal function that writes out the header and append custom content. I don't see this type of ability in ASP.NET MVC.

Where else does ASP.NET MVC fall short compared to the Spring.NET, RoR, CakePHP, etc. frameworks? I'm worried that ASP.NET MVC is WebForms 2.0 and eventually it is going to wear out it's welcome in the same fashion so I would be best to move to another framework for the longterm.

Regards.

+4  A: 

It only seems to be the VC part. There is no model / database persistence type stuff going on.

Whether you see this as positive or negative really depends on how you look at it - I love using nHibernate in my MVC projects so it's probably a good thing for me...

Paul
I'll add that I've considered the, um, deep integration of ActiveRecord in Rails to be more of a bug than a feature, and that the Rails folks are presently fixing this (with the Merb merge).
Craig Stuntz
A: 

Paul, what do you mean by that ?

eugeneK
Please post it as a comment.
Daniel A. White
By default there is no ORM for creating your models, or your domain layer if you're the DDD type...In RoR you fire up the active record whatsit, point it to your DB and it generates all your models for you. (It's been a few years since I played with Rails, so excuse my terminology). With MS MVC, there is no default way of creating these things... You can Use SubSonic to get very similar funtionality as you get in rails (ie, an ActiveRecord persistence layer) but there is nothing there by default - it leaves you to make the choice rather than explicitly guiding you.
Paul
This belongs as a comment. You still don't have enough reputation to be able to do that on others questions, but with one or two answers you'd be set. We try not to pollute the answers section with side discussions, that's what comments are for. Welcome to SO
voyager
So i supposed to ask that question again, what ASP.NET MVC different from other frameworks? I thought that ASP.NET has the same ORM ( Linq to SQL or Entity Framework) as RoR has.I could get from Paul's answer that RoR generates model automatically without mapping DB to Classes each time we make changes to Database.
eugeneK
+6  A: 

Where else does ASP.NET MVC fall short compared to the Spring.NET, RoR, CakePHP, etc. frameworks?

Hmnn, tongue in cheek answer, where do apples fall short compared to pears? :-) It's hard to answer something so general. My main comment is that ASP.NET MVC is quite un-opinionated, i.e. it offends no-one, and it really doesn't enable 10x programmer productivity anywhere.

Arguably, something like Ruby on Rails does enable 10x higher programmer productivity under optimal circumstances for RoR. A example could be a single Ajax database-backed "contact me" form, where RoR's Ajax Javascript helpers really save a lot of time, if they fit your need.

The upside of ASP.NET MVC's un-opinionated'ness is that you get to pick and choose between lots of great technologies, and "mix and match" your own MVC framework. There are lots of great components available out there, many of them oven open source, with which you can "flavor" ASP.NET MVC to your choosing.

Another great thing about ASP.NET MVC is the strength of the entire tool chain -- from Visual Studio, Visual Studio add-ins like ReSharper, to Windows 2008, IIS 7, and Microsoft's deployment tools, to code samples like the Enterprise Library, there is just a huge amount of great tools and help to be found for .NET webapps.

I'm worried that ASP.NET MVC is WebForms 2.0 and eventually it is going to wear out it's welcome in the same fashion so I would be best to move to another framework for the longterm.

Absolutely not. Look at the number of questions tagged ASP.NET-MVC on this site, count the blog posts -- it's a big success. Besides, who says WebForms has died?

In fact -- and I want to emphasize that I don't have hard evidence for this, it's just a feeling -- in fact there may be more programmers actively working on ASP.NET MVC projects right now than there are on some frameworks in other languages, like Django on Python, which are considered successful and "here to stay". It is only speculation on my part, but amongst my circle of friends in development, ASP.NET MVC has a surprisingly huge mindshare for so young a project. This comes in part from "riding on the back of .NET", i.e. because .NET is so mainstream and has so many developers on it...

Move to another technology stack if:

  • you have a great deal of experience with, or preference for, other programming languages
  • or if you see huge technology benefits for your project in another platform (it really has to be huge, to offset the loss of experience with the platform).
  • maybe, if you're doing a startup, and fx there is no way Microsoft will buy your startup but Google will, then maybe select your platform based on your expected acquirers preference.

Otherwise, if you like programming in C# / ASP.NET MVC, then stay put. ASP.NET MVC has a great future ahead of it.

[In fact, I have only one real gripe with ASP.NET MVC -- the name. It doesn't exactly roll easily off the tongue.]

Jesper Mortensen