aspnet / Mvc

[Archived] ASP.NET Core MVC is a model view controller framework for building dynamic web sites with clean separation of concerns, including the merged MVC, Web API, and Web Pages w/ Razor. Project moved to https://github.com/aspnet/AspNetCore
Apache License 2.0
5.61k stars 2.14k forks source link

Breaking changes list and migration guidance are needed #2380

Closed evil-shrike closed 9 years ago

evil-shrike commented 9 years ago

It is commonly claimed that MVC 6 is "almost the same as MVC 5". I read and heard this in many videos on AspNet5\Mvc6. But the more I dive into it the more different it seems. Similar but different. Converting an Mvc5\WebApi2 app onto AspNet5\Mvc6 is a pain. There're some guidances on the Internet how cool creating Mvc6 apps is. But I found nothing about how to migrate existing code onto Mvc6 (and AspNet5 in general). The things are even worse due to terrible branding - "ASP.NET 5 MVC 6" (considering we have "MVC 5" already). Just google for "Migrating onto ASP.NET 5 MVC 6".

So it's highly desirable to provide some list of breaking changes. It should consist of two parts at least: Api compatibility and UseCases compatibility. Let me clarify. Api compatibility is a list of changes in types, methods and so on. UseCases compatibility is a list of common use-cases in developing apps which are changed. For example:

var response = Request.CreateResponse(HttpStatusCode.OK);
response.Content = new StringContent(content);
response.Content.Headers.ContentType = new MediaTypeHeaderValue("text/cache-manifest");
response.Headers.CacheControl = new CacheControlHeaderValue {NoCache = true, Public = true};
response.Headers.ETag = new EntityTagHeaderValue("\"" + etag + "\"");

and so on..

I personally encountered with the following "surprises" - disappearing of types/methods/properties

Eilon commented 9 years ago

@evil-shrike indeed there are quite a few differences between MVC 5 and 6, especially concerning Web API.

We have some brand new documentation that is in progress and hosted here: http://aspnet.readthedocs.org/en/latest/

In particular, these articles:

Please have a look through those documents and if you feel there is still content missing, please file a bug on https://github.com/aspnet/Docs/issues (though some bugs are already opened, so please take a quick look at those too and add any applicable comments).

evil-shrike commented 9 years ago

Thanks! Sorry I didn't find that resource. I think it'd make sense to put the link in https://github.com/aspnet/Home#documentation-and-further-learning

Eilon commented 9 years ago

Done, thanks!

sulhome commented 9 years ago

these links are dead

Eilon commented 9 years ago

@sulhome sorry about that! Not too long ago we moved the documentation to a new site, but with the same content (though much of it has been updated).

The main migration page moved to Migration, which has sub topics for:

sulhome commented 9 years ago

@Eilon thank you

sulhome commented 9 years ago

@evil-shrike please check this question on stackoverflow https://stackoverflow.com/questions/33178983/how-to-create-a-response-message-and-add-content-string-to-it-in-asp-net-5-mvc