简体   繁体   中英

.NET SOA architecture

I just started working as an intern and have few architecture understanding question. I apologize this is not the correct place to ask this question.

The application designed here has 2 parts, one UI and one API. The UI App is written on Angular while the API App is designed using C# and .NET Core. The Angular app is making API calls to the API App to fetch data, insert etc. In the API everything is done using dependency injection which is defined in start up class etc. and if I understand correctly I don't see any other design patterns being used here etc. Now what I want to know here what will we call this architecture where API calls for data are made from Angular. Since services are defined in this API project can we call the API project a service oriented architecture. My last question is since I don't see any design pattern used here, is this common practice in .NET core projects to just use dependency injection or if we can use some other patterns here as well.

Sorry again if my question is vague or does not belong here.

As you only have two parts, an API (backend) and a Angular frontend, this would probably be more in the realm of a standard layered architecture (Figure 10-2 in Fundementals of Software Architecture by Neal Ford shows the arrangement you are talking about). It's a variant in that the frontend and backend are decoupled, but probably not enough to call it a Service Oriented Architecture.

In an SOA, you would be likely to see several backend services not just one - you would have multiple distinct API s separately deployed with one or more front end UIs calling on them. In an SOA the API itself is the service... not the individual services defined in a single dotnet project.

The design pattern question doesn't make too much sense to me here... design patterns are simply useful approaches to recurring themes in coding, they are used really on a case by case basis as and when the need arises. For example, in a service oriented architecture, it's probably not uncommon to see an API gateway ( facade design pattern ).

I certainly wouldn't call it common practice not to use design patterns... at least I hope not, I rarely start a project by forcing design patterns in early on, but certainly as the code grows and is refactored. opportunities to use (and benefit from) design patterns always emerge.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM