Reputation: 8815
Are there any advantages that should motivate an established MVC 3 shop with a full stack to upgrade to MVC 4 or 5? We've been using MVC 3 for quite a while and don't feel like we really need "new functionality".
I'm looking for the type of advantage the Razor brought to views when MVC 3 was introduced over MVC 2.
Upvotes: 3
Views: 2829
Reputation: 2117
I'm on MVC 4 and have used the WebAPI extensively. I'd like to move to MVC 5 for the attibute routing.. (currently, routing is configured in a separate configuartion file called by Global.asax at application_start)
Take a look at the attribute routing which they've built into WebAPI 2. See how routes are declared right alongside their methods in this sample stolen directly from MSDN:
public class MoviesController : ApiController
{
[Route("movies")]
public IEnumerable<Movie> Get() { }
[Route("actors/{actorId}/movies")]
public IEnumerable<Movie> GetByActor(int actorId) { }
[Route("directors/{directorId}/movies")]
public IEnumerable<Movie> GetByDirector(int directorId) { }
}
Upvotes: 1
Reputation: 156728
It really depends on your intended usage. They've been introducing new features which may be of interest to some people, but probably not to others.
For example, if you're starting a new project, you might benefit from the Bootstrap-based default templates. I've heard that they've got a new authentication model that makes it much easier to do things like OAuth and such, too.
If you're often using your controllers as restful APIs to provide JsonResults to a rich UI, you'll probably like WebApi.
If you find that your system is liable to hit its thread limit because it's getting a lot of requests which mostly do pass-throughs to I/O operations (requests to other web services, or calls to the database), then you might appreciate that controller actions can now return Task<>
s that work asynchronously.
There are a handful of other features that are new since v3, and they pretty much all fall under the same category: they'll be useful to some folks, not so much to others.
One final benefit that you might derive from upgrading to .5 is that if .6 has a must-have feature you'll have already worked out the kinks in upgrading the last two versions, and it might make the transition to other future versions less painful.
Upvotes: 4