从基于移动或浏览器的应用程序连接 MongoDB [英] Connecting MongoDB from Mobile or Browser based Application

查看:20
本文介绍了从基于移动或浏览器的应用程序连接 MongoDB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站使用 Mongo 作为其数据库.我想知道 Mongo 网站上的 Java 驱动程序是否也适用于 Android,因为我读到它不受支持.

解决方案

简单地说,首先将您的 Android 应用直接连接到 MongoDB 并不是一个好主意.

您应该认为它只是另一个 Web 客户端,并为您想要交换或更新的所有数据实现 RESTful 接口.将这些链接视为一种可能性,或者以其他方式推出您自己的界面.>

My website uses Mongo as its database. I was wondering if the Java driver from the Mongo website applies to Android as well because I read that it wasn't supported.

解决方案

Simpy put it's not a good Idea for your Android app to connect to MongoDB directly in the first place.

You should be thinking as if it was just another web client and implement a RESTful interface for all the data you want to exchange or update. Look at these links as a possibility or otherwise roll your own interface.

这篇关于从基于移动或浏览器的应用程序连接 MongoDB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