ocsigen / ocsigen-start

Ocsigen-start: Higher-level library to develop Web and mobile applications with users, (pre)registration, notifications, etc.
Other
75 stars 31 forks source link

How to change the database management system without patching "ocsigen-start" #632

Open moyodiallo opened 2 years ago

moyodiallo commented 2 years ago

Hi. I'm new and I'm coding an app using "ocsigen-start". I'm using another database management system.

Is it a good Idea to Functorize all part concerning the db and create new template where the user is free to choose the database management system.

I think, It's will open some possibilities like having many templates for other DB.

jrochel commented 2 years ago

It might be a good idea, but I cannot say for sure at this moment.

On a related note I'd like to point out that Ocsigen already has some support for parametrising over different database systems. You might want to take a closer look at ocsipersist which offers a simplified interface to (currently) three database systems: PostgreSQL, DBM, and SQLite.

Ocsipersist will however soon be reworked and externalised into its own set of libraries, which will simplify the adding of more DB backends (we plan to release a DynamoDB package soon).