What factors should you consider before migrating an old application to ASP.NET Core? In this section, I discuss some of the pros and cons of migrating existing applications.
- [Narrator] Before migrating any working application to a newer technology, you should take some things into consideration. First, what are the benefits of migrating to ASP.NET Core? Maybe you want to take advantage of some of the new features such as the improved configuration, much leaner code base, built in dependency injection, or maybe it's because of the performance. Because .NET Core is a rewrite and not just the next iteration, the good folks at Microsoft have been able to remove, well not remove, not re-add a bunch of technical debt that was causing some performance issues in prior versions.
All of the numbers that are out there from the performance tests show that it is significantly faster, sometimes by an order of magnitude than prior versions of ASP.NET. Or perhaps you want to deploy a non-Windows operating system or in containers. Containerization has become a really popular thing to do with devops, it simplifies deployment and ASP.NET Core fully supports deploying your application into a container.
Well that sounds great but there's always some reasons not to migrate and first and foremost, if what you have works, maybe you don't want to mess with it. This is a legacy system perhaps, it's been around for a long time but it's a workhorse. It's working, you're not having to do many changes to it. You're not having performance issues. It'd be nice to be able to pad the resume a little bit and do an upgrade just for the sake of upgrading but you really have to look at the business value.
Schedule, complexity, and personnel certainly play a role. If you are already overworked, trying to deliver features in existing applications or new applications you might not have time to take on rewriting an existing application. Well, I'll say migrating. It's not a complete rewrite, as we'll see. There's a lot of stuff that carries over. Maybe your original application is extremely complex and that complexity isn't documented, as lots of applications end up being undocumented, and you're concerned frankly that you can't reproduce it correctly.
You also have to look at the personnel that you have on staff. If you don't have the people who can take on the learning curve, or have the time I should say, to take on a learning curve, moving to a new platform might not be right at this time. And then finally, what are the corporate plans for software development? Maybe they're moving away from .NET, there's all kinds of factors that go in here. So just because something is new, doesn't mean you should migrate.
But as you'll see through this course, there are a lot of benefits to migrating your existing application and it's really not that complex to migrate.
- Creating the .NET Core project
- Adding Entity Framework
- Migrating the data access layer (DAL)
- Configuring services and the HTTP pipeline
- Adding remaining services to the dependency injection container
- Migrating controllers and actions
- Testing the services