2

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

Denis Sologub
  • 7,277
  • 11
  • 56
  • 123

1 Answers1

3

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.

Zhannur Diyas
  • 87
  • 1
  • 1
  • 10
  • This is a little less philosophical than my comment, and speaks more to the point of domains in specific scopes. Likely, a much better answer on an exam. Well done! – R. Richards May 26 '17 at 22:43
  • Thank you for answer! Sorry, my English isn't good. I.e. is the domain an abstraction (interface) of a some class set? – Denis Sologub May 26 '17 at 22:48
  • Answer updated. I recommend you to refer to this [question](https://stackoverflow.com/questions/5325836/what-is-domain-driven-design) on DDD. You can also find this explained on habrahabr (specially for you). – Zhannur Diyas May 27 '17 at 08:19