In a three-layered architecture, where is the DAO pattern located?

385 Views Asked by At

In a three-layered architecture, where is the DAO pattern located? Is it in the business logic layer or in the data layer?

1

There are 1 best solutions below

0
On

I'm not sure that thinking in terms of layering is useful anymore.

We used to have 2-tier client-server, with all the logic in the client and a database running on a server.

We evolved to 3-tier, usually associated with MVC model-view-controller. There wasn't a mention of data access objects in the original Smalltalk MVC pattern.

Now I think view and controller generally go together, splitting rendering of the user interface between client and server. Controllers have business logic and interact with many web and data access services. Data access objects would be used by controllers to deal with data sources. Call that whatever layer you wish.

I don't think of microservices as a layer. Perhaps the usefulness of the concept has diminished.