MongoDB Realm integration with Quasar Framework
-
Can anyone give me idea how can we use MongoDB Realm with Quasar to build mobile app?
-
In order to use mongoDB you have to use a backend(like express) that can communicate with MongoDB.
We use Meteor with a MongoDB database as a backend for our Quasar apps.
I used this Quasar bootstrap as a start: -
@arkaprova realm doesn’t support Cordova/phonegap/ionic yet (it’s planned but no certain release). Prolly look for a sqlite plugin or pouchdb.
-
@dobbel I always found this starter-kit https://github.com/alexandesigner/quasar-meteor puzzling since it:
- It seems to use two different front-ends, Blaze and Quasar (why would one do that?)
- It also uses axios which seems simlarly redundant with Meteor pub/sub through DDP
Could you explain why you chose this one rather than https://github.com/quasarframework/quasar-template-meteor?
I know it also confusing since:
- The top-level app structure does not conform to the Meteor guide app structure
- Nor does it conforms to the folder structure of the example in the Meteor-Vue guide Vue | Meteor Guide (which BTW also does not conform to the Meteor guide app structure to add to the confusion)
- Nor does the folder structure below template/imports/ui to the folder structure below /src in the Quasar app structure guide App Structure - Quasar Framework
but even though I found it bit less obscure than alexandesigner’s.
Thanks!
-
It seems to use two different front-ends, Blaze and Quasar (why would one do that?)
yes and no. With alexander setup you seperate your backend and run Meteor as pure backend( headless) and use Quasar CLI like you normally do. You could use blaze for example if you want some gui at the meteor backend. The magic in all this is the connector package(https://github.com/Urigo/meteor-client-bundler) that will connect the 2 ( with ddp).
The beauty about this setup is that you have 1 codebase( the api folder is the meteor project inside quasar project) and can import code from your backend in your frontend.(like collections)
It also uses axios which seems similarly redundant with Meteor pub/sub through DDP. Quasar (why would one do that?)
You can also choose to use Meteor like a ‘normal’ rest api instead of sockets. In the starter kit I don’t think he uses axios at all.
I know it also confusing since:
About all those point I don’t know what the ‘official’ structure is right now. It has changed a lot over time. Does not really matter since it can be changed easily.
The great thing about using Meteor with this setup is that Quasar CLI is leading so you keep all the benefits of Quasar CLI, you can create SPA, PWA, Cordova ect. All this with the power of Meteor.
If you use the other package you will have to use Quasar in UMD mode and that is not an ideal setup. Using meteor in headless moe will only relieve yourself ( myself for sure) from creating a UI in meteor with blaze or react( Vue is a not a ‘prime’ supported front end library in meteor).
Nor does the folder structure below template/imports/ui to the folder structure below /src in the Quasar app structure guide App Structure - Quasar Framework
Quasar’s folder structure is different because it has changed too.