Documented data abstraction layer for NoSQL (Mongo)?

I am creating a server application that interacts with the world through a RESTful web service and uses MongoDB for storage. As this happens, the web service JSON resources are pretty close to the structure of the BSON documents stored in Mongo.

While I usually use the object-oriented abstraction of DAO to hide the details of the implementation of persistence, this is not entirely suitable in this case, since I really want to make a document extraction from the database based on the query and perform the conversion . Building a graph of the object as an intermediary seems excessive.

Does anyone have any recommendations on an abstraction pattern that matches this account?

Edit: Removed 1 AM-degression only that you are not using abstraction and just using the Mongo driver.

+3
source share
1 answer

The level of abstraction is up to you, your needs and requirements. MongoDB language drivers have different language layers. You decide what you need, not us. We cannot give recommendations without more accurate and detailed information. If you ask a general question, then you will get a general question.

And who gave it +1? For what?

0
source

All Articles