Is there a way to completely disengage from the databases?

For example just on the server to save the variables as global and domestic service as he wants and keeps it.
July 9th 19 at 13:47
3 answers
July 9th 19 at 13:49
For example just on the server to save the variables as global and domestic service as he wants and keeps it.


Global variables are bad. Can use any key-value store.

Is there a way to completely disengage from the databases?


You need a Data Mapper + repository + unit of work. Alas, I don't know of such implementations in JS. There is js data but I'm not sure it will solve your problem. In Java/.NET/PHP world there is solyusheny like Hibernate/nHibernate/Doctrine which all have out of the box but it's not a simple solution.

In General, it is sufficient to "lock" working with databases in some objects repository, which will resolve everything for you, from the outside and you will find that everything is stored in memory.

updated

I remembered the little project: https://github.com/Breeze
July 9th 19 at 13:51
Depends on the volume and complexity of the data. Someone and a text file enough, and if you have a lot of hard structured content it is more convenient and faster database.
the question is not in the structures that keep JSON in mind everything as easy and back. A database is needed that we would not have to resolve the subtleties of working with locks, to resolve the conflict on the record, etc. - Allene_Crona78 commented on July 9th 19 at 13:54
July 9th 19 at 13:53
Why? If you do not want to keep the server, SqlLite to help

Find more questions by tags JavaScriptDatabasesJSON