The Modern .NET Show

Episode 78 - Greenfield and Brownfield in .NET with Harry Bellamy (part one)

Embedded Player

Episode 78 - Greenfield and Brownfield in .NET with Harry Bellamy (part one)
The .NET Core Podcast

Episode 78 - Greenfield and Brownfield in .NET with Harry Bellamy (part one)

Supporting The Show

If this episode was interesting or useful to you, please consider supporting the show with one of the above options.

Episode Transcription

Hello everyone and welcome to THE .NET Core Podcast. A podcast where we reach into the core of the .NET technology stack and, with the help of the .NET community, present you with the information that you need in order to grok the many moving parts of one of the biggest cross-platform, multi-application frameworks on the planet.

I am your host, Jamie “GaProgMan” Taylor, and in this episode I talked to Harry Bellamy about the differences between supporting both Greenfield and Brownfield applications in both .NET Core/Five and .NET Framework. Along the way we also talk about some of the technologies which didn’t make the transition over to Core/Five such as WebForms and WCF.

This is actually part one of our discussion, and a second part with more of a discussion on the enterprise and how fast .NET is moving is coming very soon. So keep an eye out for that episode.

So let’s sit back, open up a terminal, type in dotnet new podcast and let the show begin.

The following is a machine transcription, as such there may be subtle errors. If you would like to help to fix this transcription, please see this GitHub repository

Jamie

First thing I’d like to say Harry is thank you ever so much for being on the show. We were in a strange set of circumstances for the world and it’s not so easy to find a lot of time for a lot of things. And you’re looking at me going, “I’ve got all the time in the world, mate. What you’re talking about?”

Harry

Well, I’m not sure to go that far. But no, no, thanks. Thanks a lot for having me, Jamie. We’ve been we’ve been discussing doing this for a while, haven’t we?

Jamie

Yeah, yeah. So what I thought would be a good idea. If it’s okay with you Harry, is a quick introduction to our listeners know who you are. What you’re talking about that kind of thing. Let’s let’s do that. Let’s do that.

Harry

Yes, yeah. Hello, my name is Harry Bellamy. I’ve been a software developer for almost longer than I’d care to remember. 13/13.5 years now. I’ve been working. I’ve worked in a variety of industries, including automotive, healthcare, sports, I’ve worked in consultancies, where I’ve had some experiences you might imagine. Most of the career of my career, I’ve been using C#, and .NET. So I started in .NET Framework Two, and I followed it all the way through to where we are right now. Or maybe slightly behind where we are right now. I’m not quite upon the new hotness, that is Five, but I’ve seen a few bits around it. Yes, and yeah, I’m, you know, I’m always talking about clean code and Brownfield code and how to make automate your code and coding experience better.

Jamie

Excellent, excellent. Um, you know, we, we have actually discussed a little bit about Legacy/Brownfield code a little bit on Tabs & Spaces, which is another show that I am part of, and you were on as a featured guest. But let’s, let’s quickly if you don’t mind quickly go over what “Legacy”, “Brownfield”, and “Greenfield” and new and all these words that, you know, because I like just today I talked to a Canadian friend, and they were like, “whats Brownfield?” So for the purposes of setting expectations, let’s talk about what Brownfield is, what Legacy means to you. And then hopefully, we can figure out what Greenfield is, right?

Harry

I’m gonna be slightly awkward here, actually. Sorry, Jamie, I think I might start the other way around. I might start with what Greenfield is.

Jamie

Totally.

Harry

Greenfield is like, “this is you’ve got a blank canvas, a green field, if you will, there’s nothing there and you’re building something from scratch,” no existing code, and the world is your oyster, you can start and write it in whatever technology you want. Obviously, it’s going to be C# and .NET because you’re listening to this podcast. So that’s where you can start and there’s you’ve got a blank canvas.

So, Brownfield, I presume that the word Brownfield comes sort of from Greenfield effectively so somebody is corrupted the phrase or the word that way, Brownfield is where you’ve got something which is existing, and you have to modify that, and you or you carry on maintaining that to, to either to implement functionality for a customer or your or your your business, you’re the company you work for. Or you’re in maintenance mode, and you’re you know, you’re trying to make it better, or you’re trying to make sure you get rid of bugs, etc, etc.

