I always encounter these 2 words.
I know that when you are talking about domain model you are talking about objects.
And persistence layer is a layer you store your data, eg. MySQL database.
But could someone explain these words more thoroughly?
Why is it called domain? Why persistence?
Thanks!
It's called domain, because the definition applies.
For details on the Domain Model, read the wikipedia and PoEAA definitions.
For example, if you were building software to handle air traffic control, air traffic control is your domain. How you model this using your objects is your domain model.
As far as persistence, again the definition explains it all. The persistence layer is where you store your data, but you already know this. This term is used because it's agnostic. Not all data is persisted in the same manner -- some use databases, some use XML, some use a remote service.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With