5 open source .NET projects that deserve more attention

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everybody i'm nick and this is going to introduce you to five open source projects that i believe deserve more attention now there are some rules and i have to lay them down for you first and foremost the project needs to be dotnet related this is a primarily.net channel i want to help my community secondly it has to have around 500 stars on github or less third it has to be free at least on its basic tier and maybe have an enterprise bracket but maybe for big companies then it has to be active because i don't want people to just abandon it so it has to show at least two months of activity and last but not least its main developer has to pay me i'm joking all you need to do is either leave a comment in this channel with your favorite project please don't leave links because youtube will block them so just use the github first bit and second bit the project name to let me know what the project is or message me on twitter linkedin whatever you want just send it over and i will put them in the backlog and make another video like this one if you like a lot of content and you want to see more make sure you subscribe and the certification bell to be dilated when i upload a new video but before i move on let me tell you about the sponsor of this video the ndc conferences now many of you reach out on twitter and linkedin and you ask me hey nick how are you finding ideas for your videos how are you learning all those things you're showing and how can i learn them as well and the answer is always i'm attending conference talks now previously in person now online and hopefully in the future or the very near future in person again my favorite one to attend as a donut engineer or ndc conferences in case you don't know a conference that happened around the globe mostly focused on dotnet but other tech as well and they happen every year the biggest one is in oslo there's one in london which is pretty big there's one in sydney in porto and you can click on their website and the link down below to check them for yourselves now just to understand how influential those talks are blazer was a talk given by steve sanderson in ndc john skitz abusing c-sharp is an ndc talk jimmy bogart's domain-driven design the good parts is talking ndc and the legendary the art of code by dylan bt is also an ndc talk so you can understand how much value you can get out of an ndc conference seeing these experts giving these talks this year i will be in ndc oslo and nbc london so if you want to come meet me come watch these talks with me please click the link description sign up buy a ticket you can also get your employer to buy the ticket for you this is what i've done in the past and let's have a beer so the first project i want to show you is called n bomber an n bomber was made by anton moldovan now i'm gonna destroy pronunciations in this video so sorry if i butchered your name but i do want to put the name forward because i do think the developers should be on the spotlight for working on an open source project now what is in bomber remember a few weeks ago when i made a video about k6 a load testing tool that you write javascript and then a go thing runs it in the background well this package and bomber is written in f-sharp and it is a load testing tool as well and it's really really cool like you can do a lot of the stuff you can do with k6 but you can do all that with net and the cool thing about it is it's technology agnostic meaning you don't have to only load test a web application or a web server you can wire up a database test straight into this and just hit the database without having to go through an http request and then see what your database can do it's really really cool and this is for example how would describe a test where i'm calling the youtube endpoint and accepts the cancellation token over here and then if the status code is good i'm saying okay if it is bad i'm saying fail in the response and i describe a step here and then i have the scenario builder and i describe my scenario using my step so a simple http step here and then i have a warm-up duration for five seconds so for five seconds i'm gonna be firing requests and then i have a simulation of simulations and i'm gonna load one for example this one is inject per second and what this will do is it's gonna send a hundred requests per second for 20 seconds on that api and at the end it's going to collect all the data and show them back to us but let's show all that in action so i'm going to run this api which is in the helpers directory and all it really has is it returns uh a subscriber count this is a static number and then i wanna just load test that endpoint with a hundred requests per second and let's see what that looks like when i go here and all i'm gonna do is we're gonna say dot net run and this has a beautiful ui you can see it updating in real time you can see what step you are in it's going to initialize the client first let me just move this a bit here so i don't hide it then it's going to do the warm up which is what we instructed it to do with the rate we instructed to do so and then it's going to start bombing meaning sending the request in the load mine that will define in the simulation it's going to run for 20 seconds now this is done and as you can see it's collecting all the data it's telling you a few details here which is very useful if you're just looking at the console but what it's also doing and this is really cool is it's generating a report and i can go here and as you can see i have one which is an html file so this i can open my browser let's see what that looks like and this is what that website the report generated looks like it gives you the session name the testing suite you can see some details on the environment so you can see uh how many calls my system have and all that and where i'm from um then you can see all the stats so we had because we run it for 20 seconds we have 2100 requests all okay 105 rps or requests per second and then i can see more details here a latest distribution over time it has some really cool metrics you can see throughput latency hints and all that and what i'm going to do before i move to the next tool is to actually show you what it looks like if you want to spam it a bit more so i'm going to have 16 effectively threads spamming the api in a low testing manner in a stress testing manner to see how it performs so i'm going to go back in this clear it and do dot net run and let's see now how this works so test has started and you see this copies name this is effectively threads so it's going to run for the full 20 seconds and we're gonna see how it performed test is done results are back i won't bother opening the ui again but you can see that all the requests passed and we have almost a million requests in 20 seconds uh through 16 copies think of them as threads and you can see that the total rps request per second was 47 000 pretty good so that's enough for you i mean this is a given for the video but please go and give a start to every single one of these projects if you think they're cool because they can use all the attention they can get moving to the next tool now this is a very interesting one because this tool is not like a nougat package or something you'd have in your ui this is something i personally use a lot and it's called c-sharp rebel c-sharp rebel has 300 stars and it's made by will faqua i'll put in the screen by by this name and look how cool it is all you do is you install it as a cli tool and once you have it you can globally access it so what i can do now is i can enter c sharp rebel mode so how many times did you want to run some quick code but you didn't want to create a console app to do that quick code to see how it evaluates well all you do now is you do c-sharp rebel and you are in that c-sharp rep mode and now i can do things like well write c sharp so console and i have autocomplete look how awesome that is great ui it's using spectre console behind the scenes for the console by the way and then i can do just writeline and hello world looks like this so hello world here you go you just printed hello world and it doesn't stop there you can do var x equals 6 var y equals 9 and then you can do something like console how to complete so cool in the console i cannot believe how awesome that looks i can say um x plus y and i can print 15. so i can run multi lines of code i can run a lot of stuff in here and the reason why i'm raising it is because like i said the use case i always have is i want to run some code though someone said something and i want to evaluate how valid that is real quick so and now i don't have to go through a console app all i do is i have this tool installed and from anywhere i enter this mode and i have all c sharp and autocomplete on my fingertips it's so so cool please go ahead and give it a star the next project i want to show you is called verify verify has 400 stars on github and it's made by simon crop now verify is interesting because you might not know the concept that it tries to tackle but i'm going to try to explain really really quickly so let's say you have the following unit test here you have some repository you want to test and then you want to test the get by id method and you send it to the id that you want to test and then you get some results back hopefully you have them mocked or you have it in like in memory generated or remember restored deterministically and all you want to do is in a very controlled way you want to assert the value from the thing that you're testing and the value that you know from beforehand for example i want to know that aim's name is the person given name in this object and this variable same with variable name and same with any other property that i'm trying to assert so this is your typical unit test and you are certain against something in a very controlled manner now verify is tackling the subject of snapshot testing what is snapshot testing well very quickly you have a form of testing that runs generates some result you look at the result you're like oh yes i'm happy with that result use that as a harness and then every time that test runs again the output of the test is compared to that original thing that you said that looks good and if something changed then the test fails it's way easier to explain when i run this test so what i'm going to do is i'm going to run this test that's what a snapshot test looks like you have some settings because i want to ignore a variable and all i'm going to do is i'm going to test the exact same method the get by id method and i'm going to verify that the person coming back from that is the right one now i haven't run this test before so look how this behaves when you haven't run a test before i'm going to run the test now the test looks like it's failed but actually verify opened this window for me which is effectively a diff compare so this is the file this is the content this is the output of that person object here this thing is in that file now because it's the first time we have to take a look at this and we have to say oh you know what i'm very happy with this output i i think it's great what i'm gonna do is i'm gonna paste it here in this because i verified the output of this test and now from now on since i saved it and you can actually see it here in this verified file every time the test runs again it's going to generate a received.txt and a verified and it's going to compare it against that saved verified your verified one you want to push into version control you want it to be checked in the received one you want to ignore you don't want to check it in in your repository so i'm going to delete that and this is what it would normally look like for me so how does the test now work well if i run it again since i said oh that's a verified file i'm happy with this output i'm gonna run it again and the test now will pass because the file generated which is now automatically deleted by the way is matching myverified.txt now if something changes in my code and if i go in that repository where i have some data and me becomes m or something else changes that wasn't expected then when i run this test again look what happens it's gonna fail window's gonna open it's gonna show me exactly what changed now i come here and i can judge whether this was a regression or this was expected behavior and i need to update the verified file to have the new changes in this case it's not so i'm going to go back close it reverse that change and then rerun the test and hopefully it will pass it's a very interesting concept and i will make a dedicated video on it because i do think it's very interesting and it has many use cases but for now just know that this is a great package go give it a star i can totally see this being usable in a real life scenario next we have fluent docker with around 300 stars made by mario toffee now fluent docker i've shown before in this channel i use it a lot because i'm doing a lot of automation and it's really really handy it allows you to control things like docker services containers use docker compose and all that from c-sharp it wraps around it and why is it so cool well because when i'm running acceptance tests for example or integration tests or some other form tests that requires the website to be operational i have usually a docker file and docker compose and i call that run the test and tear it down all part of my continuous integration workflow an example of that i've shown in this video in my spec flow video when i talked about acceptance testing spec flow has this thing called hooks which is something happening before and after the test and what i'm doing before the test is i'm spinning up docker running the test against a real api and then tearing it down over here by disposing it and actually i'm going to run it just to show you how it works there's nothing running in docker right now so when i click run this will as you can see create the containers using docker compose a database and a web api this is all done with fluent docker controlling uh the docker compose it's really really cool test pass now it's gonna just automatically tear it down i'm not doing anything here and it's gonna dispose it eventually uh yeah exceeded and gone so that's how i'm using it and this is a very quick example of how you can use it you have a user container you sucker compose i have a file here this is going to create a mysql database i can just run this and then it's going to wait for 20 seconds and then dispose it so as you can see now it just created this database you can see it here all running and then after 20 seconds it's gonna tear it down yep gone great so that's fluent docker please go give it a star great project great product long time active highly recommended last but certainly not least we have cap board a new project by patrick's venison the guy who made cake spectre console bunch of other projects and cupboard is a relatively small and niche project and it has to do with mostly provisioning your local environment in a desirable state and how it does it is why it's very interesting now cupboard is fairly new it's only been around for two months and it has 69 stars on github but i'm going to show you how it works so what i have here is a program.cs and then i create my cardboard host and then a builder and then i specify catalog and that catalog has in it manifests so it has some facts for example it checks whether this machine is windows and if it's not then it doesn't run it because this is a windows specific thing by that i mean the specific thing i'm provisioning and provisioning my windows machine that's why it's not supposed to run on linux and then i'm saying use this manifest called chocolaty in case you don't know uh choco is um a way to install things in your pc without having to go through installers it's all console based and once you install that you can install a whole bunch of stuff um and then your manifest looks like this you have an execute method and you say download this partial script to this file that's how you define your manifest then you say set an execution policy so you have elevated access to install things and then you say install something using powershell so you point to the script you give it a name you specify some rules if you want to then you set the policy using the registry key and then you download this install script and then once you have chocolate installed you can use anything that works with chakra for example vs code and then you ensure it's installed and then you're done you say you installed chocolatey so that's how you can define basically anything that you want it has all the basic building blocks to go crazy if you want let me show you exactly how that looks in a fresh machine here on this vm so i've published this exact code and it's all here and all i need to do is say cup or example.exe i'm going to run that and then you see this nice ui and then ask you are you sure you want to run it yes i am and once you say yes you can see exactly what it's going to do by the way uh register your key stuff download the script install chocolaty and then use chocolate package to install vs code so hopefully after this oh and by the way let me just show you this i do not have um these are so white i do not have visual studio code installed here so i'm going to run this and you can see what it's doing downloading this downloading that installing it um let's wait for it to finish so now it's installing vs code hopefully you'll see the little icon pop up on the desktop in the background once it's done installing here you go that easy install chocolatey in this obvious code you can install anything you want using that and now i have this code on this machine ready to run it's very very cool i highly recommend you use it uh the main reason why i put this video is because i do want patrick to keep working on it and make it more flexible um so go give it a star uh make it move past 69 and hopefully this can be a very nice project we can all use to provision our local machines that's all i have to do for this video thank you very much for watching special thanks to my patreons for making videos possible if you want to support me as well you can find the link in description down below leave a like if you like this video subscribe channel like this ring the bell as well and i'll see you in the next video keep coding
Info
Channel: Nick Chapsas
Views: 28,546
Rating: 4.948791 out of 5
Keywords: Elfocrash, elfo, coding, .netcore, dot net, core, C#, how to code, tutorial, development, software engineering, microsoft, microsoft mvp, .net core, nick chapsas, chapsas, clean code, dotnet, .net, .net open source, open source, nbomber, verify, csharprepl, cupboard, cake, spectre.console, fluentdocker, docker, 5 open source .NET projects that deserve more attention
Id: mwHWPoKEmyY
Channel Id: undefined
Length: 18min 6sec (1086 seconds)
Published: Thu Sep 09 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.