So now legacy. Legacy is where I think there’s, there’s maybe a bit more ambiguity here, because how does legacy code differ from Brownfield code? So the the definition I’ve heard, which I quite like, although it could be slightly controversial is that I think this is from Roy Osherove, wrote who wrote a dotnet book about about unit testing, “The Art of Unit Testing.” That’s it. And his definition is, “any code which doesn’t have unit tests is legacy code.” So if even if you’ve just written it, it’s legacy code, which is maybe a slightly controversial and slightly sort of almost slightly worrying thought. But I think I can see why that he’s described it as I can see why you would think of it that way. Because if you don’t have legacy, if you don’t have sorry if you don’t have unit tests, you almost got no documentation, you’ve got no starting point to work from.

Jamie

Yep, that makes perfect sense to me. It’s very, you know, we, we talk about how he, you know, he, they the person who writes, if if I wrote some code today, and then in six months, I’m I look at that code. I’m not that same person. I don’t have the same context. I don’t have the same thought process behind it. So that could be legacy code, right? Because I’m not that same person anymore. I’ve had six months of experience of doing other things, and life getting in the way. But if I wrote the code now, like you say, and I’ve not documented it via either code as documentation, or documentation as code or whatever you want to call it, or via any kind of tests, unit tests, integration tests, whatever, then yeah, it may as well have been, it may as well have been written by someone else. Because I am not the same person that I was 30 seconds ago when I save. I mean, if I’m using Visual Studio is four seconds ago, cuz I’m constantly in save. But But you know, I’m not that same person anymore. Yeah. So I totally get that I get why that is the definition.

Harry

Yeah, I think it’s a good rule to abide by. And I think thinking things in that way makes it makes you maybe a little bit more critical about how you, you handle your own sort of coding life or, you know, coding cleansiness, for want of a better phrase.

Jamie

And, yeah, that totally makes sense. But we’re not here to talk specifically about the differences between legacy and Brownfield and Greenfield and orange field or bubble field. I’m not, I’m not it, I don’t go there go go the field is, let’s just build some lovely software. So we are going to talk about brownfield site legacy slash supporting all of that stuff, which is something that you are an expert in after, say, an X, I wouldn’t I wouldn’t

Harry

use the word expert, but I’ve got, you know, I’ve got quite a lot of experience and quite a few scars at it.

Jamie

That’s the first three letters of expert, you’re like 1/3 of the way, halfway there. Yeah, exactly.

Harry

As most of us probably want to go.

Jamie

Okay, so for the folks who are new to dotnet, maybe they’ve only just started with dotnet, five or dotnet. Core or whatever. They may not know of the unique challenges of working with legacy code written in framework because for them the framework and core and five, because it’s all dotnet, right? It’s all super simple. You just go go into Visual Studio, go File, New Project, and it’s all there, right? I have to worry about installing loads of stuff. So really, could you talk real quick about the any of the unique challenges that you found in supporting all of those dotnet framework apps before we talk about the the new hotness, of course slash five slash 678990 the

Harry

the so if you’re not interested in a back in my day kind of episode, I, I advise you probably to turn off now. But you know, this is gonna this this may end up being just me and Jamie sharing war stories. Let’s hope it stays valuable for everybody.

Jamie

But

Harry

