locked
Should I change over to Core from MVC 5 RRS feed

  • Question

  • User1034446946 posted

    I am about to finalise changing alls my backend processing, at which time I am going to go through all the controllers and re jig them all to work with my new setup.

    The project is not live yet but will be in the as soon as I can get it done, there are no outside contraints controlling time scales.

    I have no knowledge of core, but feel as though i would be missing an opportunity before launch.

    I am also concerned some libraries i use might not have a core version, as I have red core libraries are different.

    Any thoughts? Also is anyone has a link to videos (or articles) explaining the difference it would be appriciated.

    Friday, February 15, 2019 7:12 PM

Answers

  • User475983607 posted

    I am about to finalise changing alls my backend processing, at which time I am going to go through all the controllers and re jig them all to work with my new setup.

    The project is not live yet but will be in the as soon as I can get it done, there are no outside contraints controlling time scales.

    I have no knowledge of core, but feel as though i would be missing an opportunity before launch.

    I am also concerned some libraries i use might not have a core version, as I have red core libraries are different.

    Any thoughts? Also is anyone has a link to videos (or articles) explaining the difference it would be appriciated.

    The Docs link above has everything you need to learn ASP.NET Core. 

    https://docs.microsoft.com/en-us/aspnet/?view=aspnetcore-2.2#pivot=core

    Compatibility is defined in the .NET Standard. 

     https://docs.microsoft.com/en-us/dotnet/standard/net-standard

    The majority of the .NET framework APIs work in ASP.NET Core.  I don't think you'll have issues with compatibility but you'll need to verify the assemblies you are using.

    Also is anyone has a link to videos (or articles) explaining the difference it would be appriciated.

    Again, the Docs have everything you need.

    https://docs.microsoft.com/en-us/aspnet/core/migration/proper-to-2x/?view=aspnetcore-2.2

    The Fundamental docs explain the major concepts in ASP.NET Core.

    https://docs.microsoft.com/en-us/aspnet/core/fundamentals/?view=aspnetcore-2.2&tabs=windows

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 15, 2019 7:28 PM
  • User1120430333 posted

    To be honest, I had no problem using Core concerning ASP.NET MVC Core, WebAPI Core, Core classlib project for the DAL that is using EF Core DB first.

    The ASP.NET MVC 5,  WebAPI Core 2, DAL and EF6 DB first solution was easily moved over to Core. It was a simple copy/paste operation of the code. The key was moving VS off of using IIS Express to local IIS and how to deploy the Core solution to local IIS for testing

    I and another poster started talking about VS using Core and local IIS,  and Core deployment to local IIS in the thread.

    https://forums.asp.net/t/2152537.aspx?Which+nuget+packages+are+must+for+Web+deployment

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 15, 2019 9:04 PM
  • User475983607 posted

    EnenDaveyBoy

    Thanks for the info, I was thinking of not migrating as such, all my service layers can easily be added to a new solution, then its just acase to redoing the main project which shouldn't take to long, (the views and jquery will take the longest), and I will have all clean code.

    As long as the HTML inputs do not change names and ids the jQuery should be fine.  The services will require a little work because you'll want to use Dependency Injection.

    EnenDaveyBoy

    I am also thinking about starting to use source control.

    Can't imagine developing without source control... stone age.

    EnenDaveyBoy

    Azure I will contact them next week to talk through my issues, and goggle all weekend, but source control I am find it hard to goggle as the wording is so generic.

    Azure is cloud services which is a lot of stuff but you'll figure that out.  Anyway, I use GIT through Team Services (now called Azure Dev Ops) which integrates easily in Visual Studio.  It's free to get going.

    https://azure.microsoft.com/en-us/services/devops/?&OCID=AID736750_SEM_ovGvtInx&MarinID=sovGvtInx_318282724538_%2Bvisual%20%2Bstudio%20%2Bteam_b_c__58614842877_kwd-363605729967_

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 15, 2019 10:18 PM
  • User1120430333 posted

    Thanks for the info, I was thinking of not migrating as such, all my service layers can easily be added to a new solution, then its just acase to redoing the main project which shouldn't take to long, (the views and jquery will take the longest), and I will have all clean code.

    The key to Core in MVC and WebAPI is knowing how to use its IoC  and DI and understanding 'new is glue'.  If you have used an IOC and DI in the past, you should have no problems, and even if you hane nt used them, you should have no problem in using Core.

    https://msdn.microsoft.com/en-us/magazine/mt703433.aspx

    <copied>

    When looking at code to evaluate its coupling, remember the phrase “new is glue.” That is, anywhere you see the “new” keyword instantiating a class, realize you’re gluing your implementation to that specific implementation code. The Dependency Inversion Principle (bit.ly/DI-Principle) states: “Abstractions should not depend on details; details should depend on abstractions.”

    <end>

    I am also thinking about starting to use source control.

    I contine to use TFS Express for personal usage, which is free.

    I am also thinking about moving to azure, I currently have small shared hosting for testing, but it was a location company that has been bought out by go daddy and I no longer have the same reasons for staying.

    I played with Azure about 10 years ago when it first came out. It wasn't that hard to use, but I had no reason to use it at the time to get contracts. Now,  it seems to be contracts for Azure developers and it's popular.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 15, 2019 10:44 PM
  • User475983607 posted

    I plan on having my solution on multi platforms, all my services should be transferable, is there anything i need to consider to do this? (eg the first focus is a web app, but i am looking to have mobile apps as well, maybe desktop).

    ASP.NET core allows devs to target different platform as well as use dev machines on different platforms.  Web applications, in general, are multi platform which is not unique to ASP.NET Core.  ASP.NET consumers can be on any platform.

    I am assuming to main difference is going to be the the controller area.

    I don't think so.  Can you elaborate? 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 15, 2019 11:13 PM
  • User1120430333 posted

    I plan on having my solution on multi platforms, all my services should be transferable, is there anything i need to consider to do this? (eg the first focus is a web app, but i am looking to have mobile apps as well, maybe desktop).

    A poster was posting about he or she was using Core 3 in beta I guess and VS2019, which is limited to Windows desktop for desktop solutions no cross platforms. 

    https://www.theregister.co.uk/2018/12/04/visual_studio_2019_dotnet_core_3/

    I am assuming to main difference is going to be the the controller area.

    I didn't see that,  and as long as you follow SoC in MVC, it doesn't matter if you're using MVC non Core or Core. I am sure there are some differences, but my MVC solution never invoked that coming from non Core to Core.

    https://www.c-sharpcorner.com/UploadFile/56fb14/understanding-separation-of-concern-and-Asp-Net-mvc/

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 15, 2019 11:54 PM
  • User-2054057000 posted

    ASP.NET Core is 80% same as MVC 5 and you can easily implement it in your project. If you want to test it before starting with it then I would suggest you to make a quick new application in ASP.NET Core and see how it looks.

    Learn it from here - First ASP.NET Core MVC Application

    Thanks & Regards

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, February 16, 2019 10:51 AM
  • User475983607 posted

    Right so i get Angular and MVC are just UI implementations (frameworks), 

    Correct.

    so is angular the future?

    Angular is a full blown framework for building SPAs.  If you are building an SPA then Angular might be a good fit.   I prefer React over Angular and React is very popular too.  The future is up to you though.

    or should I stick to mvc?

    Only you can answer this question.

    although I assume its fairly easy to move to angular in the future.

    Moving to angular is NOT fairly easy, IMHO.  Angular is an SPA with a completely different tool chain than ASP.NET.  Angular has a steep learning curve and the decision to implement Angular should happen before you build the project.  React is a lot more forgiving in this area.  With React you can update one web page or one component at a time.

    I have built on my new services returning models, does this method work with angular?

    It is a "good" programming practice to build services which will make integrating angular easier. 

    Please make an effort to learn the technology rather than making assumptions. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, February 16, 2019 3:01 PM
  • User1120430333 posted

    Also if I use autofac currently and I mode to CORE would i drop autofac and use the inbuilt IoC? (Any other libraries I can do similar to this i need to address?)

    IMO, you should drop using Autofac and go with Core's IoC., although you can install Autofac in an ASP.NET Core solution.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, February 16, 2019 4:03 PM
  • User475983607 posted

    i like the fact the pages are built on the server on Angular and it looks to have better speeds that say asp.net mvc, although I have only red and watched a few bits

    No the HTML is built on the client.

    I understand it would not be considered easy to pick up, however let say I built my UI in one framework and wanted to change later, is it just a case of changing everything after the controller?

    Rather than continually speculating, give Angular a try.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, February 16, 2019 8:57 PM

