Latest / DevQuestions with Tim Corey / 049 Do I Start a .NET 5 Project or Wait for the LTS?
Transcript
- 0:00SPEAKER_00: Welcome to the Dev Questions Podcast with Tim Corey.
- 0:03SPEAKER_00: Join us each episode as we tackle the questions you are asking about a career in software development, understanding the industry, and new technology.
- 0:12SPEAKER_00: If you're just starting out or you want to grow stronger as a developer, this is the place to get your questions answered.
- 0:19SPEAKER_00: Now, here's your host, expert developer and online educator, Tim Corey.
- 0:25SPEAKER_01: Do I start my project now in.NET 5?
- 0:29SPEAKER_01: Or do I move back to.NET Core 3.1 since that's the long-term support version?
- 0:37SPEAKER_01: Or do I wait to start until.NET 6 so I can start on the newest LTS version?
- 0:43SPEAKER_01: This is the question that most recently was asked to me by Ivan, but it's a question that comes up quite frequently.
- 0:49SPEAKER_01: So let's talk about the version, the current version of.NET versus the long-term support version.
- 0:58SPEAKER_01: Now let's start by defining.NET because as the naming has been changing, that can get a little confusing.
- 1:06SPEAKER_01: We have left.NET framework behind.
- 1:10SPEAKER_01: We left.NET Core 2 range.
- 1:15SPEAKER_01: So now we have moved beyond.NET Framework.
- 1:19SPEAKER_01: That last version was 4.8.
- 1:21SPEAKER_01: We're not upgrading that version.
- 1:23SPEAKER_01: It's still supported and it will be supported through the end of Windows, probably.
- 1:29SPEAKER_01: But there is no new versions of.NET Framework.NET Core, on the other hand, is the way forward.
- 1:37SPEAKER_01: This is the basically total rewrite of.NET and how it's processed.
- 1:43SPEAKER_01: So we had.NET Core 2.1, 3.3.1, and then we kind of skipped over four so that there wouldn't be confusion.
- 1:54SPEAKER_01: Because having a.NET Core for versus a.NET Framework for would be somewhat confusing.
- 2:01SPEAKER_01: So instead they skipped right to five.
- 2:05SPEAKER_01: And with that skip, they dropped off the core in the name.
- 2:10SPEAKER_01: So now we have.NET 5, which is really.NET Core 5.
- 2:16SPEAKER_01: So that's where we are today coming up in November of 2021 is.NET 6.
- 2:23SPEAKER_01: And then every November after that should be the next major version.
- 2:28SPEAKER_01: So dot net 7 comes out in 2022, dot net 8 in 2023, which.NET 8 will be a long-term support.
- 2:36SPEAKER_01: All the even numbers now will be long-term support versions.
- 2:41SPEAKER_01: All the odd numbers will not be so this brings up the question okay so why do we even have the intermediate versions?
- 2:50SPEAKER_01: It kind of like a beta version or how does that work?
- 2:53SPEAKER_01: Well the.NET 5 is called the current version.
- 2:57SPEAKER_01: This is the version that's the most recent version put out.
- 3:00SPEAKER_01: It is not an LTS version and never will be an LTS version is supported for three years.
- 3:08SPEAKER_01: The current versions the ones that do not become LTS will be supported for 15 months.
- 3:17SPEAKER_01: However the.NET 5 version is still going to be fully supported it still has the same level of code quality has the same level of care of being careful what they launch and how they launch to make sure it works and to make sure that it's going to provide a rock solid production ready build.
- 3:42SPEAKER_01: So dotnet 5 is definitely production ready.
- 3:46SPEAKER_01: It is definitely something you can put your newest project into and in fact I would even encourage it.
- 3:53SPEAKER_01: So why do we have the long-term support versions?
- 3:56SPEAKER_01: Well long-term support allows a company that doesn't want to change their software.
- 4:02SPEAKER_01: Maybe um it's just too big and they have too much going on to always be upgrading.NET every year.
- 4:10SPEAKER_01: So they want to wait three years to upgrade their dotnet.
- 4:14SPEAKER_01: Well in that case then what they can do is they can get on a long-term support version.
- 4:20SPEAKER_01: The version of.NET will still update but only for security fixes.
- 4:26SPEAKER_01: So um this will allow you to stay on for example in this case.NET Core 3.1 that's the current LTS version and allow you to stay there for a total of three years with full support from Microsoft.
- 4:42SPEAKER_01: Now that doesn't mean that three years and one day it stops working.
- 4:47SPEAKER_01: That's not how it works.
- 4:48SPEAKER_01: It never has it will still work for years in the future probably but it will not be supported by Microsoft anymore.
- 4:57SPEAKER_01: At that point they will have moved well beyond that in their support.
- 5:01SPEAKER_01: And supporting old applications is difficult because you have to maintain teams that work on that old code and make sure it's still relevant for today's changing ecosystem.
- 5:13SPEAKER_01: Your code doesn't just stay at a version you're constantly making changes to it.
- 5:19SPEAKER_01: If you are building any kind of production application it's in continual change mode whether it's bug fixes and tracking down issues or whether it is adding new features or modifying how existing features work.
- 5:34SPEAKER_01: This is what happens well it's very difficult for you to say okay we're going to pause everything about our software right now at this point and we'll support this for three years while innovating on a new version of our software and trying to make sure people stay on both and are both happy that's so difficult to do.
- 5:55SPEAKER_01: So this is why this iteration of every three years which seems fast but it's really not we're going to have a new LTS version.
- 6:04SPEAKER_01: In fact every two years we'll have a new LTS version but it'll be supported for three years.
- 6:09SPEAKER_01: Basically it's giving you a year buffer to move from the last LTS to the next LTS so that's only if you decide you need all three years I would encourage you to just upgrade from version to version.
- 6:27SPEAKER_01: The upgrade process is not like it was from.NET framework to.NET core that was a major change that was a massive change a breaking change because the fact that really while our code looks the same it usually acts the same and most of the changes don't happen in our code what compiles our code what powers our code was ripped out and replaced with basically a brand new version from.NET framework to.NET Core is almost an entire swap over to a brand new underpinning.
- 7:06SPEAKER_01: So that's massive and that took some upgrading now it's still not overwhelming in most cases.
- 7:13SPEAKER_01: Yes there were some things that were lost for example WCF is not in.NET Core at least not yet there is an open source version they're working on.
- 7:24SPEAKER_01: But not Microsoft but the community with Microsoft support.
- 7:29SPEAKER_01: So that changed and there's other things like that um web forms they're not coming over to.NET Core just not going to happen.
- 7:38SPEAKER_01: So yes we lost some things in the transition as well but the actual upgrade process isn't that bad.
- 7:46SPEAKER_01: I took in my course on upgrading to.NET Core, I took the tournament tracker application which is a class library, a Winform app, a WPF app, and an ASPNet MVC app.
- 8:02SPEAKER_01: I upgraded all of those to equivalents and that wasn't that difficult for the most part.
- 8:10SPEAKER_01: Yes there were some tweaks we had to do yes we had to make some changes and most is third party libraries we had to make sure supported.NET Core.
- 8:18SPEAKER_01: But after that it wasn't a horrible upgrade process.
- 8:22SPEAKER_01: It was actually pretty painless for what we did.
- 8:26SPEAKER_01: Now that was from work to.NET Core.
- 8:30SPEAKER_01: But moving between versions of.NET Core is really easy.
- 8:35SPEAKER_01: In fact I upgraded the uh the Timco retail manager series.
- 8:40SPEAKER_01: That series we started with.NET framework intentionally to go a.NET Core and do that upgrade process together.
- 8:46SPEAKER_01: But then we had.NET Core 3.1 and.NET 5 came out and I said well let's just go to.NET 5.
- 8:53SPEAKER_01: That makes total sense.
- 8:54SPEAKER_01: So we did and that upgrade process was really simple.
- 8:59SPEAKER_01: It was mostly about changing our CS Proj file from saying netcore 3.1 to I think net5 is the the new terminology for it.
- 9:09SPEAKER_01: So I anticipate and from what I've seen so far the preview releases I expect to see that the upgrade process from.NET 5 to.NET 6 will be mostly about changing that CS Proj version number.
- 9:24SPEAKER_01: Yes there's new stuff.
- 9:25SPEAKER_01: Yes there will be improvements but for the most part there shouldn't be many breaking changes.
- 9:32SPEAKER_01: So that upgrade process should be fairly painless to go from five to six.
- 9:38SPEAKER_01: So with that in mind I would encourage you to continue to do this because here's why the upgrade process from.NET Core 3.1 to saw massive speed improvements.
- 9:53SPEAKER_01: So the same code that you wrote in.NET Core 3.1 will run faster in.NET 5.
- 10:02SPEAKER_01: From what I'm seeing going forward in a.NET 6 again.
- 10:08SPEAKER_01: So just changing that little bit will change your application speed for the better.
- 10:16SPEAKER_01: That is critical that's important business runs on being more performant.
- 10:22SPEAKER_01: If you have people waiting on your application that's lost time and money.
- 10:26SPEAKER_01: If you have people waiting on your web application that's lost visitors.
- 10:30SPEAKER_01: I think Google says that a one second delay in your website loading can mean 11% of the people leave.
- 10:38SPEAKER_01: Well you can actually save people from leaving you can have more people visit your site and stay at your site if you have a faster web application by just upgrading a.NET six that'll provide that.
- 10:51SPEAKER_01: So no it's not the silver bullet you're not going to everything get great performance and great visitor up count or upticks but you will at least have a better performing app that will allow your your site to load faster and hopefully encourage visitors to stay.
- 11:10SPEAKER_01: So those upgrades are important for no other reason than to get those speed boosts.
- 11:17SPEAKER_01: Now there's a lot of other reasons as well but I would encourage you unless your company is really massive and you have a massive application that's just going to be too expensive to upgrade every three years I would encourage you just put in the plans to upgrade every year.
- 11:35SPEAKER_01: A little upgrade once a year that you can do the goal I think is to have one person be able to do an upgrade for their entire application in an afternoon.
- 11:45SPEAKER_01: So if that's what it takes once a year to get a speed boost on your application to get the new features and to have better security why wouldn't you so I would say Ivan start with.NET 5.
- 12:00SPEAKER_01: It's stable it's production ready and it's going to give you the best opportunity to have the best performance in your application with the best features.
- 12:09SPEAKER_01: When.NET 6 comes out in November of 2021 or 2020 2021 sorry this is 2021.
- 12:16SPEAKER_01: When um 6 comes out and it's the LTS version don't get overawed by it but definitely upgrade to it because that is still going to be a better version than.NET 5.
- 12:28SPEAKER_01: And then when.NET 7 comes out upgrade to that.
- 12:32SPEAKER_01: So continue to have that upgrade process once a year.
- 12:36SPEAKER_01: Those small changes won't be that big a deal from step to step to step but if you add those together year after year you're just compounding your work and making it more difficult to move while at the same time not getting the speed benefits and not necessarily getting those extra features that would make your application better as well.
- 12:57SPEAKER_01: So overall they're all supported all versions are supported at least until they're no longer in support but.NET 5 is just as supported as.NET Core 3.1 is today.
- 13:13SPEAKER_01: It'll not be supported for as long but it's still the same production ready code.
- 13:20SPEAKER_01: I hope that answers your question Ivan thanks for listening if you want to check this episode out you can not only do so on YouTube but also on Spotify on iTunes or anywhere else that you find your podcast episodes.
- 13:37SPEAKER_01: Thanks for listening and as always I am Tim Corey.
- 13:40SPEAKER_00: Thank you for joining us for this episode of DevQuestions.
- 13:43SPEAKER_00: Tim is committed to making it easier for you to become a developer.
- 13:47SPEAKER_00: If you would like to help make more content like this possible please like subscribe rate and share dev questions.
- 13:54SPEAKER_00: You can also send your questions to questions at IamTimcore.com.
- 13:59SPEAKER_00: Until next time, remember you are too smart and your time too valuable to waste it making all the mistakes Tim did.
- 14:06SPEAKER_00: When you're ready to learn to think and code like a professional developer, head over to Iamtimcorey.com and enroll in a course