yeah, so I mean, going back to the dotnet, sort of two days, let’s go right back to the beginning of when I got involved with dotnet. And so this would have been, this would be sort of 2010. And, yes, okay, stuff like ci CD did exist. But it didn’t exist in every single place. And so there was a lot of, you know, building on your own machine. And unbelievably stuff like the web, or the internet, as you may know, of No, may refer to as that it was not necessarily the first way that you would think of deploying applications, which is seems shocking. So a lot of the a lot of the applications I worked on, were were Windows Forms and desktop. Which, I mean, amazingly, we still use it now. You know, it’s, some of us do, it’s amazingly quick for prototyping, I’d still don’t think there’s anything which beats it, especially now that the dotnet core version works in the latest version of Visual Studio. But anyway, I digress. So we had these, you know, you have these, these, these desktop apps, which would might take in third party dependencies. And the first problem you think, you know, well, what’s the problem with third party dependencies? Well, new get didn’t really exist in it. Well, it didn’t exist until Visual Studio 2010 or 2012. So when the dotnet to dotnet 3.5 days, or certainly dotnet. Two, you’d have to drag in external dependencies by copying a DLL from a from, you know, a third party vendors site, or stick it in like that. And it will become pretty clunky. And, and you also get to take in any of some of Microsoft’s third party or sorry, Microsoft’s dependencies, you might have to put them in something called a Windows Installer. And you’d have to instal those things on your machine and then you’d get lovely. It works on my machine issues, because you Now Jeff has not got the Visual Studio 2008 redistributable installed on his machine. Again, if you don’t know what these things are, you probably going to have to do some serious googling here. And possibly go back on the way back wayback machine or something like that. But the Yeah, they were challenging times and things weren’t a streamlined. And, you know, we didn’t have something like as your DevOps to be able to run these pipelines with. And we didn’t have the, the, the tooling of, of the dotnet, the dotnet command line, you know, if you could script ms build, which is what Visual Studio does in the background anyway. But you’d have to be you had scripting, Ms. Build was not as nicer experience as scripting for dotnet. So you’d find Yeah, so you’d end up building it on your own machine trying to figure out how to alter the XML of a Windows Installer. Or maybe a Wix installer if you were so inclined. Your XML guys not Jason was Jason.

Who was Jason Sokka. I can’t believe I said that. I’m sorry. I’m really sorry. Oh,

Jamie

can we take that? One? And you’ve made that joke?

Harry

I know, I know. I’m showing My, my.

Jamie

To be fair, whenever I have to send a message to my friend Jason. I say that my friend Jason, I actually typed out JSON, because I’m just like, no, it’s not happens every single time just because I’m always typing. Like, when when if if my job in title typing Apple every single day, I’m sure that I would end up typing apple in all of my like, everything. I do text messages, WhatsApp, whatever, right? Because that’s what he would just be muscle memory. Because muscle memory for typing j s o n, with shift on is, it sounds exactly the same when you say it out loud. So I totally get where he made that joke. Yeah, it doesn’t excuse it. That was it? No. I was just trying to give you time to think of an excuse.

Harry

I can’t justify it. I appreciate it, but I can’t. So um, yeah, I cannot. I’m trying not to make it all the you know, so it was it was so hard in our day. But there is some there is some man if you’ve ever upgraded a framework project to call. Yes, yes, it’s very similar. But there are some sort of, sort of important differences where and bullet one, the main ones I can find is that I found sort on the move to court from from framework is that there’s no, there’s no first party, there’s no Microsoft supplied. Di container. Sorry, IOC container. So particularly with older, older framework code is it’s not designed around. It’s not designed around. dependency injection. You know, mean, if you’re lucky, somebody might have done that. But because often I find because if the base framework doesn’t support it, people tend not to do it, you know, especially when it was done. You know, quite a few years ago, because I don’t know how old the the new the oldest IOC container is in for framework. I mean, we’re using probably an hibernate I would think is the notion and Hibernate and our m sorry, something like an NGO ninject or autofac, I would have thought.

Jamie

Yeah, I’m not sure it myself. Ba you’re absolutely right. And then you move from one project that uses ninject to autofac. Or the other way around. And because they are written by completely different teams, but they are they’re they’re, they’re solving the same problem, but in different ways.

Harry

Yes, I think now we’ve standardised on one Jason live Actually, no, let’s not go down that route. But yeah, there’s, you know, there’s something to be said for, for the, you know, the industry standardising on a particular library, isn’t there? Yes. Granted, there are some downsides to it as well, but especially if that library goes away. But Microsoft seems to stop these things happening. Don’t do

Jamie

that. I do have to say, though, remember? Just because you didn’t you talked about it. Just the security implications of less download a random DLL thrown into my app.

Harry

Let me play devil’s advocate that over how does that differ from nougat or MPL?

Jamie

