Using MongoDB Atlas with Flutter - mongodb

I want to create a Flutter mobile application and I want to use MongoDB Atlas as a database. Is there a Flutter package available that can help me with that?
If not, is there any other way I can connect Flutter to a MongoDB Atlas Database? If there isn't, what other options do you suggest?
Thank you in advance.

you can use the package mongo_dart, here is the catch in the database URL give URL to your MongoDB atlas database and you will be able to perform all the crud operations as usual. The documentation is pretty well written so you wouldn't have to face any pro

As #JideGuru said, what you'll want is some form of API that you can then make requests to from your app.
i.e. Instead of accessing your DB directly, you'd do something in Flutter like http.get("yourserveraddress.com/getSomethingWithThisNumber/1") using the HTTP package.
I'd recommend looking at something like Node.JS (https://nodejs.org/), which is a runtime for Javascript that allows it to be ran on servers. I'm just getting started with it and for basic CRUD (Create, read, update, delete) operations on my SQL database its been perfect. I'm not a JS developer by any stretch, but it is easy enough to pick up.
You really should never have your database being directly accessed by a client, as that means leaving it exposed on the internet!
MongoDB have their own driver for NodeJS, I've used it with atlas and it seems solid.
(https://mongodb.github.io/node-mongodb-native/)
Hope this helps!

Related

is there any other way to make backend in flutter without firebase

currently, I am using firebase for the backend but is there any path I have to learn to do backend without using firebase since it's limited free
Yes you can create backend with nodejs and connect nodejs with your flutter app. There are plenty of resources for learning how to connect nodejs backend with flutter app
Yes. You can use Python, node js, PHP-laravel.. It depends on the projects. According to the project, you can choose the backend.
"backend in flutter" ? , Flutter is framework in which we use dart programming language so the question is wrong. But perhaps you want to ask something else, which I was also exploring during my initial years.
For realtime database you can use mongo with polling (with or without even any server since you can even poll and crud in database with flutter itself).
For firebase cloud functions you either make your own APIs (with any backend say nodejs , Django , php..) and call them with Cron jobs or use mongo trigger.
For app performance monitoring , you first need to take data from your app itself and then store it in database and then need to make a web panel for showing that data in interactive manner.
Firebase hosting can't be your case so skipping it.
I hope that clears your doubt.
try supabase or rethinkdb + rust

Syncing data between sqlite and mongo using meteor, cordova

I am developing a hybrid Cordova app (but only for Android platform) using Meteor.
App should have offline support, in a way that a user can add objects that are stored offline, in a SQLite database, and after the user connects to Internet, sync the data with server (Mongo database).
Problem is a can't find any solution for synchronisation.
I have looked at GroundDB that provided the mechanism for synchronization I need, but stored data in localStorage which doesn't provide enough storage. In newer versions it doesn't provide sync mechanism, only cashing.
Do you have any suggestions or experience with this type of problem? Any help would be much appreciated.
You could look at LokiJS, which is in a high performance JS database, with features to sync to Mongo.
I haven't used it myself, but from looking at the site, it may do what you need. http://lokijs.org/#/
You can also check out MongOGX which is a Javascript "clone" of mongo for the front end

MeteorJs MongoDB production deployment

I'm new to MeteorJS and I have a few nagging questions.
If these are overly simplistic forgive me. :)
Background: I would like to use this framework to write a mobile app (no web side as of yet) and hit my existing RESTful endpoints for data querying and CRUD.
Since I do not need a database (bc I already have one connected to my other backend) how can I go about removing or turning off MongoDb? I found this SO answer and I remove the meteor-platform but it somehow gets added back in. (Just doing the standard meteor create --example todos)
If I am unable to turn the Mongo functionality off, would there be any downside to keeping it there and just never using it?
Lastly, what happens when I deploy my MeteorJS app to iOS/Android with respect to the MongoDb I was using locally? I assume there is a hole somewhere that I supply a URI to so that that app knows how to get to it? I can't find this place if such a thing exists.
If you do not use any of meteor's server functionality (login, publish, methods) then there is no way for your client application to find out that the server has not been started.
You can safely use HTTP on the client to use your RESTful API.
The mini mongo on the client is pure javascript and does not require a server connection. But there is no easy way to keep data in the mini mongo database without setting up a publish-subscribe link via DDP.
The packages like GroundDB assume there is a server side.
In developing you app, you will have to run the meteor server app in order to be able to serve the refreshed application every time a code change happens.

How to connect to MongoDB in an iPhone App?

now I have an iPhone App and basically I want to exchange data from my database (MongoDB) on a server.
Could you please tell me exactly what I should do?
Forgive my innocence, I am a beginner in this area...Thank you very much ahead of time!!
I think you have two options to talk to mongo :
1) Use the rest interface http://www.mongodb.org/display/DOCS/Http+Interface
2) Use Objective-C driver: https://github.com/timburks/NuMongoDB
If you're not completely tied to MongoDB, have a look at CouchDB. It's essentially the same thing as MongoDB (JSON document store) but for the web. They have a nice built-in REST interface which makes database interaction in mobile/server environments very nice.
http://couchdb.apache.org/
In addition to Sid's options, you can also build your own backend that talks to mongodb, that communicates via REST (in your language of choice). This way you can pool your connections on the backend and avoid connectivity issues from the devices.

MongoDB helper applications

Are there any good applications that people use with the MongoDB database to make it easier? I'm using MongoVUE for looking at the data and querying data. Are there any other apps that I should know about? I'm thinking of using MongoDB from now on.
There's a MongoDB Admin UIs list you might find useful.
PHP Rock Monogo is an awesome web interface for querying that you should try out.
Download rockmongo-on-windows-v0.0.2.rar from http://code.google.com/p/rock-php/downloads/list, unzip the file and run rockstart.bat. Then, login as admin/admin in to the web interface.