You've successfully made me wanna touch building APIs. I have always been avoiding them and sticking to my area, which is building libraries and now code analyzers, but the simplicity of properly building a functional API appeals to me like it's never done before.
@dsvechnikov3 жыл бұрын
That's simple until you get to authentication, authorization, validation and other stuff that must be implemented in 99% of real production applications
@johnnyt.25233 жыл бұрын
I started watching your other series where you created the api in the old way, and I didn't really understand how it worked(coming from Django, java). It was the most professional and well structured series I've ever seen! Hope you make a more beginner friendly series explaining the C# and architecture used.
@okbrown3 жыл бұрын
Beautiful!!! This makes me so happy!! (Says the NodeJS Developer in me!!)
@cethrivias3 жыл бұрын
Amazing! I think that this is a great entry point for somebody who just wants to try to write some basic api in dotnet
@bennymountain13 жыл бұрын
Cool! Now I need to know even less stuff to do my job!
@Lyokou3 жыл бұрын
My mind is literally blown away. My biggest frustration with C# is how verbose it is compared to PHP, JavaScript, and Python, and the compiler on change, so annoying. This really makes me want to use now, so excited to play with it.
@cembobiohazard77792 жыл бұрын
short and sweet. Thanks man 👍
@peymannaji3 жыл бұрын
Thanks for the video, I think one of the good use cases for this feature would be creating a mock server or a test API, otherwise I still would choose the old approach for production.
@davidpereira53032 жыл бұрын
Really well explained, thanks👌!
@mohamedsalah3243 жыл бұрын
Your videos helps a lot thanks for the great stuff
@rockymarquiss83273 жыл бұрын
Nice.. Thank you for your demonstration!
@alexvanheerden57023 жыл бұрын
1. This was amazing 2. Seeing you use Visual Studio was quite jarring 😜
@StephenBeale8 ай бұрын
A helpful video, as always, but when I follow along, why does mine need using statements and yours does not? I am using a .NET 6 console app project type - I can't see any icons in any project type that match yours. What type of project are you using? And even when I do add the suggested using statement for Microsoft.Graph.Models, the same builder function is not available. Any help/clarity would be much appreciated. Thanks, Steve
@darianferrer3 жыл бұрын
At first I thought it would change dramatically how we structure a project, but on second thought, I think it won't change too much actually (at least for microservices): following your example, I would have a static class CustomersApi, with static methods GetAll, GetById, etc that will be passed to app.MapGet, etc. That way testability for the new "controller" is easy to do, and the rest of the code can be organised in the same way you are used to.
@nickchapsas3 жыл бұрын
That's exactly it. And the cool thing is that this type of routing is more performant than Controller routing so you also get a free performance boost for virtually minimal (no pun intented) change
@lolyasuo12353 жыл бұрын
@@nickchapsas If im not wrong you could use Configure > IApplicationBuilder app to have routing in Startup.cs. I don't know what is happening in the behind, but you always could do this. Ofc the new approach is much cleaner...
@darianferrer3 жыл бұрын
@@lolyasuo1235 you are right, it's almost the same thing, but with this new style you get DI by default for example, in the old style you only get the http context (though you can get the service with that) and the configuration here is smaller (lots of defaults of course). The point is, it's great for teaching, PoC, even microservices in real live if defaults are enough
@davidfowl3 жыл бұрын
@@darianferrer It's the same tech under the covers and it's as capable as whatever you were using in the past. This new API is a cleaner way to remove boilerplate for common scenarios.
@darianferrer3 жыл бұрын
@@davidfowl I agree, seems to be built in what's already in .NET Core, but I was thinking for big monolithic apps which can have lots of controllers, I would still prefer the routing attributes, but that's a personal choice and probably very influenced by me not using this new style yet :D I will still try it because 99% of the time I work with microservices and this seems very good for that
@katsmike8533 жыл бұрын
Hey Nick, I was wandering, how would you go about enabling authentication/authorization on this type of an API web app ?
@nickchapsas3 жыл бұрын
It's the exact same as in normal MVC. It's just that instead of having to configure it in Startup.cs you can configure it with builder.Services.AddAuthentication() and app.UseAuthentication()
@codeme8016 Жыл бұрын
@@nickchapsas Hey there, how would you apply [Authorize] to a single controller endpoint?
@sky_walker_3 жыл бұрын
Which usings and dlls i need? I dont find the webapplication class.
@StephenBeale8 ай бұрын
ditto
@Mirko_G.2 жыл бұрын
Thank you Mom Microsoft ! We truly love you ! I will try some spikes with Soc
@basitameen61563 жыл бұрын
can you do a series on architectural and design patterns for microservices stack
@saadbinsami48013 жыл бұрын
Hi Nick, Can you please do a comparative analysis on Memory and T [ ] ?
@rosspovey18693 жыл бұрын
LOVE this! Thank you!
@lardosian3 жыл бұрын
Cool, gonna wait till November, knowing my luck I would mess things up with preview versions etc!!
@TransparentWorld12753 жыл бұрын
Is there any advantage to building APIs the older way, besides having more (possibly) organization?
@morgadoapi44313 жыл бұрын
Nick or anyone else correct me if I'm wrong or agree with me. I would see how this is useful for a prototype or very simple application. Introducing this new way of writing APIs in an ENTERPRISE setting comes with a couple of drawbacks. 1. Your developers have to learn new skills to do what they already knew how to do with the conventional way 2. You should build your prototypes as closely to production ready as pragmatically possible, the code should be as close to the existing architecture as possible 3. You lose testability, then again this is not intended for business logic applications only CRUD and manual testing on small endpoints is ok 4. You have limited extensibility because of a simplistic architecture 5. Security has to be simplistic you lose flexibility in this aspect If you keep these things in mind you will have a great time with Minimal APIs.
@nickchapsas3 жыл бұрын
Check my “in defence of minima apis” video
@vert3cx3732 жыл бұрын
Thanks Nick!
@JesseUnderscoreMartin2 жыл бұрын
Hi Nick, at 14:00 it sounds as if you mentioned that this can do 800,000 requests per second. Do you have more information about this, or a source? I may be misunderstanding something. I've been looking at Node vs Go REST benchmarks and they're all in the 4,000-10,000 request per second range.
@nickchapsas2 жыл бұрын
They are plain text responses, Maria Nagaga’s (Microsoft) demo had that slide
@JesseUnderscoreMartin2 жыл бұрын
@@nickchapsas Got it, thanks Nick! And thanks for the vid!
@JesseUnderscoreMartin2 жыл бұрын
20:00 in this video (kzbin.info/www/bejne/Z5XEgHd8pZurrNU) if anyone else is interested, that's a pretty big increase!
@MaxPlayle3 жыл бұрын
10:20 @Nick Chapsas How would I interact with the Query String using this method? Thanks in advance :)
@romafedor25903 жыл бұрын
Nick please do something with monitors/timeout monitors ! Thank you!
@EduardoAG3 жыл бұрын
9:20 I guess you can use Global Usings and move the usings on a single separate file
@ronaldoperes12023 жыл бұрын
How to create a minimal API folder structure? I don't see the "public static void main()" What template do you use in Visual Studio?
@nickchapsas3 жыл бұрын
No template. Just a blank console app. public static void isn't neede anymore. It's just infered in the Program.cs
@ronaldoperes12023 жыл бұрын
@@nickchapsas ok, and is that only for Dotnet core 6?
@jakebradminster709 Жыл бұрын
Excellent, now I can simplify all my 'Hello World' APIs.
@techman67132 жыл бұрын
Hi Nick! Thanks for the video, I have a simple question: is it possible to separate routing to another file, like in Angular?
@nickchapsas2 жыл бұрын
Sure thing
@lollo47113 жыл бұрын
In another presentation for this “new style” - the question if the compiled assembly size will also shrink was answered with NO (which sounded like a pre-compiler that transforms “new style” into “old style” code) @2:11 you say: bitcode gets smaller - but the total size of the compiled assembly remains the same?
@nickchapsas3 жыл бұрын
So that's partially true. The code will get lowered and top level statements and all the cool features will be lowered to the old style which means more code in the packaged version but Minimal APIs the feature, won't get lowered to old MVC style
@lollo47113 жыл бұрын
@@nickchapsas Tnx 4 your answer. Another example came along with no (visible) “void Main()”. How can “void Main()” be made async/sync? Thinking about costs in the cloud (every flop counts;) it would have been really awesome just to start a Web-API with three lines of code - but the code-creator hides a lot of stuff done in the background. So, I would recommend a dotnet-cmd compiler-option to output the fully generated (old style) code.
@nickchapsas3 жыл бұрын
@@lollo4711 You can totally use async in that method. for example if you wanna use the app.RunAsync() method to run the app, you can just to "await app.RunAsync()" and the code will automatically detect it and accept it. Not that it will make any difference in that specific usecase, but it's totally acceptable if you wanna use it.
@AdisonCavani3 жыл бұрын
What's your thoughts about "new" VS Studio 2022 Preview? I think it's a big improvement over the previous one. Everything runs much faster, especially intelliSense and startup
@nickchapsas3 жыл бұрын
At least on my PC it still runs quite a bit slower than Rider. It's just less snappy. It might be something that I can probably configure, plus it's still in preview, but for now, I can't see myself switching.
@djmotion862 жыл бұрын
2022 freezes quite a bit after waking up from sleep
@pabloturnesg3 жыл бұрын
Nick do you or your team ocasionally use linked lists?
@LindenMikus3 жыл бұрын
can you do push notifications with this?
@20windfisch113 жыл бұрын
Will Blazor also use the newer simple API?
@m.wilusz9642 жыл бұрын
How it's possible that '_customers[id];' in GetById don't throw but return null?
@codeme8016 Жыл бұрын
I feel in order to skip every single simple Controller I have to add a lot of extra codes/files in order to achieve the same thing. e.g. validating data. What's the point of using Minimal API now? Am I missing something?
@lukmankazeem21882 жыл бұрын
Dayummmm man, you make it make sense, make sense?
@Layarion3 жыл бұрын
i'll have to come back to this later, kinda just glazing over me right now. is there a more birds-eye view with wireframe examples of what this is about?
@ofc24632 жыл бұрын
What could be the use of this Minimal APIs? For demo/learning or can it be used in production?
@nickchapsas2 жыл бұрын
Can be used in production
@mmaranta7853 жыл бұрын
That is one huge computer you are sitting in front of
@swathivallabhani63202 жыл бұрын
Hi Nick, How can i get data from sql in this concepts?? Do you have any example ???
@nickchapsas2 жыл бұрын
In other videos about Minimal APIs yeah
@paulcappello59313 жыл бұрын
I like this. Reminds me of Perl Dancer
@pavanchandu61723 жыл бұрын
what about Swashbuckle and swagger injection in the simple API? Is it feasible
@nickchapsas3 жыл бұрын
I should have shown it. It's the same thing as the full api. You need to add the swagger gen and the middleware with app.UseSwagger() and app.UseSwaggerUI()
@ripple1233 жыл бұрын
you can check out a dotnet standup with david fowler and others about minimal apis where they go into more detail about this new approach
@parlor31153 жыл бұрын
I kinda knew this would happen since they started to refer to dotnet application as "app". Also, isn't that a C# script. Like there are no using statements and all.
@nickchapsas3 жыл бұрын
This is just C#, not C# script. They changed it so a lot of using statements can be automatically infered without the need to be explicitly stated
@godfather7695 Жыл бұрын
If your api have just one function it is very good, but if you need make som checks or you have n layer architecture...🤔
@megaman20162 жыл бұрын
Where is the port defined?,
@snokzor3 жыл бұрын
Pretty cool stuff. How is this so much faster tho?
@nickchapsas3 жыл бұрын
It’s doing less
@naveenmishra17782 жыл бұрын
my question is, can a Minimal APIs concept be used in large complex applications
@Vastlee3 жыл бұрын
The evil twin Tom Chapsas!
@Morzelius Жыл бұрын
How those APIs can be used in a real-world project? I mean, it looks fancy on a tutorial. But I don't see how the program can be structured on a large project.
@Maric183 жыл бұрын
tbh the simplest way i have seen to build apis is python-flask but this is cool as well :D
@ortundgaming9673 жыл бұрын
What project type am I using for this? dotnet new webapi dotnet new web dotnet new console dotnet new classlib You didn't show D:
@davidfowl3 жыл бұрын
dotnet new web
@JohnZakaria3 жыл бұрын
Nothing beats fastapi in its simplicity
@nickchapsas3 жыл бұрын
Looking at their hello world example, it looks longer
@JohnZakaria3 жыл бұрын
Well you get free swagger UI. Type checking in python too.
@shreyasjejurkar12333 жыл бұрын
@@JohnZakaria nothing comes as free. Swagger ui is there in here as well, but it's option for developer to have it or not.
@obinnaokafor62523 жыл бұрын
@@JohnZakaria C# is strongly typed. Lol
@goodoleme7472 жыл бұрын
Simple in Go as well.
@hasan-ceo3 жыл бұрын
Awesome! Do I need to map all my 100+ end point in single file?
@davidfowl3 жыл бұрын
You can if you want to sure, you can also use methods.
@nickchapsas3 жыл бұрын
Several people asked this. On Tuesday I will be publishing a video that shows how you can structure a minimal api in a more elegant way. These videos are supposed to show you how things work and how to get started. You should never think that this is all there is to it and that’s true for things outside of minimal APIs too
@joe-sydney-au2 жыл бұрын
Can you please show a more complicated example, where the API returns a custom Http Status Code and Message (say, for example 422) and capture it with any client-side library (e.g. the Browser's built-in fetch)? Now that's an idea for a video (if you haven't done one already).
@toebeann2 жыл бұрын
For that, from the handler you would return, e.g. Results.Text("Something went wrong! Oh noes!", statusCode: 422)
@toebeann2 жыл бұрын
Most of the Results methods have an overload which accepts an int representing a status code. e.g. Results.Json, Results.Content, Results.Text to name a few. There's also the Results.StatusCode method which accepts just an int argument and will not output any body in the response, just the status code.
@TonoNamnum3 жыл бұрын
Does anyone know how to access the httpContext in order to add a custom header as a response for example?
@AvgDan2 жыл бұрын
What's the cleanest way to add an API server to a Windows Forms app?
@filipecotrimmelo77143 жыл бұрын
Ow nice, but I want to see it a real small application. This example with customers is just a hello world. But I love the content and see what is new.
@avtargill3 жыл бұрын
Agreed. I'd pay for a course that covered a full app (authentication, database, etc.), preferably with tests.
@godfather7695 Жыл бұрын
I think single responsibility principle is not working here. Class Program must response only one job is to run midleware and application🤔
@Gameplayer550553 жыл бұрын
While you're building a simple APIs, i suffer from problems with tls 1.3 support.
@mahesh_rcb3 жыл бұрын
What else is possible in Minimal API .. Out of curiosity 😅 Most demos have CRUD
@nickchapsas3 жыл бұрын
Well anything really. The reason why most demos use crud is to compare it with how less boilerplate code you have compared to full MVC. The rest is the same.
@antonkomyshan17273 жыл бұрын
Rider doesn't support C# 10 yet?
@shreyasjejurkar12333 жыл бұрын
.NET 6 & C# 10 isn't GA yet!
@CRBarchager3 жыл бұрын
C# 10 is sceduled to be released in November 2021 so no Rider doesn't not support it.... yet!
@MaZe7413 жыл бұрын
800'000 requests a second? thats almost a thousandth of a millisecond, how did you get to this number?
@nickchapsas3 жыл бұрын
It’s the number Microsoft gets in there JSON TechEmpowered benchmarks
@MaZe7413 жыл бұрын
@@nickchapsas I doubt you can even make a db call in that time, please link the source, its just so unrealistic and depends on so many factors like network latency. you sure this isnt "per minute", for example?
@MaZe7413 жыл бұрын
@@nickchapsas also, your demo at 13:14 shows 11ms and 10ms, I dont understand how you would improve this by a factor of 10'000 without some serious scaling solutions like containers, workers or load balancers. There's something else missing here, it cannot just be fastapi by itself working at almost a million requests a second. just nope. And this isnt even connected to a real database yet.
@CrapE_DM3 жыл бұрын
My biggest thing is TDD. So I would create those functions separately to be testable. But yeah, they've got something similar in Kotlin, and I think Java Spark comes close, too.
@Mirko_G.2 жыл бұрын
Me too! Im developing rest apis with tdd and Soc its part of that!
@John_FritzTheCat_Doe2 жыл бұрын
The quickest and shortest API setup you can get is with Python + FastAPI. I'm pretty sure Microsoft has copied that concept (like everything) for their minimal api's.
@nickchapsas2 жыл бұрын
Is it though? FastAPI Hello world is 5 lines of code. Minimal APIs in .NET is 3.
@DiegoNovati13 жыл бұрын
No different from Quarkus, that you can deploy as native or with Java runtime
@nickchapsas3 жыл бұрын
I don't know about that. This looks pretty verbose to me: quarkus.io/guides/getting-started#the-jax-rs-resources
@DiegoNovati13 жыл бұрын
@@nickchapsas The Java code is more verbose than the Kotlin one, but at the same level as the code you have written.
@clearlyunwell3 жыл бұрын
👍🏽
@jcorrify3 жыл бұрын
It's indeed a nice feature for quick work, but I wonder how it will turn out with a real-life situation with a full rest API capability implementing swagger documentation, media types validation, hateoas, authentication, etc... I suspect it will turn into a large unreadable mono file...
@ySomic3 жыл бұрын
It's more as an introductionary for new programmers or people that are new to .NET. Making it easy to be immersed into .NET. which will really propell the framework (and C#) forward.
@davidfowl3 жыл бұрын
Show me your controller with all of those things and I'll show you the minimal API equivalent.
@obinnaokafor62523 жыл бұрын
@@davidfowl ❤️❤️❤️❤️
@FilmfanOliver19923 жыл бұрын
I like ASP Net Core as much as Spring Boot :-)
@KangoV3 жыл бұрын
Nice that you expose your internal database structure through a HTTP interface. If I saw a developer working for me do that, I'd haul him/her over the coals. This kind of example is teachinf developers very bad habits. Oh I just tried this and did it in around 67 lines of Java code.
@greyedout3 жыл бұрын
Where exactly did he expose the database structure in HTTP? I somehow missed that part?
@greyedout3 жыл бұрын
For anyone also wondering, I was being sarcastic. There is exactly nothing wrong with the code and no "internal database structure" is exposed through a "HTTP" interface. What he probably meant is that he is returning the "database models" without using a DTO. Which is out of scope for this video and also I doubt the 67 line Java code has it implemented.
@denis-suleimanov3 жыл бұрын
Well... What if I have a many entities? Controllers - is more or less "strong" structure. And now... microsoft told me "hey! Add all of your endpoints and their handlers to single file".. Thanks, but no. What about multiple attributes (cached, authority, access model..)? Multiline handlers, etc? I think C# is going to wrong path... "divide et impera" isn't?
@nickchapsas3 жыл бұрын
You don't need to have everything in a single file. This can still be "structured" without the need for a controller. Just because those MapGet methods can be in the Program.cs doesn't mean that you can't give them proper structure and move them in a different place. It's more about what you could do not what you should do.
@CRBarchager3 жыл бұрын
Almost any tutorial will not should you the most optimal way of doing things. Just demonstrate a function or a way to do things. Doing it "the right way" will obviously make this video alot longer not having it cramped down into a 15 minute snippet. But Nick gets the meaning out perfectly and it really shows how far .NET have come.
@denis-suleimanov3 жыл бұрын
@@CRBarchager hmm... I don't have any problem with this video or Nick or even Microsoft as a company.. I was saying just about new conception, nothing more.
@obinnaokafor62523 жыл бұрын
Microsoft never told you that.
@CobeinCobein3 жыл бұрын
Looks like nancyfx
@chadiusmaximus93503 жыл бұрын
you are 100% correct. the Nancy devs went on to create Carter which is the successor to Nancy. David Flower and the ASP.Net Core team took alot inspiration for this team.
@miatribe3 жыл бұрын
Now add some security to it.
@void_star_void3 жыл бұрын
I'm of two worlds about this. More like a love hate relationship
@nickchapsas3 жыл бұрын
The great thing about it is that it's completely optional
@lolyasuo12353 жыл бұрын
@@nickchapsas Seems like they have changed all templates to use the minimal api approach. Even console template is 1 line with just Console.WriteLine()... which personally i don't like it. I don't think there is any real use that will benefit from not having main method. Even a student assignment will propably have 3-4 methods for solving the problem... so you will end up manually adding the old main method. (ofc you can ignore main and just add other methods. but i prefer the old style). Minimal api is a good approach for easy and fast web apis but not for other things. My opinion ofc. I don't like the "scriptish" languages. I would prefer the Visual Studio templates to remain the same and just have variations for the minimal apis.
@chriskeo3922 жыл бұрын
FastAPI beats this by a mile
@nickchapsas2 жыл бұрын
In what? Performance? lolno, even on FastAPI's own benchmarks, ASP.NET is faster
@AnonymousDeveloper13 жыл бұрын
I don't like top-level statements stuff and well minimal API seems to be very strange at the first time. It looks like being taken from Express.js which I like however I'm not sure if it's good to have everything in just one file. It only works in "tutorial hello world" videos and not even slightly bigger application. Could you show us example where you don't write everything in Program.cs? Just split the code and make it clean with interfaces, services, configuration, AutoMapper, entity framework core...
@nickchapsas3 жыл бұрын
No one ever said that minimal APIs mean that you should have everything in one file. Check my “In defence of minimal APIs” video
@AnonymousDeveloper13 жыл бұрын
@@nickchapsas Thanks, I'll watch this video soon. Generally speaking I'd like to see examples which don't show everything in just one file. I wish .NET designers, Microsoft and community guys will show easy and detailed tutorials in the future. So many questions, not so many answers.
@luderx3 жыл бұрын
But anyway, who uses Microsoft Java?
@anotherme46383 жыл бұрын
Wait a minute, Is this actually .NET 6 C# ? it feels like python or nodeJS thanks man for the demo.
@bennymountain13 жыл бұрын
They've made it so if you don't declare class and static Main method in a file it generates when you build your app, if that's what you mean. I think this was in since .net 5. Handy for a "hello world", but I haven't used it, honestly.
@stepanhakobyan3 жыл бұрын
The second part of the video shows how to get some unmaintainable code. Enjoy.
@nickchapsas3 жыл бұрын
You don’t have to keep everything in a single file. You can structure it like any other project. The only thing that changes is the entry point and you get routing performance over controller for free.
@twiksify3 жыл бұрын
How would one go about unit testing such an endpoint? As I see it you no longer have a dedicated method, instead you'll have to launch the app in order to expose the endpoint in form of an API call. The lambda can be replaced with a testable method call, however how can I verify that the method is configured for the right API endpoint path as well as that the method isn't falsely being used by another endpoint? Selenium can be used for integration tests, however it'll be rather hard to maintain mocks for unit test of an endpoint which you don't have the entry point context.
@yearlyoatmeal3 жыл бұрын
This guys style and content is absolutely on point but at times the speed with which he speaks combines with his accent in a way that can make it just a little bit exhausting to follow. I wished he would either slow down just a tiny bit, or alternatively try to improve his pronunciation. Not wanting to be rude or ungrateful here!! He's the best C# content source on KZbin imo but that's kind of why I'm taking the time to provide this unsolicited feedback here.. anyways, thanks for all the fantastic free content and insights! Keep it up. 🍺
@nickchapsas3 жыл бұрын
So, this is kind of the double edge sword of this type of content creation. Long videos just dont' get clicked and I have plenty of data to back that up. If I do talk slower, then the video will get longer and it will definately cross that threshold. The majority of the comments I get about the content's pace is positive, mainly because the people who watch my content are intermediate to advance levels. Ofc that means that when I do a more entry level video like this one I will inevitably be too fast for some people, and you're right me accent doesn't help. Ultimately if people think it's too fast, they can use the KZbin speed controls to slow that down. I'd rather have people slow a video down than people speed a video up.
@pilotboba3 жыл бұрын
You can speed up or slow down the You Tube play back. I watch most things like this at 1.5x or 1.75x.
@yearlyoatmeal3 жыл бұрын
@@nickchapsas fair enough!! Yeah I can see that too fast for some is probably better than the opposite. For example Tim Corey tutorials are basically unwatchable due to their mind numbing snail pace. That guy can take a half hour to explain something that should take a minute... Thanks again for providing such great value!!
@zedmagdy3 жыл бұрын
: Am I a joke to you bro?
@obinnaokafor62523 жыл бұрын
--OR-- Console.WriteLine("Hello, World);
@zedmagdy3 жыл бұрын
@@obinnaokafor6252 You just forgot to add .csproj file so it's not gonna work
@obinnaokafor62523 жыл бұрын
@@zedmagdy csproj adds itself
@nanvlad3 жыл бұрын
Waiting for 'import' and 'export' directives to include .cs files into a main module :)
@fulmetalmage3 жыл бұрын
Cute. I can see it being useful for faas or micro services. However i think it will turn into a shitshow in a monolythic api.
@nickchapsas3 жыл бұрын
What I am interested to see is how people will decide to "structure" this approach. It is meant to be really easy to get started but in order to become managable and not violate the principles we like using, it will probably need some grooming.
@Insel033 жыл бұрын
@@nickchapsas I imagine I would create a project per resource/domain where I can pass my app builder into. This new approach really would make it a blast to build API modules. Is there proper middleware support?
@davidfowl3 жыл бұрын
@@Insel03 It supports all of ASP.NET Core, all of the features.
@abdelhaleemalfreihat72613 жыл бұрын
so what is the point? we all know we use .net for enterprise projects not for building hello world applications!, I think .net development team just trying to make it work in all ways and having as many features as possible, I don't like it :)
@nickchapsas3 жыл бұрын
Well that's not true. Enterprise projects doesn't mean big code bases. I am working on "enterprise projects" but I can totally see myself using Minimap APIs for them. Simplifying the entry point and giving a 40% performance increase over the MVC approach is something I just can't resist. It's the thing that the entry point calls that hide the complexity, not the entry point itself. That's why it works.
@lolyasuo12353 жыл бұрын
@@nickchapsas Where 40% performance comes from? is it from the minimal apis approach or from the NET 6 in general? Yea i see a chance for minimal apis in production. You can put em behind some APIM for protection and youre fine.
@nickchapsas3 жыл бұрын
@@lolyasuo1235 It comes from the routing. Controller routing is more complicated and less performant compared to Minimal API routing
@davidfowl3 жыл бұрын
@@nickchapsas Right, it comes from doing less :)
@manuillo943 жыл бұрын
100% of th15:18
@ivancarmenates843 жыл бұрын
All that is good but wring code sequentially like old fashion programming languages like basic doesn't really makes the point, that is just a mess show.
@nickchapsas3 жыл бұрын
Check the followup video
@scryptum3 жыл бұрын
This an Express server style. Copy paste !
@tootytooty51353 жыл бұрын
Lol... 0 improvement other than making it into less code which makes it less readable too.
@AnonymousDeveloper13 жыл бұрын
Yes, very bad decision. I was writing about it but they can't understand.