Latest / DevQuestions with Tim Corey / 232. Why Do .NET Upgrades Happen So Quickly?
Transcript
- 0:00SPEAKER_01: Why do.NET upgrades happen so quickly?NET 9 was just released recently.
- 0:06SPEAKER_01: And every time a new release happens, there are some people who are frustrated with the speed of the.NET upgrade cycle.
- 0:14SPEAKER_01: So let's talk about how fast the cycle happens, why Microsoft chose to upgrade every year on this cycle, and how to approach taking or skipping upgrades to.NET.
- 0:35SPEAKER_00: Welcome to the DevQuestiPast with Tim Corey.
- 0:39SPEAKER_01: Software development is more than just writing code.
- 0:42SPEAKER_01: So let's talk about the rest of it.
- 0:43SPEAKER_01: Specifically, let's talk about the.NET upgrade cycle and how to manage the rapidly changing versions.
- 0:51SPEAKER_01: First, let's start with a quick overview of the upgrade cycle.
- 0:55SPEAKER_01: There's a new version of.NET released every year in November.
- 1:00SPEAKER_01: This year, that means.NET 9.
- 1:02SPEAKER_01: Next year will be.NET 10, and so on.
- 1:06SPEAKER_01: So the odd-numbered versions like.NET 9 are STS versions or short-term support.
- 1:12SPEAKER_01: They can also be called standard term support.
- 1:15SPEAKER_01: That means they'll be supported for 15 months.
- 1:19SPEAKER_01: Now the even numbered versions are LTS versions or long-term support versions.
- 1:25SPEAKER_01: They are supported for three years.
- 1:27SPEAKER_01: So right now, as.NET 9 comes out, we have support for.NET 9 and.NET 8.
- 1:35SPEAKER_01: When.NET 10 comes out, three months after that,.NET 9 will no longer be supported, but.NET 8 still will be, as will.NET 10.
- 1:46SPEAKER_01: So we cover the cycle in more depth in episode 62 of DevQuestions.
- 1:51SPEAKER_01: So it's been a little bit, but that still applies even now.
- 1:55SPEAKER_01: So you can get more details you want to on that whole process and how it works with LTS versus STS and so on.
- 2:02SPEAKER_01: But that's the cycle.
- 2:04SPEAKER_01: Whether you enjoy the speed or not, that's how fast.NET changes are going to happen.
- 2:09SPEAKER_01: So let's talk about why Microsoft chose to do it this way as compared to other ways.
- 2:15SPEAKER_01: So Microsoft has a long history of supporting software development versions.
- 2:20SPEAKER_01: Even if you think about just in.NET, we had the.NET framework that started in 2001, 2002 era, and has continued to be supported even now.
- 2:31SPEAKER_01: And before that there was Visual Basic and you know VB6 and VB5 and VB4 and so on.
- 2:38SPEAKER_01: And Microsoft had to figure out how to support these different versions.
- 2:41SPEAKER_01: And they've had other languages as well.
- 2:43SPEAKER_01: So they've seen a lot of different ways to support things.
- 2:47SPEAKER_01: They've also looked at the industry and said how does everybody else support things?
- 2:52SPEAKER_01: And they've tried to figure out a way to balance the idea of doing big upgrades you know once in a while versus small upgrades more often and which is preferable.
- 3:06SPEAKER_01: What's going to be more beneficial?
- 3:08SPEAKER_01: And with.NET Framework it was kind of a when we get to it kind of upgrade cycle of what it felt like.
- 3:15SPEAKER_01: It could be six months it could be two or three or four years before major upgrades.
- 3:21SPEAKER_01: So that was kind of a chaotic way of doing things.
- 3:24SPEAKER_01: Microsoft said hey we're going to set up a schedule we're going to stick to this schedule we're going to do it every year.
- 3:30SPEAKER_01: Now what benefits are there with this process?
- 3:33SPEAKER_01: Well every upgrade whether it's a long-term support or a standard term support is smaller and it's easier to perform an upgrade between one version to the next than if you have much larger update.
- 3:49SPEAKER_01: So think of this way either way we're going to get the same number of updates whether we go from dot net six to.NET 10 or whether we go from dot net 6 to.NET 7 to.NET 8 to 9 to 10.
- 4:05SPEAKER_01: So which is going to be harder to upgrade well probably six to 10 a lot is going to change in that time and people aren't going to have access to that to test it out and to figure out the the quirks in time to change it for the next version.
- 4:20SPEAKER_01: So the the shorter smaller packages allow for easier upgrades which also means less breaking changes.
- 4:29SPEAKER_01: And Microsoft really has also focused in on hey let's add things not change things.
- 4:36SPEAKER_01: So there's a lot of things in the the new upgrades that are just additions as opposed to hey we've broken this we've broken that we've broken this other thing.
- 4:46SPEAKER_01: So where you see other languages that'll have a new major version it's like well yes but it breaks everything that's not so much the case with.NET which makes it easier to upgrade because their goal is to get companies to upgrade their version.
- 5:02SPEAKER_01: And why is that?
- 5:04SPEAKER_01: Well because with those upgrades come new security fixes, new ways of doing things, more efficiency, but the biggest one is that more security.
- 5:14SPEAKER_01: And so what they don't want is to have companies stay on one version and then go outside of the scope of new security upgrades because as new exploits come out, if they're not patched, well then those companies are vulnerable to new problems.
- 5:29SPEAKER_01: And so encouraging companies to upgrade by making those changes smaller and easier to do means that there'll be less companies that are exposing their applications to potential issues by having unpatched systems.
- 5:45SPEAKER_01: Now software development is a rapidly changing field.
- 5:49SPEAKER_01: So when you have small updates every year you can respond to those rapid changes.
- 5:55SPEAKER_01: So Blazor was a response to those rapid changes.
- 5:59SPEAKER_01: And we got Blazor server first and Blazor WebAssembly a little bit later.
- 6:03SPEAKER_01: And you know the first versions of those were great but they were still like figuring things out and learning things.
- 6:10SPEAKER_01: And then.NET 7 came out.NET 8 came out and by.NET 8 they really polished Blazor and did a lot to it to make it a much more powerful platform on its own.
- 6:19SPEAKER_01: And then.NET 9 comes out and they polish WebAssembly and make Blaze WebAssembly even better.
- 6:24SPEAKER_01: So they get a chance to make these changes over time where if we had to wait four years for that, that may have even changed from when they decided to start working on it until when they actually implement the the desire of people may have changed, the way things are done may have changed and it may have been wasted effort.
- 6:44SPEAKER_01: So with the rapidly changing industry being able to change more quickly means you're more able to respond to these new things and continue to keep people on the let's not say cutting edge but on the the uh the fast track for where the culture is where the systems are where companies want to go now another reason why Microsoft chose this cycle which to be fair is a very short cycle for support is they decided that it's very expensive to maintain security on multiple versions of software.
- 7:22SPEAKER_01: So the more we support the harder it's going to be to pay for this and the less we're going to be able to do they're going to be able to do to put out new features and continue to respond to those new things that the industry wants.
- 7:37SPEAKER_01: So they chose to say hey we're going to have a three year window of support but we're also going to have very easy to move to the next version and have another three years.
- 7:48SPEAKER_01: So they're trying to get you to move to those new versions to keep secure to get those new features to make sure your your applications are up to date and at the same time reduce the expenses of maintaining so many different versions of software now the last reason here people want change.
- 8:11SPEAKER_01: And this is one of those things that makes me laugh every time I hear people say oh this cycle is too fast please stop please stop doing this please slow it down we need to have longer periods of time between versions those are often the same people who are posting in the forums hey can you add this feature hey can you change this hey I want this well you can't both want to have changes and not want to have changes at the same time so either you say right here's good I don't need anything else or you say it's okay I change you can't really have it both ways.
- 8:47SPEAKER_01: So there is a lot of people who are saying I want changes.
- 8:53SPEAKER_01: And to be clear there's a reason why there's the two different types of versions the STS and the LTS because for those companies who want a more sedate pace of not having to upgrade every single year well there's the LTS versions which give you three years to upgrade from one version to the next now they come out every two years so really you're going to lose a year somewhere in there but they give you time to kind of stay where you're at for a quite a significant amount of time in our industry.
- 9:26SPEAKER_01: But there's also people who are saying I want changes more quickly.
- 9:29SPEAKER_01: Well you can do the STS versions.
- 9:32SPEAKER_01: They're still production ready they're still supported by Microsoft.
- 9:37SPEAKER_01: It's just a shorter window.
- 9:39SPEAKER_01: So you can go from.NET 8 to.NET 9, not a problem.
- 9:43SPEAKER_01: And then you can go from.NET 9 and.NET 10, cool.
- 9:45SPEAKER_01: And if you want that much more rapid pace, you can do that.
- 9:49SPEAKER_01: So they're both accommodating for the longer window people somewhat and they're accommodating for the people who want things more quickly.
- 9:57SPEAKER_01: So as a balance here they tried to hit while at the same time trying to push people to continue to upgrade their systems.
- 10:04SPEAKER_01: So now we have an understanding of what is happening and why it's happening, what do you do about it?
- 10:11SPEAKER_01: And in my idea there's probably four ways that I've seen people deal with these rapidly changing versions.
- 10:17SPEAKER_01: So let's talk about these four ways and see where you fit and also let's talk about the pros and cons of each.
- 10:25SPEAKER_01: So way number one is to upgrade to every new version you can.
- 10:30SPEAKER_01: So we just came out Microsoft, I keep saying we, it's not me, but Microsoft just came out with.NET 9.
- 10:37SPEAKER_01: Well you could upgrade to.NET 9 right now.
- 10:40SPEAKER_01: And when you do your application in certain spots will run faster because the new versions of.NET come with a lot of performance improvements.
- 10:50SPEAKER_01: So just your same code can sometimes run faster just by upgrading from eight to nine.
- 10:57SPEAKER_01: And sometimes it's just as easy as that saying eight to nine.
- 11:01SPEAKER_01: So you'll be able to move faster if you go with every new version, your application will run faster.
- 11:08SPEAKER_01: You'll be exposing yourself to any dependency problems more quickly as well, which means that yes, you may come across and say oh no my dependencies aren't upgrading with with me.
- 11:21SPEAKER_01: Which you may say well that's a bad problem.
- 11:23SPEAKER_01: Yes and no because if you implement a dependency and then six months later a new version of.NET comes out and you upgrade to that new version.NET or try to and that dependency says no we can't do that well you've just figured something out because now you figured out that you have to consider is that dependency worth it or should I be thinking about something else instead maybe even not taking a dependency in that area.
- 11:50SPEAKER_01: Because if you decide that this dependency is worth it, they did figure out well what is the upgrade cycle and can we live with that?
- 11:57SPEAKER_01: It allows you to make those choices in a much shorter timeframe.
- 12:01SPEAKER_01: Imagine for a minute that if you decided to wait four years and then found out that dependency wasn't going to upgrade.
- 12:10SPEAKER_01: Well now you've got you've built four years worth of code on top of that dependency.
- 12:14SPEAKER_01: That's a lot harder to change.
- 12:16SPEAKER_01: Whereas six months it's still hard to change but it's easier and you found out faster.
- 12:23SPEAKER_01: So upgrading versions of.NET will actually expose what things you depend on and where they are at with this upgrade cycle.
- 12:32SPEAKER_01: Also by upgrading every year then you're going to make your code faster as well as you're going to have faster upgrades.
- 12:42SPEAKER_01: So when you go from eight to.NET 9, there's very few breaking changes.
- 12:48SPEAKER_01: And so I in my projects I had a project that was the suggestion site.
- 12:54SPEAKER_01: And I believe it was from six to seven that I had to do one minor tweak to one of the dependencies and then from seven to eight there was no changes.
- 13:03SPEAKER_01: So what I did was I went into every project and went into the project file and changed where it said.NET 7 to say.NET 8.
- 13:12SPEAKER_01: That's all I did I saved I recompiled and I republished.
- 13:16SPEAKER_01: I was done.
- 13:18SPEAKER_01: So that process can be very quick.
- 13:21SPEAKER_01: Now people who have massive systems or who have systems that have a lot of dependencies it's not quite that quick.
- 13:28SPEAKER_01: However you have to think about the fact that on the Microsoft side it really is.
- 13:33SPEAKER_01: So it's all of your dependencies you have to think through and then if you have a larger upgrade it's going to be worse not easier right so us, you know, smaller problems today or larger problems tomorrow think about.
- 13:48SPEAKER_01: So upgrading every year can make your upgrade itself faster.
- 13:53SPEAKER_01: Now the second option would be to upgrade to the LTS versions.
- 13:57SPEAKER_01: So you'd be on.NET 8 right now and then next year you would start the process of moving to.NET 10 over the course of let's say a year because you have that extra year of support for.NET 8.
- 14:10SPEAKER_01: So what benefits and drawbacks does this have well you have less changes less version changes.
- 14:17SPEAKER_01: So you're going from 8 to 10 let's say well then you don't have to worry about changes right now.
- 14:24SPEAKER_01: You've got another year of no changes no version changes.
- 14:28SPEAKER_01: You also have a longer stability period where you're not making underlying system changes to how your application is processed.
- 14:36SPEAKER_01: That can be a good thing as well.
- 14:38SPEAKER_01: Now you are going to miss out on the speed benefits.
- 14:42SPEAKER_01: So.NET 9 has again performance improvements with the same exact code.
- 14:46SPEAKER_01: Well you're going to miss out on that and you may get burned by your dependencies because again if you implemented a dependency three months after.NET 8 came out, well you're going to be using it for what 21 months there you go math.
- 15:04SPEAKER_01: 21 months before.NET 10 comes out.
- 15:08SPEAKER_01: Well 21 months is a long time to build on top of that dependency.
- 15:12SPEAKER_01: And that's going to cause bigger problems when it comes upgrading to.NET 10 and it may stop you from upgrading to.NET 10.
- 15:19SPEAKER_01: That's one of the dangers of dependencies is that if they don't stay current, then they stop you from being current which means it can leave your application vulnerable.
- 15:30SPEAKER_01: So you don't know that as quickly if you're not upgrading every year.
- 15:36SPEAKER_01: So there's there's a longer period of time where you can start building on a dependency and kind of getting their hooks in you where you can't move off as easy or if at all and yet you want to in order to upgrade a.NET.
- 15:49SPEAKER_01: So there's pros and cons, a larger stability period and less changes to versioning but you miss out on some speed upgrades and you get can get burned by dependencies that are in there for longer.
- 16:03SPEAKER_01: Now number three if you decide to skip an LTS version so you do every other year.
- 16:10SPEAKER_01: So every four years you'll be upgrading and so you go from let's say.NET 6 to.NET 10, which also means that you'll be out of support for at least a year.
- 16:22SPEAKER_01: And upgrades are going to be a lot harder because there's more breaking changes between six to seven to eight to nine to ten.
- 16:29SPEAKER_01: So there's a lot more breaking changes that accumulate over that time.
- 16:33SPEAKER_01: And your dependencies might not be upgradable.
- 16:36SPEAKER_01: Because here's the thing not only are dependencies going to have to be upgraded throughout the versions, but sometimes when you go from let's say six to eight, your dependency will change the major version because they make some major changes and some breaking changes.
- 16:52SPEAKER_01: So now you have more breaking changes across the upgrade cycle that you're going to have to deal with and they may be significant because you may have had two rounds of breaking changes between.NET 6 and.NET 10.
- 17:06SPEAKER_01: So that's going to make it much, much harder if not impossible to upgrade some of those dependencies.
- 17:11SPEAKER_01: And you're going to miss out on security upgrades, which means that you'll be potentially vulnerable to any new security exploit that isn't being patched because that version of.NET is out of support.
- 17:24SPEAKER_01: I do want to make a pause here to point out the fact that just because Microsoft doesn't support.NET doesn't mean it won't run.
- 17:34SPEAKER_01: Just be clear here you can absolutely run.NET six applications today they'll still work.
- 17:40SPEAKER_01: There are companies that still rely on.NET framework 3.5 applications and they still work.
- 17:48SPEAKER_01: Now they're not supported and they have security vulnerabilities and that's not a great place to be but you can do it.
- 17:57SPEAKER_01: So let's be clear here there's a difference between being supported in doing it and being able to do it.
- 18:03SPEAKER_01: You can do it.
- 18:04SPEAKER_01: It's just not necessarily secure and it's not going to be supported by Microsoft.
- 18:09SPEAKER_01: Now that's number three number four is you pick a version and you don't change.
- 18:15SPEAKER_01: So you're going to be out of support and tooling is going to be harder to maintain because tooling moves with the versions and you won't have any security updates after security runs out.
- 18:27SPEAKER_01: And there's also the problem of people are less likely to want to work on that system because it gets further and further out of date.
- 18:35SPEAKER_01: The the ways that people have learned how to work with C sharp may not be the ways they can work on C sharp with your application.
- 18:42SPEAKER_01: It becomes more and more of a different dialect because certain things don't work that people get used to and it becomes less and less attractive to people who were hoping to build up a resume of work that they can show off and say, hey, this is what I can do.
- 18:58SPEAKER_01: Well if they're working on old systems that's less and less impressive and it's going to make it harder and harder for them to get new jobs.
- 19:06SPEAKER_01: So it makes you vulnerable to not be able to find the best employees or as many employees as you might need because of the fact that it's an older system.
- 19:16SPEAKER_01: Again, you can do this there is security vulnerabilities there is the vulnerability of not being able to hire new employees there's the vulnerability of not being able to get new dependencies or even your dependencies have security issues and there's also the tooling issues as well.
- 19:35SPEAKER_01: This is actually one of the more popular ways to go obviously don't approve of this but companies often do this because they don't want to go through the pain or they wait too long and it's too late.
- 19:49SPEAKER_01: So I would highly encourage you to look at option number one or option number two preferably option number one which is upgrade every single.NET version which yes does cost something and yes you will have to plan for it and yes it will take time but I think that's going to give you a better end result.
- 20:11SPEAKER_01: So let me give you a quick example my wife's car currently needs an oil change.
- 20:16SPEAKER_01: I've been putting off getting it done because it takes time.
- 20:19SPEAKER_01: You're supposed to get your oil changed every 5,000 miles or so.
- 20:24SPEAKER_01: And you can push that to 10,000 miles and you're probably going to be fine because there's you know they try and get you to do it more quickly than you need to and they're trying to make sure that there's no problems and so the risk of having problems is pretty low if you just double that.
- 20:39SPEAKER_01: But it's going to save you some time if you say every 10,000 miles versus every 5000 is going to save some money as well.
- 20:46SPEAKER_01: But the problem is if there's a problem like an oil leak, there's a bigger gap where I won't know about it and it might cause an issue.
- 20:54SPEAKER_01: So let's just say I have, you know, I'm getting her oil changed every 5,000 miles and she has an oil leak at 3,000 miles.
- 21:02SPEAKER_01: Well she might be okay for 2,000 miles.
- 21:05SPEAKER_01: You know it's a small leak.
- 21:06SPEAKER_01: So the oil's getting low but that's okay we go to the get the oil changed and they say hey you know what you got a leak here that's something you need to keep an eye on or get looked at and addressed.
- 21:18SPEAKER_01: Okay.
- 21:18SPEAKER_01: So we have a small window of time where there might have been a problem and if there is a problem it's more likely to get caught rather than cause a bigger problem.
- 21:27SPEAKER_01: But what if we waited till 10,000 miles?
- 21:30SPEAKER_01: Well if it happened at 3,000 miles more than likely we've got a a an you know a bone dry car with no oil in it before we get to 10,000 miles.
- 21:41SPEAKER_01: So now I'm taking a bigger risk by going every 10,000 miles.
- 21:46SPEAKER_01: And but there isn't a clear line though.
- 21:49SPEAKER_01: So there's not a clear line of what that issue might be or when it might occur.
- 21:54SPEAKER_01: Because I might you know have a simple light come on the dash and she goes hey Tim there's a there's a light on my dash that says oil.
- 22:00SPEAKER_01: Okay I should do I should address that and look.
- 22:02SPEAKER_01: And sure enough you know we're low on oil.
- 22:05SPEAKER_01: Or it might be that the engine seizes up and it destroys the car.
- 22:11SPEAKER_01: So taking an hour and paying$100 once every few months to take the time and effort to get an oil change is going to save me major issues and reduce the risk of having problems in the future.
- 22:27SPEAKER_01: It's going to cost something I have to go and get it done every couple of months, every few months, but it's going to save me basically like insurance does, where it's going to protect me against the issue.
- 22:38SPEAKER_01: It's preventative in the fact that it's actually stopping some issues and it gets people to look at the car and say hey I've noticed this issue which allows me to address the issue.
- 22:49SPEAKER_01: So the same is true for upgrading your application.
- 22:53SPEAKER_01: You can put offgrades for a while but three years is about as long as you can safely put them off.
- 22:59SPEAKER_01: After that you're exposing yourself to additional security risks.
- 23:02SPEAKER_01: Now it might not cause any real issues for you or it might destroy your entire database and your entire company.
- 23:11SPEAKER_01: So what's the risk level you're worrying you're willing to take on and is it worth the little bit of time and effort it would take to upgrade these applications versus taking on that additional risk.
- 23:25SPEAKER_01: And it can be a very serious additional risk.
- 23:29SPEAKER_01: I would encourage you to weigh the risk of not upgrading to net when planning on the future of your application.
- 23:35SPEAKER_01: Preventive maintenance is really important to the health of your application and your organization.
- 23:41SPEAKER_01: Always think through the cost of not doing something.
- 23:45SPEAKER_01: So that's the answer to the question thanks for the question and as always I am Tim Corey.
- 23:51SPEAKER_00: Thank you for joining us for this episode of Dev Questions.
- 23:54SPEAKER_00: When you're ready to learn to think and code like a professional developer head over to imtimcore.com and enroll in a course