How would one create a web application (using Java, C# or JavaScript), which would use NoSQL database as a backend, but with some flexibility to change the backend (for example from couchDB to mongoDB), without rewriting a lot of code.
I assume that it would be best to use some framework, like Spring for Java and Wakanda for JavaScript. If this is the way to go, then please name a few frameworks.
I know that there are great differences between different types of NoSQL databases and I also know that it depends on the problem that one needs to solve. But this is a theoretical question, thus I'd like to get many different options that one could use to solve different problems while having an application with NoSQL "independent" (to some point, for example only between graph based) backend.
Thank you for your answers and time.