Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what does "domain" and "persistence" mean?

Tags:

oop

database

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!

like image 203
never_had_a_name Avatar asked Apr 19 '10 23:04

never_had_a_name


1 Answers

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.

like image 138
hobodave Avatar answered Sep 22 '22 17:09

hobodave