从基于移动或浏览器的应用程序连接

从基于移动或浏览器的应用程序连接

本文介绍了从基于移动或浏览器的应用程序连接 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 00:26