Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. ASP.NET MVC 5 vs ASP.NET Core MVC

ASP.NET MVC 5 vs ASP.NET Core MVC

Scheduled Pinned Locked Moved The Lounge
asp-netcsharpdotnetvisual-studioarchitecture
26 Posts 17 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Kevin Marois

    Just curios. For you ASP.net developers out there. If you were to start a new project, which would you use and why?

    If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.

    M Offline
    M Offline
    MSBassSinger
    wrote on last edited by
    #16

    Blazor. Period. It uses ASP.NET Core, and no JavaScript code need be written. Blazor server-side (if latency is not an issue, such as users on the other side of the world), or (coming in May, and available in preview now), Blazor client-side. Client-side uses the webassembly engine, not the JavaScript engine, in the browser. You can change your Blazor application from server-side to client-side with a one line change. For new projects, or adding new pages to an existing ASP.NET Core web app, I will choose Blazor.

    1 Reply Last reply
    0
    • R Richard Deeming

      To answer your questions, "it depends", and "because". :) Microsoft are pushing .NET Core as the future, and won't be making any further changes to the .NET Framework. It's not going away any time soon, but the features and performance will never improve, and any bugs which don't impact security will never be fixed. You can get some C# 8 features to work in a .NET Framework project by manually editing the project file; others require additional NuGet packages; and some won't work at all. I think some of the new features are terrible - particularly the tangled mess that came out of "default interface methods" - but without upgrading to .NET Core, you probably won't be able to take advantage of any further improvements to the language. But at the same time, we regularly need to display or export SSRS reports from our applications. I have yet to find a reliable way of doing that which would work in .NET Core. We also occasionally have to interact with a third-party ERP system which uses a WCF interface with a custom closed-source message format. I have yet to see whether it's possible to make that work in Core. I don't think we've yet reached the point where newer libraries are dropping support for .NET Framework. Microsoft tried it with EF Core 3.0, but changed their minds for 3.1, which caused a complete mess. Having said that, it's probably only a matter of time, especially with ".NET 5" allegedly slated for release later this year.


      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

      R Offline
      R Offline
      realJSOP
      wrote on last edited by
      #17

      We have a butt-load of WCF services. We won't be switching over anytime soon.

      ".45 ACP - because shooting twice is just silly" - JSOP, 2010
      -----
      You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
      -----
      When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

      R 1 Reply Last reply
      0
      • K Kevin Marois

        Just curios. For you ASP.net developers out there. If you were to start a new project, which would you use and why?

        If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.

        R Offline
        R Offline
        realJSOP
        wrote on last edited by
        #18

        The long and short of it is that it depends on your environment. We use WCF services - a lot. Our current code base is ASP.Net web forms, and is way to javascript-dependant for my personal tastes. Add to that the fact that they want to move to TDD, and... I recently took on the task of creating a project template for new web apps, and had a choice between going with MVC5/DoNet Framework, or using DotNet Core. I was FORCED into MVC5 because of the WCF stuff. We actively avoid using Entity Framework (or any other ORM you might care to mention) because ALL of our database interaction is done with stored procs, and to be quite blunt, EF doesn't really care for that approach, not to mention its propensity for screwing up entities when something changes. Add to that the web server hosting the apps requires some significant configuration changes that, quite frankly, are probably beyond the abilities of our web admins. I really don't know how all of this is going to work out, because we're migrating EVERYTHING to the cloud. It's going to be a freakin mess...

        ".45 ACP - because shooting twice is just silly" - JSOP, 2010
        -----
        You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
        -----
        When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

        D 1 Reply Last reply
        0
        • R realJSOP

          The long and short of it is that it depends on your environment. We use WCF services - a lot. Our current code base is ASP.Net web forms, and is way to javascript-dependant for my personal tastes. Add to that the fact that they want to move to TDD, and... I recently took on the task of creating a project template for new web apps, and had a choice between going with MVC5/DoNet Framework, or using DotNet Core. I was FORCED into MVC5 because of the WCF stuff. We actively avoid using Entity Framework (or any other ORM you might care to mention) because ALL of our database interaction is done with stored procs, and to be quite blunt, EF doesn't really care for that approach, not to mention its propensity for screwing up entities when something changes. Add to that the web server hosting the apps requires some significant configuration changes that, quite frankly, are probably beyond the abilities of our web admins. I really don't know how all of this is going to work out, because we're migrating EVERYTHING to the cloud. It's going to be a freakin mess...

          ".45 ACP - because shooting twice is just silly" - JSOP, 2010
          -----
          You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
          -----
          When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

          D Offline
          D Offline
          Davyd McColl
          wrote on last edited by
          #19

          You mention "no orm", and the troubles with EF (I understand -- it's an 80% fit, meaning it fits well about 80% of the time). We also perform our database queries at the sql level (few procs, mostly statements, but the same idea) -- if you haven't already, check out Dapper, which will let you take a step back from pure ADO without losing the lower-level control.

          If you say that getting the money is the most important thing You will spend your life completely wasting your time You will be doing things you don't like doing In order to go on living That is, to go on doing things you don't like doing Which is stupid. - Alan Watts https://www.youtube.com/watch?v=-gXTZM\_uPMY

          R 1 Reply Last reply
          0
          • R realJSOP

            We have a butt-load of WCF services. We won't be switching over anytime soon.

            ".45 ACP - because shooting twice is just silly" - JSOP, 2010
            -----
            You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
            -----
            When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

            R Offline
            R Offline
            Richard Deeming
            wrote on last edited by
            #20

            Given where you work, I'm amazed you've managed to drag them up as far as MVC. :-D


            "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

            R 1 Reply Last reply
            0
            • R Richard Deeming

              Given where you work, I'm amazed you've managed to drag them up as far as MVC. :-D


              "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

              R Offline
              R Offline
              realJSOP
              wrote on last edited by
              #21

              Caveat - we *still* haven't started active dev work with the new template, so I'm not really counting it yet.

              ".45 ACP - because shooting twice is just silly" - JSOP, 2010
              -----
              You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
              -----
              When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

              1 Reply Last reply
              0
              • D Davyd McColl

                You mention "no orm", and the troubles with EF (I understand -- it's an 80% fit, meaning it fits well about 80% of the time). We also perform our database queries at the sql level (few procs, mostly statements, but the same idea) -- if you haven't already, check out Dapper, which will let you take a step back from pure ADO without losing the lower-level control.

                If you say that getting the money is the most important thing You will spend your life completely wasting your time You will be doing things you don't like doing In order to go on living That is, to go on doing things you don't like doing Which is stupid. - Alan Watts https://www.youtube.com/watch?v=-gXTZM\_uPMY

                R Offline
                R Offline
                realJSOP
                wrote on last edited by
                #22

                Our ADO stuff is almost as generic as EF. I'd like to completely get rid of EF but haven't found a decent guide that describes how to do it.

                ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                -----
                You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                -----
                When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

                D 1 Reply Last reply
                0
                • R realJSOP

                  Our ADO stuff is almost as generic as EF. I'd like to completely get rid of EF but haven't found a decent guide that describes how to do it.

                  ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                  -----
                  You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                  -----
                  When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

                  D Offline
                  D Offline
                  Davyd McColl
                  wrote on last edited by
                  #23

                  Ok, I have a guide: 1. Uninstall the EF nuget packages 2. Fix compilation errors, getting all your tests to pass again. Of course, if you're not into having an automated suite of tests for your code, you're probably going to find this more difficult than it has to be.

                  If you say that getting the money is the most important thing You will spend your life completely wasting your time You will be doing things you don't like doing In order to go on living That is, to go on doing things you don't like doing Which is stupid. - Alan Watts https://www.youtube.com/watch?v=-gXTZM\_uPMY

                  R 1 Reply Last reply
                  0
                  • D Davyd McColl

                    TL;DR: Core, mainly for performance (start-up time is vastly reduced, Kestrel handles http requests really, really fast), but also for future-proofing, and, ironically enough (because others have stated !Core for the _same reason_): so other devs can deal with it. For the more patient / bored: strap yourself in! Some of this is opinion, but it's opinion backed by experience, so there's that... If you're still pumping out webforms, well, good for you (and good luck with unit tests -- the best strategy I had there was to move _all_ my logic out into another assembly and have every webform callback call into that, so at least I could provide code with some level of testing over which I had confidence), but the truth is that all the new kids won't be writing webforms. So by yelling them off your lawn, you may secure your job and just cause pain for your company down the line. You're also wasting CPU cycles and bandwidth, making your sites only really work properly on low-traffic LANs where massive postbacks and slow page-loading aren't a problem. _Ugh, WebForms and the giant postback state. Should make any web dev shudder._ ASP.NET core also has a more sane startup routine than classic MVC, with the whole pipelined approach baked in from the get-go (yes, you can do filters in ASP.NET MVC !Core to approximate a lot of this, but it's way less elegant or simple). This will be familiar if you're hiring any Node devs who have dealt with Express -- so again, future-proofing your app against being trashed because no-one can work on it. In addition, ASP.NET core is a breeze to get running on a Linux host (good luck with WebForms; I guess you can go with `mod_mono` and Apache, but really, why would you want to when Kestrel is fast, light and doesn't require all of Apache and that setup?). Running individual asp.net core apps and using something like nginx for reverse-proxying means you can isolate apps completely from one another and perform fine-grained control such as rate limiting above the application level. Linux hosting is cheaper than Windows hosting, as well as arguably more performant (when comparing similar hardware, of course) and harder to crack than a Windows server. And doesn't perform performance-crippling updates during peak hours of traffic on that machine :/ (happened recently on our machines, and we can only block off 12 hours of the day as "peak hours", when we really need about 15; unless there's some hidden config I'm missing (probably am)). I don't hate Windows -- I feel that the p

                    V Offline
                    V Offline
                    Vaso Elias
                    wrote on last edited by
                    #24

                    Seems that some people got stuck in the past with WebForms.. I have been working with ASP.NET Core from day 1. Had to upgrade my projects from ASP.NET MVC 5 to ASP.NET Core 1.0, 1.0 to 2.0, 2.0 to 3.1 and whatever in between, if there were any breaking changes you simply made updates according the documentation or folks who constantly blog about .NET Core. I only work on .NET Core projects now. I have no other single complain about ASP.NET Core. Obviously if you don't need to support any outdated technologies then .NET Core is a good choice. People always complain if they don't know how to do the things and then they are comparing how it was before. At this time, I would never start project on ASP.NET WebForms or ASP.NET MVC 5. I wouldn't want to work with this outdated technologies, please don't let me work on these projects but I am happy to upgrade anything from these to ASP.NET Core. Once you start digging properly in ASP.NET Core then you would see the advantages and possibilities as mentioned by @"Davyd McColl". :)

                    1 Reply Last reply
                    0
                    • K Kevin Marois

                      Just curios. For you ASP.net developers out there. If you were to start a new project, which would you use and why?

                      If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.

                      C Offline
                      C Offline
                      captonmike
                      wrote on last edited by
                      #25

                      I like the way core does model binding better, but deploying changes is much easier with MVC 5. With core, I had to stop the IIS application pool, then deploy then start it again. Also MVC 5 allows you to change the .cshtml on the server if there is an urgent change, and you don't want to boot everyone off the site for a minute or so. All things considered though, I'd still say core.

                      1 Reply Last reply
                      0
                      • D Davyd McColl

                        Ok, I have a guide: 1. Uninstall the EF nuget packages 2. Fix compilation errors, getting all your tests to pass again. Of course, if you're not into having an automated suite of tests for your code, you're probably going to find this more difficult than it has to be.

                        If you say that getting the money is the most important thing You will spend your life completely wasting your time You will be doing things you don't like doing In order to go on living That is, to go on doing things you don't like doing Which is stupid. - Alan Watts https://www.youtube.com/watch?v=-gXTZM\_uPMY

                        R Offline
                        R Offline
                        realJSOP
                        wrote on last edited by
                        #26

                        There is nothing of value in EF if it requires me to use the rest of EF.

                        ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                        -----
                        You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                        -----
                        When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups