Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is any meaning difference between 'Storage' and 'Repository' in the class-naming conventions?

For example, I usually name SessionStorage but ProductRepository... It is something mental I couldn't explain to myself. Does anybody understand the meaning of suffixes Repository and Storage? :)

like image 802
Alexander Avatar asked Oct 27 '25 06:10

Alexander


2 Answers

I guess there is no difference in that.

Think about naming for a while and you may figure that it might be important to name things containing equal concepts equally.

So if there's no conceptual difference you should go for either Storage or Repository..

like image 187
jrg Avatar answered Oct 28 '25 21:10

jrg


In english...

Repository: a place, building, or receptacle where things are or may be stored.

Storage: the action or method of storing something for future use.

like image 25
Ivan Avatar answered Oct 28 '25 22:10

Ivan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!