All replies

  • User475983607 posted

    I am about to finalise changing alls my backend processing, at which time I am going to go through all the controllers and re jig them all to work with my new setup.

    The project is not live yet but will be in the as soon as I can get it done, there are no outside contraints controlling time scales.

    I have no knowledge of core, but feel as though i would be missing an opportunity before launch.

    I am also concerned some libraries i use might not have a core version, as I have red core libraries are different.

    Any thoughts? Also is anyone has a link to videos (or articles) explaining the difference it would be appriciated.

    The Docs link above has everything you need to learn ASP.NET Core. 

    https://docs.microsoft.com/en-us/aspnet/?view=aspnetcore-2.2#pivot=core

    Compatibility is defined in the .NET Standard. 

     https://docs.microsoft.com/en-us/dotnet/standard/net-standard

    The majority of the .NET framework APIs work in ASP.NET Core.  I don't think you'll have issues with compatibility but you'll need to verify the assemblies you are using.

    Also is anyone has a link to videos (or articles) explaining the difference it would be appriciated.

    Again, the Docs have everything you need.

    https://docs.microsoft.com/en-us/aspnet/core/migration/proper-to-2x/?view=aspnetcore-2.2

    The Fundamental docs explain the major concepts in ASP.NET Core.

    https://docs.microsoft.com/en-us/aspnet/core/fundamentals/?view=aspnetcore-2.2&tabs=windows

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 15, 2019 7:28 PM
  • User1120430333 posted

    To be honest, I had no problem using Core concerning ASP.NET MVC Core, WebAPI Core, Core classlib project for the DAL that is using EF Core DB first.

    The ASP.NET MVC 5,  WebAPI Core 2, DAL and EF6 DB first solution was easily moved over to Core. It was a simple copy/paste operation of the code. The key was moving VS off of using IIS Express to local IIS and how to deploy the Core solution to local IIS for testing

    I and another poster started talking about VS using Core and local IIS,  and Core deployment to local IIS in the thread.

    https://forums.asp.net/t/2152537.aspx?Which+nuget+packages+are+must+for+Web+deployment

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 15, 2019 9:04 PM
  • User1034446946 posted

    Thanks for the info, I was thinking of not migrating as such, all my service layers can easily be added to a new solution, then its just acase to redoing the main project which shouldn't take to long, (the views and jquery will take the longest), and I will have all clean code.

    I am also thinking about moving to azure, I currently have small shared hosting for testing, but it was a location company that has been bought out by go daddy and I no longer have the same reasons for staying.

    I am also thinking about starting to use source control.

    Azure I will contact them next week to talk through my issues, and goggle all weekend, but source control I am find it hard to goggle as the wording is so generic.

    Friday, February 15, 2019 9:50 PM
  • User475983607 posted

    EnenDaveyBoy

    Thanks for the info, I was thinking of not migrating as such, all my service layers can easily be added to a new solution, then its just acase to redoing the main project which shouldn't take to long, (the views and jquery will take the longest), and I will have all clean code.

    As long as the HTML inputs do not change names and ids the jQuery should be fine.  The services will require a little work because you'll want to use Dependency Injection.

    EnenDaveyBoy

    I am also thinking about starting to use source control.

    Can't imagine developing without source control... stone age.

    EnenDaveyBoy

    Azure I will contact them next week to talk through my issues, and goggle all weekend, but source control I am find it hard to goggle as the wording is so generic.

    Azure is cloud services which is a lot of stuff but you'll figure that out.  Anyway, I use GIT through Team Services (now called Azure Dev Ops) which integrates easily in Visual Studio.  It's free to get going.

    https://azure.microsoft.com/en-us/services/devops/?&OCID=AID736750_SEM_ovGvtInx&MarinID=sovGvtInx_318282724538_%2Bvisual%20%2Bstudio%20%2Bteam_b_c__58614842877_kwd-363605729967_

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 15, 2019 10:18 PM
  • User1120430333 posted

    Thanks for the info, I was thinking of not migrating as such, all my service layers can easily be added to a new solution, then its just acase to redoing the main project which shouldn't take to long, (the views and jquery will take the longest), and I will have all clean code.

    The key to Core in MVC and WebAPI is knowing how to use its IoC  and DI and understanding 'new is glue'.  If you have used an IOC and DI in the past, you should have no problems, and even if you hane nt used them, you should have no problem in using Core.

    https://msdn.microsoft.com/en-us/magazine/mt703433.aspx

    <copied>

    When looking at code to evaluate its coupling, remember the phrase “new is glue.” That is, anywhere you see the “new” keyword instantiating a class, realize you’re gluing your implementation to that specific implementation code. The Dependency Inversion Principle (bit.ly/DI-Principle) states: “Abstractions should not depend on details; details should depend on abstractions.”

    <end>

    I am also thinking about starting to use source control.

    I contine to use TFS Express for personal usage, which is free.

    I am also thinking about moving to azure, I currently have small shared hosting for testing, but it was a location company that has been bought out by go daddy and I no longer have the same reasons for staying.

    I played with Azure about 10 years ago when it first came out. It wasn't that hard to use, but I had no reason to use it at the time to get contracts. Now,  it seems to be contracts for Azure developers and it's popular.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 15, 2019 10:44 PM
  • User1034446946 posted

    Thanks for all the info, I currently us autofac, so IoC is sorted.

    I plan on having my solution on multi platforms, all my services should be transferable, is there anything i need to consider to do this? (eg the first focus is a web app, but i am looking to have mobile apps as well, maybe desktop).

    I am assuming to main difference is going to be the the controller area.

    Looks like lots of reading this weekend.

    Friday, February 15, 2019 11:00 PM
  • User475983607 posted

    I plan on having my solution on multi platforms, all my services should be transferable, is there anything i need to consider to do this? (eg the first focus is a web app, but i am looking to have mobile apps as well, maybe desktop).

    ASP.NET core allows devs to target different platform as well as use dev machines on different platforms.  Web applications, in general, are multi platform which is not unique to ASP.NET Core.  ASP.NET consumers can be on any platform.

    I am assuming to main difference is going to be the the controller area.

    I don't think so.  Can you elaborate? 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 15, 2019 11:13 PM
  • User1034446946 posted

    EnenDaveyBoy

    I plan on having my solution on multi platforms, all my services should be transferable, is there anything i need to consider to do this? (eg the first focus is a web app, but i am looking to have mobile apps as well, maybe desktop).

    ASP.NET core allows devs to target different platform as well as use dev machines on different platforms.  Web applications, in general, are multi platform which is not unique to ASP.NET Core.  ASP.NET consumers can be on any platform.

    I know web apps are multi platform, but the blurb on asp.net core made me think I would be a Core project and relatively easily turn it into a phone app (I mean a stand alone phone app, i know it will still need the internet), is that not the case?Or will i need to use something else than core for phone apps assuming it will support asp.net any recommendations?

    EnenDaveyBoy

    I am assuming to main difference is going to be the the controller area.

    I don't think so.  Can you elaborate? 

    I think I better read the blurb, but I understand there are other fundimental differences, but the one that will affect me the most and be most apparent is the way the framework serves up the information to the user away compare to MVC

    Friday, February 15, 2019 11:30 PM
  • User1120430333 posted

    I plan on having my solution on multi platforms, all my services should be transferable, is there anything i need to consider to do this? (eg the first focus is a web app, but i am looking to have mobile apps as well, maybe desktop).

    A poster was posting about he or she was using Core 3 in beta I guess and VS2019, which is limited to Windows desktop for desktop solutions no cross platforms. 

    https://www.theregister.co.uk/2018/12/04/visual_studio_2019_dotnet_core_3/

    I am assuming to main difference is going to be the the controller area.

    I didn't see that,  and as long as you follow SoC in MVC, it doesn't matter if you're using MVC non Core or Core. I am sure there are some differences, but my MVC solution never invoked that coming from non Core to Core.

    https://www.c-sharpcorner.com/UploadFile/56fb14/understanding-separation-of-concern-and-Asp-Net-mvc/

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 15, 2019 11:54 PM
  • User-2054057000 posted

    ASP.NET Core is 80% same as MVC 5 and you can easily implement it in your project. If you want to test it before starting with it then I would suggest you to make a quick new application in ASP.NET Core and see how it looks.

    Learn it from here - First ASP.NET Core MVC Application

    Thanks & Regards

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, February 16, 2019 10:51 AM
  • User1034446946 posted

    Thanks for all the information, i see the structure is similar, one thing which is now confusing is there are different versions, like asp.net Core MVC or asp.net CORE Angular and a few others,

    Also if I use autofac currently and I mode to CORE would i drop autofac and use the inbuilt IoC? (Any other libraries I can do similar to this i need to address?)

    Saturday, February 16, 2019 11:41 AM
  • User1034446946 posted

    Right so i get Angular and MVC are just UI implementations (frameworks), so is angular the future? or should I stick to mvc? although I assume its fairly easy to move to angular in the future.

    I have built on my new services returning models, does this method work with angular?

    Saturday, February 16, 2019 2:44 PM
  • User475983607 posted

    Right so i get Angular and MVC are just UI implementations (frameworks), 

    Correct.

    so is angular the future?

    Angular is a full blown framework for building SPAs.  If you are building an SPA then Angular might be a good fit.   I prefer React over Angular and React is very popular too.  The future is up to you though.

    or should I stick to mvc?

    Only you can answer this question.

    although I assume its fairly easy to move to angular in the future.

    Moving to angular is NOT fairly easy, IMHO.  Angular is an SPA with a completely different tool chain than ASP.NET.  Angular has a steep learning curve and the decision to implement Angular should happen before you build the project.  React is a lot more forgiving in this area.  With React you can update one web page or one component at a time.

    I have built on my new services returning models, does this method work with angular?

    It is a "good" programming practice to build services which will make integrating angular easier. 

    Please make an effort to learn the technology rather than making assumptions. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, February 16, 2019 3:01 PM
  • User1120430333 posted

    Also if I use autofac currently and I mode to CORE would i drop autofac and use the inbuilt IoC? (Any other libraries I can do similar to this i need to address?)

    IMO, you should drop using Autofac and go with Core's IoC., although you can install Autofac in an ASP.NET Core solution.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, February 16, 2019 4:03 PM
  • User1034446946 posted

    Also if I use autofac currently and I mode to CORE would i drop autofac and use the inbuilt IoC? (Any other libraries I can do similar to this i need to address?)

    IMO, you should drop using Autofac and go with Core's IoC., although you can install Autofac in an ASP.NET Core solution.

    I just looked at a few tutorials and will drop autofac for the in build Ioc, but still need to look at a few more bits.

    Saturday, February 16, 2019 8:22 PM
  • User1034446946 posted

    I am a little bit confused at the concept of SPA's, I am assuming its no a one page website, but a website that doesn't change page in the usual convention and everything is considered to load in the same page, I am assuming Twitch is a SPA, as it can keep a stream live when you look at other links.

    Which I like the concept and can see it benefitting me, but after watching some videos it looks like a big step, I guess I need to go through some tutorials for both React and Angular and MVC. (i like the fact the pages are built on the server on Angular and it looks to have better speeds that say asp.net mvc, although I have only red and watched a few bits)

    I understand it would not be considered easy to pick up, however let say I built my UI in one framework and wanted to change later, is it just a case of changing everything after the controller?

    Saturday, February 16, 2019 8:35 PM
  • User475983607 posted

    i like the fact the pages are built on the server on Angular and it looks to have better speeds that say asp.net mvc, although I have only red and watched a few bits

    No the HTML is built on the client.

    I understand it would not be considered easy to pick up, however let say I built my UI in one framework and wanted to change later, is it just a case of changing everything after the controller?

    Rather than continually speculating, give Angular a try.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, February 16, 2019 8:57 PM
  • User1034446946 posted

    EnenDaveyBoy

    i like the fact the pages are built on the server on Angular and it looks to have better speeds that say asp.net mvc, although I have only red and watched a few bits

    No the HTML is built on the client.

    EnenDaveyBoy

    I understand it would not be considered easy to pick up, however let say I built my UI in one framework and wanted to change later, is it just a case of changing everything after the controller?

    Rather than continually speculating, give Angular a try.

    Will do, thanks everyone for all the help, im sure ill be back for  more info.

    Saturday, February 16, 2019 9:34 PM