Server based database with Onsen/Monaca



  • I’m looking for advice if it is possible to use server based database with the onsen/monaca framework? I know Monaca has its own backend database that can be utilized; however, I intend to not have my project’s database cloud based.

    Initially, I would have used mysql or mongodb if I was working with Php/javascript, but given I want to make hybrid phone app using onsen/monaca, I don’t know if I can go the same route. I’m new to onsen, and I am still learning.


  • Onsen UI

    @rager58 If you don’t want to have a backend and like MongoDB, perhaps you could have a look at LokiJS. Otherwise, things like SQLite are of course compatible as well.



  • Thanks for the reply, Fran. Much appreciated. I’m sorry but the solution you offered to my problem, LokiJS is only browser based database. (slightly gave it a quick read, sorry if I missed something)

    Maybe I’m not using the correct terminology here for what I really want to accomplish, but in general, I just need an external database (which is compatible with Onsen UI) where I can store and retrieve data from a server based database (installed on raspberry pi); for example, Mysql, AWS etc.



  • @rager58 Excuse me for how I say this, but I think you misunderstand how Onsen works. Onsen is simply a UI framework or in short, a very fancy collection of html, css, and JS. It is compatible with any database you use. You would need to utilize JS to connect to some server-side language like PHP that would actually connect to your remote database. Hope that helps! :smile:

    Local databases, on the other hand, have to do with the target device and phonegap than Onsen. The most common plugins support SQLite.


  • Onsen UI

    @rager58 Oh, I misunderstood. I thought that with “cloud based solution” you meant general backends. Well, as @munsterlander says, Onsen UI has nothing to do at all with the database. You can use Mongo with Node.js, MySQL with PHP or whatever combination you prefer.



  • Thank you, @munsterlander and @Fran-Diox. I just wasn’t sure so I had to ask. This clears it up. Thanks again. =)


Log in to reply