Yes, okay. Yeah, you’re absolutely right. There’s an implicit trust that has been altered after it’s gotten to the new Git server. And presumably because it’s open source, you can click a button and see the source. We technically a new get package is just a zip file. So you could just inspect it and open it up. And that’s what you’re supposed to do. You know, if listeners want to check that out, go back to Episode 69 with Neil’s tennis. And that’s one of the ways that you can inspect the code that is running on your machine and your build server is what it says it is, because we’ve had, I’m sure it’ll happen with new gear at some point, but we’ve had it with node packages, where it’s a Bitcoin miner running on your build server. Right. And that’s a just just because, you know, for better or worse, people go NPM instal return, okay, don’t I’ve solved the problem, you know, they don’t bother checking the the actual code that’s running. But then that’s a non trivial problem to solve, because

Harry

you could argue to pass down a

Jamie

million other packages, right?

Harry

I mean, there is some stuff built into NPM. Isn’t there for sort of auditing purposes, but that seems, I guess that’s a bit more, a bit more like after the horse has bolted, isn’t it? Yes, it’s useful. So more useful than after the horse has bolted. But you see my point that it

Jamie

stops the rest of the horses button?

Harry

Yes, yes. Yes. One of those could be. It could be multiple horses. Yeah.

Jamie

Yes. Let’s say you have all the horses. Yes. But one of them bolts. Yes, yeah. Okay. Yeah. And yeah, you’re right up. standardising around one pattern. There we go. design patterns, right standardising around one pattern, though, that a specific library users can be really helpful. Because then, you know, you don’t have to remember the millions of different syntaxes syntaxes syntax I I don’t know, syntaxes. multiple different ways of doing this. So yeah, there’s, I mean, even like, I’ve got it written down here. For folks who don’t know, we have a document that we plan everything out on DLL hell, do you remember that with the different version numbers, DLL bindings on? That was? Yeah, so for those who don’t know, if you’re new to dotnet, or you just don’t know about it, you could redirect a version of a framework, let’s say you have another framework, let’s say you have a DLL, that was version 3.1 point 0.0. Right. And then you download the update, and it’s actually 3.2 point zero, you could tell without having to change your code, you can tell the system, I’m going to ship with the wrong version of the DLL, but just pretend that it’s right. Don’t worry about it. Like, here’s version 3.1. But I’ve said get through version 3.2. But just pretend that 3.1 is three point and it just you get into this horrible level of I think it was called dependency redirects. Was it something somebody redirect? I think that’s an assembly redirect. And that was horrendous, because then you get to a position where, like I said, somebody updated something down the line, but you’re depending on it, which depends on something else, which depends on something else, and not other versions match anymore? And the problem with that is your app doesn’t booked.

Harry

It goes, ah, I can’t find this.

Unknown Speaker
Yeah,

Harry

yeah. I think that there was a bit of controversy, I think wasn’t there when dotnet core was announced, or when it was released, that it didn’t support assembly redirects.

Jamie

And I think that was pretty sure that it was mo land. With that said, I don’t want that headache, and you don’t want that headache. So no, it doesn’t support it, because I said, that was me paraphrasing, Wade said but

Harry

having said that, I know we said we weren’t gonna move on to code just yet, having said that, new get packages do support they have done they have patterns to say that I support this version and anything above, or they support version ranges. So I might support. It might a package might support, you know, a dependency between versions three and you know, 3.9, or three and four.

Jamie

Yeah, similar to how NPM by default will give you if you say instal left pad version seven. What usually happens is in the package dot JSON, I believe it’ll add a hat before the version seven number. And that essentially means version seven or higher. And you could do something very similar with dotnet. Now the tooling will actually tell you if you are building that library yourself, Hey, no, give me a specific version. I’m allowing you to supply this special character or these special characters, which means between these version numbers or this version of Araya, but pin it please, and anyone who’s ever done dotnet core stuff and chosen to reference I think microsoft.is one of the meta packages, if If you if you reference one of the meta packages, we’ll talk about that in a minute, which is a package of packages. If you’ve referenced that don’t give a version number, you get a build warning, not a build error saying, hey, pin me to a specific version number, please. And then you pin it. And then it says, No, you shouldn’t bend me to that version number. So it doesn’t match the tooling that you’re using. And then you get into this annoying loop of Oh, I haven’t got the right tooling installed. It’s I think it’s

