There's a lot of focus on microservices these days--everyone is refactoring monolitic applications into platforms built on microservices architecture or creating microservices to attend to new business needs. But though virtually every business has decided to migrate toward microservices architecture, not everyone has decided how to do so.
In this post, I will try to show why ASP.NET Core is a wonderful web framework for creating applications in microservices architecture. We will not discuss why microservices architecture is superior or which specific language or platform should be used since each development team should be free to choose the language or platform that best suits their needs.
We'll assess the merits of ASP.NET Core using the following criteria:
One of the most critical factors of microservices is that it should not be attached to a specific language or platform. Although the classic version of .NET was limited, now any code written in ASP.NET Core can run in Mac, Linux, and Windows. This is a significant development.
You can put your ASP.NET Core application inside a container like Docker. This isn't a new feature, since the classic version allowed for containerization, but the new version renders a much better image much more quickly.
Taking a quick look at recent benchmarks related to ASP.NET Core, you can see that its performance is only improving since it launched.
As this post is being written, the latest version of ASP.NET Core is 2.1, which is much more stable than version 1.0. In the beginning of 2017, when version 1.0 was launched, many features weren't yet completed, the support from the database connection was poor, and .NET Core looked like a beta product with great potential. Since then, the framework has improved a lot: libraries like NHibernate now support ASP.NET Core, its module performance has improved greatly, and the platform is much better and more stable overall. You can read all release notes for each version here.
With ASP.NET Core, developers are free to choose which IDE is the best fit for them. Using Microsoft Visual Studio isn't mandatory. If they prefer, developers can use a free IDE like VS Code to create their application in microservices architecture.
Command Line Oriented:
ASP.NET Core makes it possible to create, compile, run, and deploy from a command line.
Easy to Start:
Using a simple command like "dotnet new webapi," you have a scaffold for your microservice.
ASP.NET Core is completely compatible with K8s so that you can take advantage of all its features and scale your microservices easily.
Best of all, ASP.NET Core is a free, open source, cross-platform framework that you can download and start within minutes. You can check it out here. If you try it, you won't regret it!
Marcus Vinicius Guedes
Marcus Vinicius Guedes is a Software Engineer at Avenue Code. He has been a software developer for 20+ years. He is the proud father of a six-year-old girl, likes to learn new things, and thinks the best way to learn is by doing. He also likes to cook.