3 ms·
We've hopped on the AspNetCore train a few weeks ago and its been a blast ever since. Just having working Swagger API documentation generation OOTB has been wor
by bob1029 9y ago
We've hopped on the AspNetCore train a few weeks ago and its been a blast ever since. Just having working Swagger API documentation generation OOTB has been worth it for us.
It has the perfect storm of REST API & SPA web app hosting framework features in my mind:
- Annotation and convention based controllers. Binding of headers, body, and query params is so damn easy now.
- Annotation-based Swagger API documentation. It just works if you follow the directions. No need to define metadata classes or any other nonsense. Response types, content types, headers, required properties, etc - its all annotations and its all easy.
- Much better hosting of static content. We love how easy it is to build out a RiotJS SPA web app and backing RESTful JSON API service in one quick stack.
- Flexibility with HTTP hosting: HttpSys, IIS, Kestrel, Roll Your Own, etc.
- Pipeline and extension items are very easy to write now. We actually found it easier and faster to just hand-roll our token authentication pipeline item than to configure an existing provider.
- DI is some intersection of magical and simple. Microsoft's built-in DI provider kicks ass.
- Leverages open-source libraries where obviously appropriate by default. E.g. Newtonsoft.Json as it's the best JSON serializer ever written for .NET (or any language for that matter IMO).
- Can host on Windows directly through full 4.6.x framework for access to DirectoryServices and Drawing or host on top of dot net core for cross platform (sacrificing windows-specific capabilities).
- Windows service hosting features built-in (used to have to resort to TopShelf).
I had to hack in a few things that we liked from the Nancy project (e.g. automatic URLACL setup for HttpSys hosting), but these were very minor QOL items.
I think that every .NET/C# shop should take a VERY HARD look at this stack for any new development. Keep in mind that even though cross platform is marketed as a large part of this, you can reap 100% of the benefits on full 4.6 framework if you still need to operate in that domain.
- mustardo 9y agoSounds like stuff we have had on the JVM (without MS lock in) since ages ago http://www.dropwizard.io/1.2.0/docs/getting-started.html http://www.dropwizard.io/1.2.0/docs/getting-started.html And if you want terser code https://kotlinlang.org https://kotlinlang.org
- manigandham 9y agoIt's a very nicely integrated stack though, and there's no MS lock-in anymore: it's all open-source, you can use VSCode or 3rd-party IDEs to code, and you can run it on Linux.
- fgonzag 9y agoI develop in both. Used to like .Net better before Kotlin. Kotlin came in and converted me to Java. But now, I'm a .net core junkie. The build tools, VS Code, C# itself. I just find it has the perfect mix of features for speedy development. I don't dislike coding in java ever since kotlin, but even with IDEA I just prefer the .net core ecosystem overall.