Harry

ASP dotnet core all. That’s so certainly certain versions, it complains, if you pin in some versions, it complains if you don’t pin. Yep, this is the other way around. Nothing later versions complain if you do pin. grateful.

Jamie

Yeah, because just to go into that, I believe it’s because the dotnet SDK now ships with a pre jetted version of the ASP. NET dotnet, ASP, dotnet core all package. So then if you pin it, if you’re building against dotnet, five, and you pin it to version 3.1 of the package is going to be like, Hey, there is a missing mismatch here. Because I’m using the wrong version.

Harry

Yeah, I think after wasn’t after three, or from three onwards, you could specify the target SDK, and that would, that would determine which version you’re using, rather than sending it using nougat, or taking from the SDK instead, or

Jamie

something along the lines. It’s all this complicated nougat nonsense.

Harry

So we said we were talking.

Jamie

Yeah, right. But okay, so we talked about on a framework, that is a thing that came around in 2002, and has been around for a long time, and it will still continue to be around. It was originally I’m just gonna take the the handle here, give you a better rest here, Harry. Just real quick while I go over some stuff about framework dotnet framework was originally designed as a internet only Microsoft Windows only thing to help you build applications. And it became really big and it is wonderful. I’ll be it very slow. And based on like, like you said, Harry didn’t have in IOC containers built in, it doesn’t have. There’s a lot of stuff that he doesn’t do. By default, ASP. dotnet core was something else or ASP. NET was something added after the fact. And it was, for want of a better free shoehorned in, I don’t want that to sound like it was kind of all let’s just kind of do half a job. It was really well done. But it was added after. Now. And there are things that, you know, there are decisions there that lots of lots of backwards compatibility. But then core came along. And the first thing you need to know about framework and core is a core is a open source, cross platform version of framework. And that means you can run your dotnet apps any way you want. Quite literally, I think I’ve seen a dotnet app running on a French because why not? Right. And and the other thing to know is that yes, core is getting the new updates and new features, but framework is not going away. And the reason for that is because windows itself requires dotnet framework. So as long as Windows is the thing, dotnet framework will always be I think you will always get the security updates, but it won’t get performance updates right there. And the main reason for that is because now we have millions of apps running framework, I say we I’m not affiliated with Microsoft, this is all based on stuff I’ve read that Microsoft put out there, there are millions and billions of apps running on framework. And framework is tied to Windows. So when a new version of framework comes out, it has to go out with Windows Update, which means that all of the scenarios for every single line of code that could possibly be run in a dotnet framework app have to be tested before I can get released with Windows. And even then it can only go out with the major windows revisions. So then you only get the updates, if it’s ready on a specific, like, every couple of months or something. So it just it gets to a point where it’s is it’s quite difficult to manage. And so that’s where framework and core and five, that’s where we have these all these different things.

Unknown Speaker
Yeah.

Harry

I think just as to you know, related to that the sort of the original, I believe the original sort of statement around dotnet was, I think 23 languages, something like that. There’s, if you look, originally, there was a huge, huge number of languages that support dotnet. And so that the original, the original sort of mission statement was 23 languages, one platform, and now we have one, maybe two languages of C sharp and F sharp, VB dotnet. Well, I don’t want to say anything about that because I don’t offend anybody. And I don’t want to. It’s not my area of expertise. So I don’t want to say anything incorrect for fear of angering Microsoft. But yeah, so now now we have, you know, any platform you can think of pretty much but only You know, only these two languages, and I think we can all agree what’s probably more useful.

Jamie

