views:

97

answers:

2

With the rise of the nosql movement we see different options for storing objects. Are there object persistence patterns that can handle both sql and nosql backends and allow to easily switch between the two?

+3  A: 

The Repository-pattern is a well-known and widespread pattern to map you DAL to you domain-layer.

cwap
Thanks. Googling this pattern seems to lead me to DDD most often of which I don't know much. Looks very interesting and already found some ideas that resonate with the direction I'm going.
koen
+1  A: 

Hello,

In addition to the Repository pattern proposed by cwap, you should also look at the Data Mapper pattern. (Data Mapper). From my understanding, both work together. Repository relies on the Data Mapper when it comes to write or read the object to the database (or other persistance media). It is the data mapper that deals with the specific persistance technology. The Repository on the other hand can remain unchanged even if the repository changes.

FrenchData