Denis Steinman
Denis Steinman

Reputation: 7799

What does domain mean in the OOP?

I read a book by OOP. And it uses domain term frequently but I can't get clearly what is it in OOP. Is it a namespace?
I found a description for the domain model but I don't sure that is same.
Can a someone explain, pls?
P.S. Book explains OOP paradigmas so it doesn't relate to the Internet terms.

Link to the book

Upvotes: 2

Views: 1124

Answers (2)

arMan .96Dev
arMan .96Dev

Reputation: 11

domain in OOP programming terms, simply means where your Data-end and Presentation-end connect together .in Clean architecture pattern this is where you define your repository/entities/use cases and connect repository to data-repository and entities to models on Data-end of your pattern and use cases to your state management pattern .

I hope this answer help you to understand this concept in OOP .

Upvotes: 1

Zhannur Diyas
Zhannur Diyas

Reputation: 102

Suppose you have an ice cream van. Your domain named entity will contain your ice cream interface and different kinds of ice cream classes.

And suppose you're keeping track of sold ice cream with help of your notebook. That will be your DB domain. In OOP languages like Java you'll have something like dao domain or repository domain, depending on what kind of design pattern you prefer most.

At last, you have yourself, kind of connecting ice cream with your customers. The interface if Ice cream guy and particularly your implementation will lie in something like connector domain.

UPD. Well, you should think towards domain driven design. You put all models, entities in one package and call it model, you can have multiple different interfaces/abstractions and their implementations there, it's not about having a single one, and that's your model domain. You create service package in your root folder and create an operating class to your models - that's your service domain. You create an action domain to operate with methods of services created previously - and that's your new action domain.

Upvotes: 3

Related Questions