Just like with cooking, right, if you’ve got a million different ingredients, and you’re going to produce something that everyone loves, and it’s wonderful, why not boil that down to a handful of ingredients with a handful of steps, and still produce the same thing, right? Because it’s simpler to do, you might be technically more capable, if you can do the million ingredient recipe. But if you can do exactly the same thing with four or five or a handful, then you’re going to be faster, right? And, or you’re going to be more productive, or you’re going to produce more or the quality of your code or, or the quality of the stuff that you produce is probably going to be better, because it’s less complex. So I boil it down, let’s just remove all the stuff that isn’t really required. What is really angered is down to two slash three. I mean, I think windows 10 still ships with the VB dotnet compiler sold, maybe. But

Harry

yeah, I mean, can you imagine if we still if it still supported 23 languages? Now, can you imagine how can you imagine how the how bad StackOverflow would be trying to find anything out about dotnet. And I’m using I’m using the c++ version of dotnet.

Jamie

So I’m writing some, some go in dotnet on a Linux server that’s talking to my fridge, and the microservices connecting them, uses g RPC and eventually ends up on the blockchain. What do

Harry

should you use Python?

Jamie

That’s absolutely the question. So the answer is always should have used Python. So recovered a little bit about what core is now, before we talk about 567? And why there’s no dotnet.

Four?

What’s your experience been with supporting legacy slash Brownfield apps? In framework vs. Core or other in core vs framework is what I meant to say.

Harry

Yeah, I mean, it’s supporting, supporting Yeah, sort of Brownfield legacy projects in in cause been, it’s been so much easier. You know, I started talking about the COI, and the Seelye. You know, it’s amazing how we go full circle on these things that, you know, we didn’t have a lot of choice other than to use ci applications back in the back in the 70s and 80s. And then, you know, the 90s, you know, you know, 3d accelerators, 2d accelerators, you know, sorry, graphics cards, for those of us that don’t remember computing in the 90s. Yeah, so and then everything becomes gooeys, doesn’t it? And now we’ve gone full circle, and we’re back to C Alize. Being the, you know, the new hotness, you know, it’s not a JavaScript framework, unless it’s got a CLR he can’t take it seriously, if it’s not your CLR. But, you know, joking aside, it’s, it’s, you know, it makes, it makes me able to maintain the software so much easier, because, you know, it’s the first step to being able to do ci CD is I can I can script my builds. Now I, I have a transferable script or, you know, you know, print transferable script that I can run anywhere. And I should get the same thing out at the end. And that also means that I can run that in a Docker container as well. If I if I’m so inclined. I mean, can you can you imagine, let’s have a thought experiment. Can you imagine how you would get a dotnet framework out running in a Docker container?

Jamie

I mean, you can do ASP. NET Framework collection or the wrong part of the web there. But yeah, there are there are windows 10 containers, or container images, for running ASP. NET Framework apps. But they are not the easiest things to set up as our pilot.

Harry

Aren’t they also several gigabytes in size. They are Yes,

Jamie

yes. Because it has to ship with the entirety of Windows because that’s the other thing with core framework, right? With framework, when you run your app, you will only technically only have to instal the app and its dependencies, you would you would make the the you would take the risk that dotnet framework version X was already installed on the machine because it was going to run on Windows on Windows will pre instal that for you, because it’s required by Windows. But that meant that the old told your app size would be however big an installation of Windows is plus your app plus your dependencies. And so that meant that none of your code can be modularized. Right? None of your dependencies can be modularized. But with core when you I mean, I remember they were talking about it in the 3.1 days, the dotnet core 3.1 days of doing experimental tree, shaking To go, hey, you’ve pulled in this massive DLL list this huge chunk of library and the nougat package, but you only ever using one method. So we’ll just recompile that. Just give you the version with the one method, and your dependency drops from 11 megabytes down to 27 kilobytes. News of Jason.

Harry

Yeah, I mean, like you said, there’s so much more they can do with it, having the you know, the faster release cadence means that we, you know, there’s so much more, so much more that can be done. But yeah, so, yeah, so start that start. As soon as you got the CLA and you can have an efficient ci CD pipeline. Yes. Okay, I’ll be being slightly slightly tongue in cheek there it is, it is possible to Docker eyes framework apps. But I think you probably have a much easier time doing Docker rising a core up. But I, but let’s say we’re doing let’s say we’re trying to build a desktop app, and we want to do a CI CD pipeline for our dotnet framework, desktop app. And we need to build the installer in as your DevOps.

