migrating from .net web forms to .net core/mvc

Discussion in 'Programming & Software Development' started by howlingstar, Feb 18, 2019.

  1. howlingstar

    howlingstar Member

    Joined:
    Jun 9, 2015
    Messages:
    9
    Location:
    Melbourne
    We have a master solution that contains multiple projects that was built in asp.net web forms. Projects include website template, CMS panel, Super CMS panel and utilities(web services).

    Our goal is to migrate all projects to asp.net core/MVC with react

    Is it possible to do it first on one project then the next?

    For example, website will be built in MVC and others still in Web form - all connecting to the same database (MSSQL)

    Webforms projects uses telerik as the base framework.
     
  2. Wolfje

    Wolfje Member

    Joined:
    Jul 9, 2007
    Messages:
    934
    Location:
    Brisbane
    As someone who has a lot of experience in ASP.net legacy webforms and also React, it's really impossible to speculate on the scope of your platform. Only one piece of really general advice is possible here: It'll be way more work than you think.

    I'm confused a bit at this. MVC and React are two competing view frameworks. It depends on the scope of your project, but it's generally better to do layout work on the client, rather than the server. By using Telerik, it sounds like minimal javascript isn't part of the design goals. I wouldn't use both of these for a project.

    React is a pure client-side view framework, and is quite a learning curve. You need to involve a lot of build tools (like Webpack) that will conflict physically and mentally with a server-side MVC project. You can render React on the server but it's incredibly difficult to get right, and unless your entire solution is API-first (i.e. you can do everything in the legacy front-end using an API publicly, and I mean *everything*), then React isn't a viable choice and you are better off sticking with a server-side generated front end like ASP.NET MVC.

    React is only a view engine. It does not do state management like Angular does. You will need to decide on, and use a state management framework in which your business domain will be encapsulated in.

    A very loose scope of a React port of a legacy system would be:
    1. Establish feature parity for a WebAPI with the legacy front-end, including detailing a feature matrix explaining everything the legacy front-end does,
    2. Deciding on state management for React: MobX, Redux, React Hooks,
    3. Encapsulating your entire business domain in that state container, and then
    4. Modelling the front-end.
    A very loose scope of an ASP.NET MVC port of a legacy system might be:
    1. Determine just how much shit is everywhere. I'm assuming the re-write is because it's an unmaintainable mess and not because the business feels like they want to hand its dev team a bone and let them play with cool shit for a while so everyone can feel good about learning new stuff; I'm going to assume you've got business logic inside button click handlers, business objects that sit in or beside aspx pages and a laundry list of binary dll dependencies that keep you on 32-bit instances of IIS that was put in 10 years ago that nobody knows what it does or why it breaks when you remove it, and queries that would make baby jesus cry.
    2. You're still going to need a feature matrix, because I guarantee you it does stuff you aren't aware of
    3. Re-model your entire business domain in something like Entity Framework Core, and
    4. Write views and actions that make up the frontend.
    Being that you probably have developers that are kind of used to punching out stuff in Visual Studio and have no idea what React does, I would lean towards the MVC approach from a resource and time standpoint. But mark my words, you are looking at years.
     
  3. OP
    OP
    howlingstar

    howlingstar Member

    Joined:
    Jun 9, 2015
    Messages:
    9
    Location:
    Melbourne
    Thanks alot for your feedback/advise Wolfje.

    We will certainly take all of your notes in account.
     
  4. Wolfje

    Wolfje Member

    Joined:
    Jul 9, 2007
    Messages:
    934
    Location:
    Brisbane
    No problem mate. As a footnote I am not intending to come across as deliberately obstructionary, I've just seen many an undertaking like this be grossly underestimated and nobody wins out of that. If you need anything else let me know.

    :thumbup:
     

Share This Page