Search code examples
asp.net-mvcrestasp.net-core-mvcmicroservices

In our microservices app, should we replace Angular with ASP.NET CORE MVC?


Our team has decided to implement Microservices. Regarding the front-end we decided to use Angular. With Angular the learning curve can be cumbersome and a working experience in Angular is a must for large application. Our team never working with a front-end framework like Angular and to avoid any delays in the project delivery date. I was thinking of replacing Angular with ASP.NET CORE MVC to communicate with the APIs.

I have decided to post my question to hear your thoughts on the approach we might adopt.


Solution

  • Backend:
    ASP.Net MVC isn't how you make Microservices, you use Web API projects and they have the Models and Controllers of the MVC, but not the View.

    Typically in Microservices the View you do with a Front-End technology, most commonly JavaScript Web Frameworks (or Mobile Swift, Android, MAUI) that run on the client. These frontends communicate using JSON over REST HTTP calls to the Web API.

    You don't want to package an MVC application as the Front-End to talk to a Web API Back-End.

    Frontend:
    If your company has chosen Angular and no one has experience with it, that sounds like a recipe for disaster.

    If you choose MVC, it's hard to reuse Front-End Components between Microservices like you easily can in React and Angular. The other thing about Angular is its popularity, you're better off choosing React and learning that which has a much easier learning curve and it's simpler to recruit people (you could out source some of this UI work to start while you skill up), plus due to its popularity in-house devs will be more open to learning it to maintain their employability into the future:

    enter image description here