Jamie

I mean, you just do Ctrl, Shift B inside of Visual Studio after changing it to release and then copy the files out. And then you then open whatever app it is that you’re using to build your installer locally, and go File Open instal script, and then hit build or run and then watch that fall over because it’s looking at the wrong folder. And you fix all of that. And then you end up with an XC, there’s maybe 4050. If you’re lucky, 4050 megabytes and maybe do 100 megabytes in size, then you got to get that out to the customer client user. So then you put a random xe unsigned on your website for users to download. And on site.

Harry

Yep. That’s pretty much what happened. So I just saw I just had a flashback there flashback that I’ve not had for ages. And the flashback is dot pcap. files. Capital files.

Jamie

Yes. Yes. So cabinet.

Harry

I was like a dumping ground for all your data.

Jamie

Yep. And the only windows that

Harry

Yep. Say, I was still doing that. 10 years ago, cabinet files. Not 10 years ago, but still.

Jamie

So yeah. So this is you saying hey, you framework people have you think you had an easy

Harry

to worry about, about installers and

Jamie

Oh, my goodness. But that’s, I think that’s where core shines. Because yes, you’ve got this tree shaking stuff. But it’s built into the COI, like you said, you know, once you have that CLA, you can script it. And for those of you haven’t used the CLA, the command line, whatever, you can literally, if you if you have a terminal open command prompt open in the directory where your source code exists, you can type in D o t n Ed space, and type in the word run, and it will figure out where to start and build your application, you type in dotnet publish, it will do the Publish volume, it takes all of your stuff, wraps it up in a nougat package, dumps it on to this for you. Right, none of this figuring out how to build your pipeline array then. And then you can pay it, you combine that with a GitHub action. And as your DevOps action that just does that, that one command, and you’ve got something that immediately as soon as you hit compile, hit git commit, and then get publish. If you’re even if you’re using Git as your source control, then you can immediately build straightaway, and you can have multiple builds. And then you can do dotnet test you can do oh my goodness, what else is there?

Harry

There’s all kinds of there’s, there’s dotnet EF, there’s the Entity Framework. It supports adding migrations running migrations. So you’ve got a common lemonades, it’s actually a separate tool, but it’s you have to instal it separately, but if you use as your DevOps, it will be pre installed. So you can go dotnet EF, update database, and it will pull the details out of your app config, it’s still still not actually the most elegant way of doing it right now. I think they’ve changed it from the later versions are in the process of changing it. So you can actually pass a connection string to it. But it actually had to go from your, your startup, app config, just not the best experience. But nonetheless, that you can all allow you to vote on it. Update. Here’s your startup project. Here’s your database project and bang, there it goes. You to write that you can write that once it’s in your build pipelines and your pipe pipeline YAML if you’re using using that, and then boom, off it goes. Yep. And you can script out for different environments. If you’ve got multi environment, build Yeah, it’s, it’s, it’s really nice place to be I think now I think we’re, you know, it’s not pat ourselves or Pat Microsoft on the back too much. But I think it’s, it’s a much nicer place to work. I remember, I remember maybe sort of six or seven years ago saying to some of my, you know, some of our friends or acquaintances and saying, Oh, I, you know, I’m a developer I work in, you know, I’m working Microsoft technologies, and they’d be the shop and take a breath. Wow, you know, I work in I work in Linux, and you know, enjoy that. Just shout chmod 777.

Jamie

RM dash RF

Harry

minus r dash F.

Jamie

That’s the one. Yeah, no,

Harry

I don’t advocate doing any of these things. By the way, you should file security is important. Don’t chmod 777. Everything, please.

Jamie

Now, of course, exactly. But yeah, I think that’s an important thing to point out, though, that, that there is. I feel like that with certain technologies and certain bergama languages. So the frameworks, and I’m not, I’m not using the word friend, whether to implicate Microsoft in any way. But certain different technologies that are used in the development space, feels as though they can very easily become siloed. And when you become siloed, and you don’t know any ideas, and from the outside world, you stagnate. I’m not trying to say that’s what happened with framework, but by allowing the ideas and four to make a make an easy to use Command Line Interface, you know, like, you were saying that Linux people and Unix people, technically, Mac OS, people like to use a command line interface, because a, it’s alright, discoverability is hard, right? You need to do dotnet, and then type in help to get a list of some of the commands. And then for each step down that tree, you need to maybe need to do help, again, to get the next level of commands, and then the next level of commands, and then the next options. So you can figure out dotnet publish, where do I publish, you do dotnet publish? How do I publish it for Windows? How do I publish it for Mac. But once you’ve got that, like you said, you can script it. And then you can do things like piping the output of one command directly into another. And then you have this chain of, of commands that almost no one can decipher. But you know that when you run it, you get a bunch of things come out the other end, and it looks great. There’s one that I use for testing, there’s a there’s a dotnet test command, I can’t remember offhand, where it will run the test, get the the coverage of your test, pass it into an app, that then will read it and then produce a chart for you to show you where you know which bits of code are covered and which bits aren’t. And the difference between the previous time you ran it, and now or maybe you can connect to the web and read your your previous state. And it’s really quite useful. And just being able to do that with a couple of commands. For some people working in the command line is not for them. But what’s great about that is because it’s the command line, you can change Visual Studio to call the command line. And then if you’re happy clicking some, you know, going through some menus and finding it that way. Fantastic.

Harry

Yeah, that’s some pre or post build events, if you know that. You’re so inclined.

Jamie

Absolutely.

Harry

Yeah, sorry. I had a thought. It’s totally slipped my mind. I had a had a really interesting thing to say, obviously, and I forgotten it. Obviously, it was really interesting, because I’ve, you know, I can save earnings anyway.

Jamie

Okay, so we talked a little bit about core. But what about 5/6/7? I’m just showing where I can count now. What and what we’ve done the framework, better from a four point wherever they’re going from 4.5 point 6.7 point eight, whatever one whenever to done if I

Harry

feel like this is becoming more of a discussion about version numbers, but what the heck are you even the fact that we’ve gone from there’s been a, we’ve had dotnet core to dotnet core, three 3.1. And there was a call to put on in 2.2. But you know, core three core 3.1 dotnet, five, what’s going on? Yeah.

Jamie

Clearly, it can’t be a Windows nine issue, right? That can’t be at all.

Harry

Well, Jamie,

Jamie

oh,

Harry

oh, giant. No, I would we may just but i think i think it was actually a sensible call from Microsoft was up to you know, there’s so much history and so much. So, you know, there’s so many apps running on versions of dotnet. framework four point x to have a dotnet. Four would have been very confusing. Especially with the rebrand to dotnet rather than dotnet core. So jumping straight from dotnet core 3.1 to dotnet. Five was a although, you know you quit you may Hey, there’s some questions to be raised about this podcast, obviously, but I’m

Jamie

sorry. Well, what I’ll say to you hair is at the date of recording you haven’t heard the new intro so oh, maybe? Yeah.

Harry

I know, I’m in in the dark as much as you guys keep distracted. We keep distracting from the tangency. Yeah, yeah. The dotnet version numbers and yeah, it was it was a it was a, you know, a wise a good thing to do for them to do. So, but the LTS cycle is, is two years so it’s even even numbers going on from now. So 3.1 is or isn’t LTS, confusingly, core. 3.1 is an LTS, confusingly. But even numbers starting from six will be LTS.

The above is a machine transcription, as such there may be subtle errors. If you would like to help to fix this transcription, please see this GitHub repository

Wrapping Up

That was my interview with Harry Bellamy about the differences between supporting both Greenfield and Browfield applications in both .NET Core/Five and .NET Framework. Be sure to check out the show notes for a bunch of links to some of the stuff that we covered, and full transcription of the interview. The show notes, as always, can be found at dotnetcore.show, and there will be a link to them in your podcatcher.

And don’t forget to spread the word, leave a rating or review on your podcatcher of choice - head over to dotnetcore.show/subscribe for ways to do that - and to come back next time for more .NET Core goodness.

I will see you again real soon. See you later folks.

Follow the show

You can find the show on any of these places