Join us on March 18 with Milan Jovanovic for the next episode of Rockin' The Code World with dotNetDave - a weekly show to learn & live Q&A focused on .NET and other programming technologies.
AGENDA
• Introduction
• API Development
• ASP.NET
• Software Architecture,
• Azure, Career Development,
• Performance, Code Quality & Coding Standards
• Databases
• EF Core
• Modular Monoliths
• Soft Skills
• Domain-Driven Design
• Wrap up
GUEST SPEAKER
Milan has worked in the industry for almost 6 years, and in that timeframe has progressed to Senior Engineer and Software Architect roles. He specializes in Web application development and works primarily with the .NET tech stack. He's a big enthusiast of Domain-Driven Design and shares his knowledge daily on various social media profiles and in his newsletter.
Show More Show Less View Video Transcript
0:00
Thank you
0:29
Thank you
0:59
Thank you
1:29
Thank you
1:59
Welcome, geeks, to another exciting episode of Rockin' the Crilled World with Donette Dave
2:07
I'm Dave McCarter. I'm glad you're here. We had two weeks off, so I hope you were having some fun the last two weeks
2:15
and staying away from all the crappy weather, at least in America, we've been having
2:22
And it seems like we're going to have some more storms hitting in San Diego in a couple days
2:28
which means it's going to hit the rest of the country a day or two after that
2:32
So buckle up. I'm over this weather, I'll tell you that. So I have an exciting show lined up for today
2:41
Lots of stuff to do, talk about. And so my guest today for the first time is Milan Jovanovic
2:52
He's from Serbia. and I'm really excited to talk to him because he just became a Microsoft MVP
3:00
You all know I've been an MVP for almost 18 years now. So I'm excited to talk to somebody who's just become one
3:08
And he's got some other cool things that I want to talk about with him. So it's going to be a great show
3:12
I hope you will stick around. It looks like he already has a fan in the chat room
3:19
And I always forget to tell you all to do this, but make sure you ask questions
3:23
so we can answer them during the show. That's what we're here for
3:28
That's why we do it live. Otherwise, I would just record it and we wouldn't have to have any questions
3:34
All right. So guess what I was doing last night, everybody? I was doing one of my favorite things of all time
3:43
And this, I was doing photography at this concert last night. I'm sorry if my mouth is now moving slowly
3:51
because of the video. So, but this is one of my favorite groups, Queensryche
3:57
I've been doing photography for them for at least 10 or 15 years now, I guess
4:03
And it's literally one of my favorite things to do. But I injured my foot in the process of taking those pictures
4:12
And so I'm a little bit under weather today. So anyway, I just wanted to show you this because, you know, there's more to life
4:21
you know, there's more to life than coding, right? And that's one of the things I do to keep myself
4:29
keep the creativity in myself going and doing a picture. So if you follow my personal website
4:37
I'll have the pictures up there and the videos up there in a couple of days
4:43
I also wanted to let everybody know about my latest book, Rock Your Code, Code and App Performance for Microsoft.net
4:53
I hope you go pick up a copy. There's a lot of great information in it
4:56
And I learned a lot from this book. So if I learned a lot from this book, I'm sure that you will learn a lot from this book too
5:02
from this book. And I'm continuously working on performance articles and things like that
5:10
And so make sure you check out my website or csharpcorner.com to see the latest stuff I'm writing
5:15
this week I've been writing a couple articles I'm going to write one today
5:20
or tomorrow I'm not sure when so I hope you check back so those articles
5:26
of course are to supplement the book because the book was released
5:31
since January 1st alright news big news everybody the Code Quality Conference is coming back
5:38
this year on June 2nd I'm so excited it's the biggest one day conference on the C Sharp
5:45
Corner platform, and I'm so excited to bring it back to you all. And because, you know
5:51
this conference is basically because I don't see these kind of talks at conferences, right? And so
6:01
this conference is to make up for that. I wish there were more code quality talks at conferences
6:07
I continuously look at conferences, and there's not that many, maybe a few, but the code quality
6:14
conference. It will be a whole day of experts from around the world that will show the latest
6:22
greatest code quality and performance things for you all. And so I'm really excited. So June 2nd
6:32
if you want to speak at the conference, please sign up now. Make sure you have a good
6:39
description of what do you want to talk about so I can pick the ones who will work better
6:46
for the conference. Because we only have one day. Some people won't be picked, unfortunately
6:54
So send your papers now or think about it now because I'll keep bugging you until
7:01
we start picking the speakers. And then on June 2nd, of course, make sure you
7:07
carve that day out to watch the conference live so you can ask questions and things like that. But of course, it'll be on video
7:15
a few days after that. So, all right. All right, I want to announce I just made it public this week, my Spargen DevTool
7:25
I really excited I finally got the first version of this done I have lots of ideas and lots of new features And it my first global tool that I written in Microsoft
7:39
So that was an interesting process, doing a console app with colors and all those kind of things
7:46
I was working on a video to show you what it does, but I didn't get it done
7:50
but I'll tell you what it does right now. And first it cleans temporary CAS files from Visual Studio
8:00
SQL Server and other programs that they just leave on your system for
8:04
I don't know what reason, you know, that some programs aren't that great at cleaning up after themselves
8:10
Visual Studio and .NET is definitely one of those programs. And to prove that you can read, you can read the post, but you know
8:19
if you're coding and all of a sudden your code just doesn't work anymore, your unit tests don't
8:25
work anymore, and you go, why did they just stop working? It's probably that. And if you run
8:32
Spargen clean, it'll clean out all that stuff. You can get back to work really quickly. It deletes
8:38
like almost 2,000 files a second. And anyway, so that's the first thing it does because I need
8:46
that every day pretty much. I run into issues not only on my work computer, but on this computer too
8:52
And so I use this tool every day. The other really big thing it does is it quickly backs up all your
8:59
source code. And I wrote this feature a couple of years ago because I've yet to find a source
9:07
control program that doesn't blow away my code. And when you're working on some code for a day or
9:13
so and it gets destroyed by a source code repository, you kick yourself in the head and
9:24
go, oh, I have to write all that again? Luckily, it's usually faster to write it the second time, but still you've wasted a lot
9:32
of time. So what the backup feature does is it automatically scans all of your hard drives for source code
9:41
and then ask you if you want those backed up. If you say yes, then it will back all those up
9:48
I don't know about you, but I have a lot of source code on my system
9:52
And so I also have a turbo mode, which it only backs up the changed files
10:00
So I use it at the end of every day. And I also use it before I touch GitHub
10:07
or anything like that, because I don't want to lose any source. And this tool has allowed me to bring back source
10:16
that some GitHub or somebody's destroyed on me. So I hope you go check it out
10:22
I didn't get a lot of testers. So forgive me if you see an error or two
10:27
If you do, please email me. I'll work on it as fast as possible. But I hope you check it out
10:33
And I plan to add a lot of features. And if you have ideas, features you want written into it, please let me know
10:40
I'm more than happy to put it in because this is for you guys. It's a free tool and it's for you to help you in the development
10:47
All right. I want to bring on Milan. Has worked in the industry for almost six years and progressed to a senior engineer and software architect roles in that timeframe
10:58
He specializes in web application development and works primarily with the .NET stack
11:03
He's a big enthusiast of domain-driven design and shares his knowledge daily on various social media profiles and in his newsletter
11:14
Welcome. Hi, David. Thank you for the introduction. It's very nice to be here
11:21
Yeah, it's good. I'm glad you're here. And I want to tell everybody, you know, you and I were talking about this a little bit before the show
11:28
But, you know, as the show host, you know, it's it's my job to find people to be on the show
11:36
And. And which is kind of difficult to do sometimes. And and one of the ways I find people is somehow I start following them on Twitter
11:47
And if I see their tweets and I like their articles and videos, I go, hey, you want to be on the show
11:53
And so this is proof. This is how I get speakers is by that. So Alain and I have never met. You know, we never worked together. It's the first time we talked together today. And it's because I found him on Twitter. So start posting some interesting articles and I'll invite you
12:09
Yes, this is entirely true. I've actually been following you on Twitter for some time. I enjoy your polls about performance. And sometimes I also get surprised by the answers
12:20
yeah it's it's uh i'm always trying to find uh you know things that people haven't thought of
12:28
and actually this week i tested something i don't want to give i i want to wait for the article but
12:33
i actually found uh something that uh that actually speeds up creating collections i've
12:41
never seen before so uh it's not a huge increase but you know when you're trying to shave off
12:47
you know, milliseconds. It really helps out, especially if you're doing, you know
12:52
thousands of transactions per second and things like that, you know, that money really adds up
12:56
quick. So I'll be sharing that soon. I'll write that in a couple more articles. But yeah
13:04
and you specialize in web development, you say? Yeah. So I mostly build web APIs
13:15
so RESTful web APIs some GraphQL stuff I also do a little bit of front end work
13:26
I used to do MVC back in the day and some Angular
13:31
but kind of back end APIs is where I feel at home yeah so
13:37
before I forget again everybody if you have questions please post them in the chat
13:43
and we'll get to them as fast as we can but you know one of the things I kind of wanted to talk to you about first and I kind of alluded
13:51
to this at the beginning of the show is you just became an MVP right yes and so what's your area
13:58
of expertise in and in the program so I became an MVP in developer technologies mainly because
14:07
I talk about a lot of .NET stuff on LinkedIn, Twitter, and recently on YouTube also
14:15
And kind of all that work paid off. Yeah. So I know a lot of people that watch the show are interested to be an MVP
14:23
Actually, my producer wants to be an MVP. And so how did you become one
14:31
Can you share that quickly? So I kind of started creating content online, educational content, I would say some two years ago to the date
14:45
And I kind of didn't know where I was going to take it. And I also learned about the MVV program
14:53
And I thought hey this is cool It a nice recognition And it also a nice way to kind of something to be motivated by So I kind of you know knew about the program but I didn take it seriously
15:08
I would say until maybe late 2021. And that's when I started getting some traction on LinkedIn
15:17
getting some followers, which motivated me to keep on even more sharing content
15:22
and at that point I thought, hey, what does it take to become a Microsoft MVP
15:29
So I started researching. I started connecting with a few MVPs on LinkedIn, asking them some questions
15:36
and you'll find that most of them are very friendly and will reply to you and help you out
15:46
The most help were a few people from Serbia, which is where I live
15:50
they're not in developer technologies as I am but they were very helpful in in terms of what you need
15:57
to do and what's expected to become an MVP so one thing is sharing useful content on social media
16:06
and they also told me it would be very helpful if you had a blog and possibly a YouTube channel so
16:13
those are kind of some of the the ways that you can contribute also there's open source contributions
16:19
maybe you build a library or you contribute to some open source library so I kind of started
16:27
working in that direction and everything kind of started falling into place last summer so that
16:37
would be around July that's when I decided that I was going to start my YouTube channel
16:43
and kind of things went on from there. And then in August, I started my YouTube channel
16:50
And in September, I started my newsletter, which I also turned into a blog
16:55
So just today, I released my latest newsletter. That was the 29th issue
17:03
So that's already looking like a decent blog. Like there's various topics. And then, so contributions to the community is one thing
17:11
but you also have to make it known that you actually want to be an MVP because to become an
17:17
MVP, somebody who is already an MVP or someone working in Microsoft has to nominate you for the
17:24
award. So a friend of mine working in Microsoft in Belgrade, he helped me out, nominated me
17:33
I believe it was last November, something like that. And then it was a few months of waiting
17:38
and I believe it was 1st of March when I received my award
17:42
Yeah, yeah, that was 1st of March. I was really happy for you when you got that
17:47
I also was nominated by somebody at Microsoft. Actually, they didn't even tell me they were doing it before I heard about it
17:56
But yeah, I got nominated by Microsoft. So, you know, everybody who's listening and you're wondering how to be an MVP
18:03
that's basically it, right? It's not only, you know, we don't have time to talk about it, but, you know, it's kind of a grueling, I don't know what you went through, but it's kind of a grueling process to approve to Microsoft, you know what you're talking about, right
18:18
So that's one piece of it. The other piece is community, right? And I'm glad you brought that out because that's really what, you know, I've been doing this almost 18 years now. And that's what Microsoft is really looking for is people who participate in the community somehow, whether that's, and you don't have to be a speaker. You don't even have to be a blogger. You could just participate in, you know, chat rooms or whatever
18:42
You know, it's just helping others. Basically, that's what the MVP program is. Besides being an expert is you help the community. Right. And and that's that's that's what it is. And then you have to convince somebody to nominate you. And that's usually the easier
19:02
easier. Yeah. Yeah. Yeah. Yeah. Yeah. It's, it's, it's doing all that pre-work, right
19:08
That beforehand that, yeah, yeah, that's, and, and, and that's it. So those of you
19:15
you know, if you want to become a Microsoft MVP, now you know how to do it. Start blogging
19:20
start writing, start helping people, start speaking if you want, you know, you know
19:25
one of the things that helped me get in it, my MVP is I ran a user group here for 20 years. I
19:30
I founded and ran the user group. And that was one of the things that, you know
19:34
helped Microsoft award me an MVP because I was doing that. I don't do that anymore
19:39
But, you know, when I was awarded, that's what I was doing. So along with writing and everything else you guys see me do
19:48
So, yeah, it's – have you signed up for the summit? Yes, but I'll be there virtually
19:57
Oh, you're not coming in person? No, no, it's too short notice for me
20:02
I also have a trip to Norway. I'm speaking at a .NET user group there
20:08
So kind of it's conflicting with each other. Yeah, yeah. That's, you know, one of my favorite parts of the MVP
20:18
So if you guys don't know what we're talking about, so part of the MVP program
20:23
which they haven't really done since COVID, is we all go to Seattle once a year for about four days
20:29
and we participate in a bunch of meetings we can't talk about
20:33
because we're all under NDA. And we have fun too, but one of my favorite parts
20:40
is meeting people like you from all over the world because it's like the only time I get to see you in real life
20:46
is at the MVP Summit because Microsoft pays for everything except for airfare
20:51
So people from all over the world come in that one week and ascend on Redmond, Washington
21:00
And we spend most of those days at the campus. And it's always something I look forward to just because, like I said, it's the only time I get to see my friends
21:11
And actually, that's how I met Mahesh, who runs C Sharp Corner, was at an MVP summit
21:18
And that's when he started talking to me about being part of C Sharp Corner and coming to India four times now, all because of the MVP program
21:28
I'm not sure if that would ever happen if I wasn't there at the same time he was, because he used to be a regional director
21:36
Right. Which if you guys don't know, a regional director is like one is the one is a level up above an MVP
21:43
right so they they represent uh an entire region of mvps and um that's really hard to get i haven't
21:51
even tried um because there's not that many of them you know um i don't know how many mvps there
21:58
are but i've been at the summit where there's been about 1800 of us there so um yeah yeah i don't
22:05
think that many come anymore but back when i started definitely that that was happening back
22:10
And so, yeah, it's a great program. And if you guys want to do it, try, you know, it's a it's it's it's it's hard process, but it's pretty rewarding
22:20
And you find out you know and and you know my my favorite part of being an MVP is just I have impact on developer technologies right And that one of my goals is to make those products and stuff better when I go to Microsoft
22:36
and talk to them. I, you know, I talk to Microsoft people all year, but, you know, being in front of their
22:42
face helps out a lot. Yeah. So welcome to the program. I keep it up
22:50
And also, if you haven't heard of it, when we get awarded, we actually get awarded for the year prior, right
23:00
Prior? Okay. Yeah, yeah. Even though it's for the current year. Yeah, it's your current year, but you're actually being awarded for the year prior
23:10
For what you did in the year prior. Yeah, yeah, yeah. So right now, given that you've been like an MVP veteran for the better part of the past two decades, what can I do to keep my award
23:23
Just keep doing what you're doing. You know, as long as you keep writing and keep, you know, proving to Microsoft that people are listening to you
23:31
Right. Because, you know, we have to report to Microsoft everything we do
23:36
You know, the videos, the books, the articles, the, you know, the shows I do and things like that
23:42
we have to report all that to Microsoft because they want to see how we've been helping the
23:49
community. Right. And so I'm really bad at that. You know, I have a calendar event that reminds me
23:55
like every quarter to update my MVP and I never do it. And of course, tomorrow, tomorrow's the
24:01
last day and I have to scramble tomorrow to get everything in there. But so I'm really bad on that
24:07
part. I wish it was a little more automatic, but, but yeah, just keep doing what you're doing and
24:13
and writing good articles and, and having people listen and, and, and read your stuff and yeah
24:19
it'll be good. Oh, and oh, don't break your NDA. Microsoft is really, really about the NDA
24:29
And don't say anything bad in chat rooms and stuff, because I've seen people kicked out
24:36
in the same day they said they posted something bad like, you know, against a different race or something like that
24:44
And they were out of the program, you know. Oh, no worries. That's not who I am
24:48
No, no, I know. I know. I know. I'm just saying those. And I've seen people
24:53
Still useful information. Yeah. And I've seen people kicked out of the MVP summit
24:58
because they broke the NDA while they're there. so somebody tweeted something they weren't supposed to and they were out gone okay that
25:09
seems harsh but no they Microsoft Microsoft like I said Microsoft is very about their NDA so
25:18
when you're at this summit do not tweet about anything you learn about and don't post any
25:23
pictures right that's my biggest advice when you're at the summit is don't say anything say
25:28
you're there. Say you're having fun, but don't say what you're doing. Yeah. I think they're a
25:36
little better than it used to be, but there were some years where they were really bad
25:42
You know, they kid you out right away. Yeah. So we have a couple of questions. Let's get to those
25:55
before we go on to the next subject. One person asked, what was the first one
26:04
Oh, yeah, yeah. What are the alternative options to rest? So in my eyes, there's no alternative, right
26:15
But, I mean, you can try out some other options, but you're going to go through a lot of pain. Yeah
26:22
So one option is SOAP, which is based on XML. That's the old way
26:29
And it's kind of the old way of doing things. I don't think anybody does it these days except in legacy systems
26:36
Yeah. The other cool way is using GraphQL, which I believe was popularized by Facebook or Meta
26:45
I could be mistaken, of course. it's a nice idea but to implement something like that in .NET
26:54
it's a wild ride there's also gRPC gRPC, yeah, gRPC, it's binary
27:05
you can do binary, but most people do REST and for good reason
27:11
REST, there's also improvement for REST, but I, you know, I've been using REST ever since, I think, 2008, I think
27:22
And, and, and I've never looked back because, you know, the, one of the biggest, one of the
27:30
things I really like about REST is that, you know, the people can request just the data they need
27:36
not everything, right? And they can kind of create their own queries too, right? And so that, as a
27:42
as an API developer, you know, that alleviates a lot of work for us because we don't have to
27:50
create an endpoint for everything they want to do, right? We just provide the data and then they
27:56
query the data the way they want to query the data, right? And so, you know, speaking about
28:02
performance, you know, I say this all the time, you know, when I'm speaking or whatever is that
28:08
you know, the biggest performance problem you're ever going to have is the internet
28:12
right that's the biggest problem right you can optimize the front end and the back end all you
28:18
want but if you don't worry about the middle part you know the internet part uh you know you're you're
28:25
going to shoot yourself in a foot you know and i learned this a long time ago and and that's
28:30
you'd need to worry about all of it but you have to worry about that too so one of the ways to do
28:35
that is number one right don't go across the wire unless you have to right and number two um
28:42
make that data as small as possible right because that allows more people to hit your servers and
28:47
things like that right yep yeah yeah so i mean that was an interesting question yeah i'd like to
28:55
like kind of attack it from a different angle um not what are the alternatives to rest but
29:03
But when would you want to consider not using REST? Like that's interesting
29:11
I can't see too many arguments for that. But maybe I'm biased, to be honest
29:18
I think the only argument is some people don't like using HTTP within the company, within the domain
29:26
right so if you have one server talking to another server you know uh hdp is you know
29:32
not always the best transport mechanism there's other mechanisms you can use right
29:37
uh hdp is not the fastest really if you want to go within the same domain right within the same
29:44
server farm or whatever so i think that's part of life some people don't like it is because of that
29:50
But externally, it's the way to go. Yeah. Yeah. But after what I've been seeing on the news lately
29:59
our job... Jobs are going to be over soon anyway with chat GPT or whatever it's called
30:05
I'm still skeptical. Yeah, me too. But that's just my stance. Well, you know what
30:12
I mean, I love the technology. I've been using it, I'd say, almost daily since December
30:21
I really like it for getting content ideas maybe getting some outline
30:29
for a post on some topic it's very useful for that but for coding
30:33
I don't like it because I've tried it a few times and it sometimes
30:38
it spits out okay code but it has a tendency to make things up
30:45
so I had I had a situation with EF Core and the PostgreSQL provider
30:55
I was trying to do something with a full text search to set up an index and so on
31:01
And I was like, okay, let's ask ChatGPT what it thinks. And it came up with some nice solution
31:09
how I can configure the index and everything. And I was blown away
31:14
This is amazing. Look at this. I've never seen this function before
31:19
let me go to my code and try it out and lo and behold it doesn't exist
31:24
so I mean it picks up you know things oh it made up function names it called yes
31:30
but I'm telling you it looked so believable I was 100% convinced okay this is the solution
31:38
to my problem I'll plug this in and be on my way and I even researched the documentation
31:44
for the mpg sql provider and it does not exist. So I was, you know
31:50
you should be careful with chat GPT. Yeah, yeah. I was going to say
32:00
you know, I used to teach at the university here and well, one of the universities here
32:06
And I was thinking all the teachers out there, make sure you run the code before you create it
32:12
because students are going to start using that. I had two students try to cheat my class and, you know, so, yeah, I can see where, but you know what
32:26
So one of the articles I'm writing right now is about regular expressions and, you know, regular expressions, you know, if you guys haven't used them, it's one of the things that we use that no one likes using because no one can remember the freaking syntax for it
32:40
because it's so convoluted and weird. And so my personal problem using Regex
32:49
is it's hard for me to come up with those patterns unless I steal it from somebody else
32:55
And so I did see someone talk about or a photo or something about
33:00
someone's writing Regex expressions with chat GPT and I was going, okay, now I want to use it
33:07
So did it work? I didn't see the whole thing I was probably doing something else
33:12
that's probably working or something I gotta look it up yeah that works
33:17
Regex is something you don't try to memorize no one knows it really
33:22
even the people that say they do let's see we have some more questions
33:30
somebody says they're developing e-commerce applications in Blazor uh what did oh uh somebody oh oh yeah which one is best server or web assembly which one do you
33:46
think so i tried out blazer first i believe back when it was in preview that was like uh
33:57
five six years ago yeah i was still i was still in in college um and i really liked the idea
34:06
behind blazer of being able to build ui applications uh using c sharp now as far as which one is best
34:13
um i don't think any one of them is best because they both have their their shortcomings so with
34:20
With WebAssembly, I'd say the biggest problem is the download size. Yeah
34:26
So it's just a very large applications compared to something like React
34:31
a simple JavaScript application with HTML that's going to be in the kilobytes range
34:37
whereas the WebAssembly is still in the megabytes. I honestly have not been following it recently, so I'm sure they made improvements
34:45
but I don't think it's still on the level of JS or TypeScript libraries
34:51
So that's the one issue. And with Blazor server, the problem is you're forced to run web socket connections to the backend to get real-time updates
35:05
So anything changes on the UI, that's a round trip to the server. And then how much can you scale that and so on
35:13
So I'd say both options are limited. But if you want a real UI application, probably WebAssembly is what you want to do
35:26
But then you have to be careful with the problem with download size
35:33
Yeah, yeah, that's definitely true. But they both have their advantages too
35:37
Like, you know, WebAssembly, you know, has more access to the local system, right
35:42
And WebAssembly can also work offline, you know, which is, you know, something that, you know, not hardly anything, any web application can do offline, right
35:54
And so WebAssembly can actually do offline, too. So, yeah, they both have their advantages
36:01
You know, I think it was last year, Simon, that we had the creator of Octane on and that's all built around Blazor
36:14
And Octane is, and if you guys want to use Blazor, I would definitely look at Octane because it basically, you know, it does all the heavy plumbing stuff, you know, that we all have to do with our websites
36:31
It does for you. It's just all configurable. You create these little widgets and you add them to your website and boom, they work. Right
36:39
So I was playing around with it last year because I was working with Mahesh with something else for a project of his
36:50
And so if you're new to Blazor, you should check out Octane
36:54
It'll get you there faster. That's for sure. And the way they've architected is pretty cool
37:00
I like the way it updates and everything. So that was a good answer
37:08
So what database do you typically choose when you're designing systems, if you have a choice
37:13
Oh, so my favorite has for the longest time, I mean, first of all, I'm a relational kind of guy
37:20
So SQL databases are something I most familiar with something I can efficiently design a data model around So that kind of my default choice Now when it comes to the specific database what I been using in kind of the first
37:39
half of my professional career was a SQL server from Microsoft, simply because I still believe
37:47
it's the most popular library, sorry, database in .NET. and then recently
37:54
I switched to Postgres and I personally like it more because it's open source, it's free
38:04
and so on, so there's like the cost savings to take into consideration
38:10
and also Postgres is an object relational database so you have a little bit more flexibility
38:18
in how you can design your data model So that's why I like it personally
38:24
But you can't kind of like only limit yourself to that when choosing a database
38:29
No. You need to take many things into account. Is your data structured
38:34
Is it unstructured? What kind of access patterns are you, is your application supposed to support and so on
38:44
Yeah. I, you know, I've been using SQL Server ever since I've been programming, you know, pretty much, I think
38:51
And so I've, you know, I've designed entire database systems for companies, you know, in the past
38:58
And I've written about that. And but these days, you know, especially because of all the features, I haven't unfortunately spent enough time getting into this because I can't find a company who uses it
39:12
But, you know, I'm really interested in, you know, document based databases like Cosmos DB because of the flexibility, you know, how easy they are to globally, you know, put your data in any data region you want and it automatically, you know, keeps in sync
39:30
And so a lot of things that SQL Server can't really do, you know, Cosmos DB definitely does
39:37
And so for that flexibility, you know, I personally like that. I'm, you know, I'm going to be adding that, re-adding that back to my global tool because it was in the
39:47
So my global tool, this is the third version. First, it was a console app
39:51
Then it was a Windows app. And now I've changed it back into a console app, basically a global tool
39:57
And so I'll be getting back into my Azure Cosmos DB stuff for that app
40:04
And it has a lot of advantages. a lot of disadvantages too, right
40:08
And especially the learning curve. But I think those kind of databases
40:13
will be what we'll be dealing with more in the future. I like relational databases
40:21
I always will. But I kind of personally see this as the feature of a lot of the data stores
40:28
we're going to be using. And I'm sure 20 years from now it'll become something completely different, right
40:32
But that's what I'm seeing for the near future at least. Or we'll still be using SQL
40:38
Yeah. And it's cheaper. If you guys want to save costs, especially in the cloud
40:43
SQL Server is a heck of a lot cheaper than Cosmos DB
40:48
That's for sure. Cosmos DB is not cheap. So SQL Server is the way to go if you're trying to save costs for sure
40:58
I think your friend asked this. I like this one. And how much time do you spend daily on tech stuff like Officeworks, blog writing, YouTube, things like that
41:09
So, I mean, now that it's my job, I kind of spend all day on it
41:17
Because, not because I have to, because I enjoy it a lot. But I've been asked about this quite a lot
41:25
So kind of I have some rough numbers in my head if you're interested. so writing i write one newsletter or blog a week and that usually takes me around two to three hours
41:40
so that's coming up with a topic then writing an article and then i write it in markdown
41:49
or mdx actually um on my on my website and then i have to convert that into the
41:57
uh email version so i do double the work because i don't know i didn't think of a way to optimize
42:03
that yet um so that's just a few hours and then for the youtube stuff i'd also i'd say i do
42:13
videos a week and it takes me I don't know let's say
42:20
around two and a half three hours per video so recording, editing
42:26
coming up with a thumbnail and so on so but I'd say
42:32
I'm relatively good at it now I wasn't as good at it
42:35
when I started and then just for research I do that all day pretty much
42:44
I'm constantly on LinkedIn on Twitter there's always people talking about stuff
42:49
I also like to read you can see the big bookshelf behind me
42:54
so yeah well you have a lava lamp all right yeah I just started working
43:02
I've been meaning to get one back you know back in the 90s early 2000s
43:07
I always kept one on my desk because it helped me relax You know, whenever I felt stress, I would just look at that for a little while
43:14
It kind of relaxes me. And I kind of need to get one again
43:18
Actually, I should put it right here in between my two monitors. That's a good idea
43:23
I haven't thought about that. I added it to bring some life to my background
43:28
Right. That's the throw. The lava lamps for you young people out there are a throwback from like the 60s and 70s
43:35
That's when they were first pretty popular, I think. Oh, this is a good question
43:46
I'm using local storage. How can I assist for security things before calling the API
43:54
So I guess security on local storage. Do you have any suggestions on that? So I'm not too kind of proficient with security in the browser
44:10
Yeah. Are you talking about security for like a Blazor application local storage or like a Windows application
44:18
Well, I mean, I guess that would apply. I'm asking the person who asked it
44:22
Yeah. Yeah. Go ahead. Sorry. No, I mean, I'm guessing local storage is probably the browser local storage
44:31
So it would apply for any client-side application. I'm not really sure
44:39
to be honest yeah you could I mean you could use something like
44:49
you know Microsoft used to have a local storage database I forget what it was called
44:54
I have to look at one of my slides because it actually on my architecture slide It was called SQLite or something like that that you can use for local storage
45:05
And so if you're using something like, if I'm remembering correctly, like SQLite
45:10
then you have the same kind of security passwords and everything to get into it
45:15
So that would secure it to me. Right. Or you can write your own and just encrypt it all
45:21
But that would be kind of costly for performance. Right. Yeah, I would just use a local database store, to tell you the truth, because then you have the same database capabilities
45:31
And SQLite is not, or even SQL Server Express is not like a full blown thing
45:37
It's just enough to like query data and put data in it and stuff like that
45:43
Microsoft used to have a technology that allowed us to do that pretty easily, but they abandoned it a long time ago, unfortunately
45:51
But yeah, I would say that's my answer is to use something like that
45:57
Did anybody else have a suggestion on what to use for a secure local data store
46:03
You know, I've had the project manager for Cosmos DB on my show a couple of times
46:10
And I've asked them this seriously. I said, you know, when are you going to come out
46:15
with a Cosmos DB for local, right? Oh, and? He goes, they're not even thinking about something like that
46:25
But that's basically why I asked him that question is for a local data store
46:31
And that would be a great data store because it's just a bunch of JSON documents
46:36
It's nothing super sophisticated. And that would be great. I wish somebody would do like a Cosmos DB local
46:46
Maybe they will if enough of us complain about it. So email Microsoft, everybody right now
46:51
Do you think we need that for like a local development environment or just being able to run off the cloud
47:00
Yeah, off the cloud. Right. Whether you have, whether your application is Blazor or a Windows app or, you know, something on the Mac or something
47:09
Right. We need a local data store that's really easy to use
47:12
And we don't really have one right now except for maybe SQLite or SQL Server Express
47:19
right that's basically all we have right now um as far as i'm aware unless somebody else knows but
47:25
uh yeah so yeah i do want to cosmos db light light right you know i don't need all the features i
47:32
just need something to stick data in and get data out of really easily right and so yeah um any more
47:40
questions before we wrap up in 10 minutes or so? Oh, what database are you using when you're using
47:50
GraphQL? So I don't have any production experience with GraphQL. I've consumed GraphQL APIs
48:03
but that's an entirely different thing. So I don't think I can answer this
48:10
Yeah, let me add that to my kind of learning list, and then I'll talk about it on my channels
48:17
Yeah, I just made a note. I'm going to contact Microsoft next week and see if they can send me somebody for my show who knows a lot about GraphQL
48:26
Because I want to learn more about GraphQL. Yeah, it already popped up a few times, so people are interested
48:30
Yeah, yeah. I'm interested too. I just haven't had time or, you know, we don't do it at work
48:35
And so I haven't had the time to really learn about it too much
48:39
but it looks really cool. I forget. Oh, there's another technology I want to learn
48:47
And I contacted Scott Hunter, you know, at Microsoft. And he sent me a list
48:52
So I'm going to have that person on the show in a couple months, I hope. But now I forgot what I wanted to learn
49:00
Do you use navigation properties for joins? Yeah. Do you use navigation properties for joins with query data on your aggregates
49:11
Okay. I'm not sure what you mean by navigation properties. Is that an EF framework thing
49:19
Yes. Yes. That's an EF framework thing. I guess, yes. Why wouldn't you
49:30
Yeah. Let me just think about it. Oh, I remember what they are. Yeah, yeah, yeah
49:34
I mean, I most certainly do use navigations for joins. I think that's perfectly fine
49:42
Why would you fight against EF Core in general? Yeah, yeah. I've been using EF, any framework ever since before when it was in beta, right
49:54
And in my personal projects, that's all I use, right? Ever since any framework came out, I go, heck, this is so easy, you know
50:04
So now I have a spicy question for you. What do you think about abstracting entity framework with repository interfaces
50:16
So I posted a question on Twitter. Yeah, yeah, I saw that too. And like it really blew up
50:20
A lot of people started adding comments. So I'm curious what you think
50:25
Are you talking abstracting the database context away from the other parts of any framework
50:30
Yes, yes. Yeah. that's exactly the way I've been doing it since the beginning
50:34
And in the beginning, you couldn't really even do that. Right. I did it by brute force because before code first
50:42
doing that was really, really difficult. And I think I was the only person who knew how to do it or did it
50:50
Right. But yes, I always do that. You know, when I, when I talk about architecture
50:55
you never put your data models with the, with the database context
51:00
Right. And so I'll give my reasons why. Why wouldn't you want to put them all together
51:08
So this mostly comes from clean architecture, this entire debate. So let's just give a brief overview of the clean architecture
51:24
You can think of it as a few concentric circles. So in the center, you have your domain, which contains all of your entities and your domain logic
51:37
And then on top of that, you have your application layer, which is supposed to orchestrate your use cases and interact with your domain
51:47
And then in the outermost layers, you have things like persistence, which is where EF Core should live
51:53
So the debate usually comes from the application layer is not supposed to have any external concerns, one of them being the database
52:03
Right. And what people would do is, me being one of them, is create interfaces for various repositories and the unit of work, and then use that interface in the application layer
52:18
and then in the implementation you would use EF Core. And so the argument is okay it easier to test when you have interfaces you can mock them But the counter argument is why would you want to mock your database
52:38
Just run an integration test. Then the other argument people usually say is, okay, but with a repository, I can easily switch my database
52:49
But when do you actually do that? So I've not been coding for that long
52:54
professionally just six years but i've never had to switch a database i have so yeah i mean you
53:02
obviously have been but how many times once i think yeah so that's once in yeah i assume what
53:09
is a very long career long time um so i mean it's an i'd say switching the database is an exception
53:16
yeah and not something that that you should kind of plan for so i mean it comes down to the the
53:24
Yagni principle you ain't gonna need it so so I'm kind of switching from me personally I've been
53:36
kind of migrating from complicating things to making them as simple as possible yes
53:44
so keeping it simple stupid right yes so why not simply use ef core directly right
53:52
Yeah. And my answer to that and why I've been doing it since 2008, basically, is the way I look at it is developing applications is that, you know, when you put your models in the context all in one DLL, that means any layer, any other part of your program that needs those models will also have to carry along with the context which you necessarily don't want, right
54:21
including the client side, right? So unless you want to duplicate your models everywhere
54:27
the best, the way that I, that I even taught my students at the university was
54:32
you know, you should have one assembly. All that's in it are models. That's it. Nothing else. No
54:39
database context, no nothing, just models, right? With the appropriate attributes and all that stuff
54:44
for any framework, but that's it, right? And then you have your other assembly who's just
54:50
the database context piece of it, right? And keep that separate. Because now if you separate your models, right
54:58
you can use those on every application layer you have, including the client side of your .NET, right
55:05
And, you know, the benefit to that is, you know, those models are where I put in all the validation, right
55:12
of the data. And you guys all know that I talk a lot
55:17
about encapsulation, right? And so that's where the validation rules should be typically, not always, but usually in the models themselves
55:28
And so that way you get the same validation on everywhere you use those models and where you might not be using the database
55:37
Yeah, that's the way I've always been doing it and will never stop. You know, and that's why I said I kind of had to brute force it back when before we had code first
55:50
That was not difficult. That wasn't an easy process. But I did it because of those concerns
55:57
Right. Yeah. Yeah. Well, I think we're out of questions and we're just about out of time
56:05
We didn't get to talk too much about your new title. Tell everybody what your new title is
56:11
Oh, the solopreneur thing? Yeah, solopreneur. Explain what that is really quick
56:17
So it's just a fancy name for somebody who is an entrepreneur
56:22
and is doing kind of a one-man business. So that's something that's been appealing to me
56:32
And I was trying to figure out how to make that switch
56:37
and it turned out that talking about .NET online is a pretty good career for a solopreneur
56:47
So I'm excited kind of to be able to commit all of my time to this
56:53
because I have so many ideas for how I can help the community even further
56:59
and kind of I'm excited to reveal kind of what I've been working on
57:03
in the coming weeks and months. Yeah. I wish I had your job
57:10
Maybe that's what I need to do, but I need to figure out how to do it. That's one of the reasons I follow you because that seems appealing to me
57:17
So I want to learn from you too. So it's the way it works in this world
57:21
We all help each other, right? All the good developers help each other
57:25
That's what you experienced with the MVP program, right? Absolutely. So last question before we go
57:32
And it's the last question I ask all my first-time guests. And so besides coding, you know, what do you do for fun
57:39
Oh, so I've been into sports most of my life. So that's something I enjoy
57:48
Recently, I've been doing a lot of cross country running. So that's one thing
57:56
I also enjoy reading a lot. I love playing chess. my late grandfather taught me how to play and my main kind of occupation with chess
58:10
while I was growing up was trying to beat him of course and I eventually managed to do it
58:19
but he he will still give me a hard time of course he's a grandfather you can't beat me you're a kid
58:27
I have grandkids now, so I understand. Well, you know, thanks so much for being on the show
58:35
I've really enjoyed you being on and maybe have you back on soon to talk about your new
58:40
career path because we didn't really get to talk about that. And I also want to tell you that if
58:49
you want any help or ideas with the MVP program, please feel free to reach out and contact me
58:57
I'm more than willing to help. And I want to ask from you, if there's any conferences in your area, let me know so I can apply
59:04
Because I want to go as many conferences in many different countries before I'm done with this job
59:11
And if you want to hang out after the show, we can talk. But I know it's late there
59:17
So what time is it there, by the way? So it's close to 7 p.m
59:23
Yeah. Yeah. So you have other better things to do. Like I'd be watching Netflix
59:27
Right. I just got done watching. Going to unwind and relax a little today
59:32
Yeah. Yeah. Last night after I came back from the concert, I watched the last episode of Cannery Row
59:39
So if you guys haven't seen that, it's pretty. If you're into like sci-fi, like fantasy things, you know
59:46
it's really good. It stars Orlando Bloom and some other actors you've seen
59:51
I can't remember her name. But it's a pretty good show. Could you repeat the name for me again
59:55
Yeah. That's called Cannery Row. All right. I'll check it out. Yeah, the second season just came out
1:00:03
The last season will be next year. And it's a pretty good show. I like it
1:00:07
So thanks so much. I can't wait to have you back on the show again. And I hope you enjoy the rest of your weekend
1:00:13
Thank you, David, for having me. I'd love to come back in a few months' time
1:00:18
Sure. Because some exciting things are going to happen in that time span
1:00:22
And then we'll have a lot to talk about. Sure. Just reach out to me
1:00:27
I'll book you on the show. Sure. Okay. Thanks a lot. Thank you
1:00:32
Well, that was a great episode. All my episodes, I think, are great
1:00:37
But, you know, I like meeting new people and getting to know new people
1:00:41
And it's one of my favorite things to do. And so getting to know Milan and what all he's up to
1:00:47
and especially since he's a new MVP, for me, it was interesting to talk to him about all that
1:00:53
So I hope you all found it interesting. I got a lot of questions this episode, so that's a good sign, I think
1:01:00
Or maybe those are all his friends. I don't know. But that was great
1:01:04
So I can't wait to have him back on the show again. So, you know, we still have to think about the Ukraine, unfortunately
1:01:11
So this terrible thing is still going on there. And so if you can help out with any way you can to help, you know, the people there, please do so
1:01:23
um you'll you know you'll be a special part of my heart if you do because you all know i i loved
1:01:31
visiting the ukraine i want to go back and and uh we got to get this thing over and move on and and uh you know I have been getting some hits on my website from Ukraine so I hoping some people are doing programming there
1:01:48
But, yeah, let's keep them in our thoughts and prayers. Also, oh, I had a funny thing to show you, but I hit it
1:01:59
I didn't unhide it. Oh, well, I'll show you next month. Yeah, next month. So every week I ask you all to help me help the kids in India by going to that URL or going to voiceofslum.org
1:02:14
You know, this is a video from when I visited there last October. And you all know I raised money for them
1:02:20
And hopefully we'll, you know, work that into the Code Quality Conference too somehow
1:02:25
But please go help the kids there. You know, Dave and Chandy do an awesome, there they are. They do an awesome work for these kids from the orphanage, from the slums in India. So if you can go help them out, then I would definitely appreciate it. But they, of course, the kids will appreciate it a lot more
1:02:47
All right. So because of some scheduling things with Simon, my producer, the next show isn't going to be till April 15th
1:02:56
We're going to have Barrett Blake. He's also a Microsoft MVP and Azure Solutions Architect
1:03:01
So that'll be a fun. So if you want to if you have your Azure questions, wait till April 15th
1:03:07
Oh that tax day here in America And we get them answered for you there please be safe listen to your medical professionals about COVID or whatever else is going on in your area of the world Listen to your medical professionals and
1:03:22
the scientists. I was curious about COVID because they don't really talk about it on the news much
1:03:29
right now. And so the other day when I was getting acupuncture, I asked my
1:03:35
acupuncturist, I go, are you having patients still getting COVID? And she goes, oh yeah
1:03:41
within the last couple of weeks, I've had two patients out with COVID. So it's still here. So
1:03:45
please be careful. I want you to come back on the show. And also, I'll be doing this tomorrow
1:03:53
Please donate blood at your local blood bank. All the blood banks are in the shortage, at least in
1:03:58
America, and they need your help. It's easy. It's free. It doesn't cost anything but about a half
1:04:04
hour of your time. And that one donation can help up to three people, right? And if you're looking
1:04:10
to lose a little weight, one donation burns 1,200 calories. You can have a really big lunch
1:04:17
afterwards. That's what I do. I go next door to my favorite sushi place and reward myself with
1:04:23
some sushi after I spend two hours. I'd spend two hours on a machine. You only need to spend 30
1:04:29
minutes and, and help someone else because someday you're going to need that blood. So guess where
1:04:35
that comes from? People like me. All right. Thanks everybody for watching the show. I'll see you in a
1:04:43
in a little less of the month with Barrett. And if you have any ideas, questions, please email
1:04:49
email me at rockinacoldworld With that have a great rest of the weekend See you later
1:05:21
Thank you
1:05:50
Thank you
1:06:20
We'll be right back
#Windows & .NET


