How to Structure an Angular + .NET 8 Microservices Project? (MVVM, MVC, Docker, Databases...)
I am working on a credit management project using Angular 16 for the frontend (developed with VS Code), .NET 8 for the backend (developed with Visual Studio), and SQL Server for the database. My supervisor mentioned a general MVC architecture with a backend based on microservices. However, I am confused about how to implement these architectures correctly.
Previously, I worked with MVC, where everything was simple: I just created three folders (Models, Views, Controllers). Now, with Angular (MVVM) and a microservices backend, I don't know how to structure my folders and organize my code.
1-Which folders should I create in Angular (under VS Code) to properly follow MVVM?
2-How should I structure microservices in .NET (under Visual Studio)?
3-Should I use a single database or multiple databases (one per microservice)?
4-Why is Docker everywhere when discussing microservices?
Is it essential for this type of architecture, and how should I integrate it?
I am looking for guidance on properly structuring my project and understanding Docker’s role in a microservices architecture.
7 Replies
Why do you think you need microservices?
The number one rule for microservices is independence
no shared contracts
no shared databases
docker is a player in microservices because typically you're using some form of containers to scale
At some point you'll likely need a unified data model for reporting and sanity, but that's more an ELT process.
Thank you for your response! Do you also have any recommendations on structuring the Angular frontend (following MVVM) and organizing microservices in .NET? I Mean what folders do i create (question 1 & 2)
each microservice is it's own independent solution
but for a singgle microservice something like
angular, I'd look angular's site for best practices I suppose
Thanks a lot! That was super helpful. 😊
You'll find a lot of opinions around this
Check out some .net based github repos
yes i'm doing some research thank you
but can i later check with you if what i did is correct?(for .net)
sure I guess
there's things to do "wrong"
but there's no "right"