mercredi 19 juillet 2023

Service Aggregator In N Tier Architecture Pattern

I develop an N Tier Architecture application

You can see at this link

At there I have an question.

As we know that in classic n tier architecture each service layer consist of many public and private class like that I shared below

enter image description here

This structure can be very complex when project begin to grow.

I implement Service Aggregator to fix this problem. According to this idea this service's each public class can be moved to separate class and cs file.

For example in the given example at above ;

I divided each public class to a different .cs file and I used "ITripServiceAggrigator" in controller side.

enter image description here

And I aggregate this services under ServiceAggregator via interfaces and dependency injection like below.

enter image description here

My question is that Is this approach true or false? Can I implement any different structure at there?

Aucun commentaire:

Enregistrer un commentaire