如何在iPhone应用程序中连接到MongoDB?

时间:2022-07-20 03:01:29

now I have an iPhone App and basically I want to exchange data from my database (MongoDB) on a server.

现在我有一个iPhone应用程序,基本上我想在服务器上交换数据库(MongoDB)中的数据。

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!!

原谅我的清白,我是这个领域的初学者......非常感谢你提前!

3 个解决方案

#1


4  

I think you have two options to talk to mongo :

我认为你有两种选择与mongo交谈:

1) Use the rest interface http://www.mongodb.org/display/DOCS/Http+Interface

1)使用其余界面http://www.mongodb.org/display/DOCS/Http+Interface

2) Use Objective-C driver: https://github.com/timburks/NuMongoDB

2)使用Objective-C驱动程序:https://github.com/timburks/NuMongoDB

#2


2  

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.

如果您没有完全依赖MongoDB,请查看CouchDB。它与MongoDB(JSON文档存储)基本相同,但对于Web。它们具有良好的内置REST接口,使移动/服务器环境中的数据库交互非常好。

http://couchdb.apache.org/

#3


1  

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.

除了Sid的选项之外,您还可以构建自己的后端,与mongodb对话,通过REST(使用您选择的语言)进行通信。这样,您可以在后端汇集连接,并避免设备出现连接问题。

#1


4  

I think you have two options to talk to mongo :

我认为你有两种选择与mongo交谈:

1) Use the rest interface http://www.mongodb.org/display/DOCS/Http+Interface

1)使用其余界面http://www.mongodb.org/display/DOCS/Http+Interface

2) Use Objective-C driver: https://github.com/timburks/NuMongoDB

2)使用Objective-C驱动程序:https://github.com/timburks/NuMongoDB

#2


2  

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.

如果您没有完全依赖MongoDB,请查看CouchDB。它与MongoDB(JSON文档存储)基本相同,但对于Web。它们具有良好的内置REST接口,使移动/服务器环境中的数据库交互非常好。

http://couchdb.apache.org/

#3


1  

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.

除了Sid的选项之外,您还可以构建自己的后端,与mongodb对话,通过REST(使用您选择的语言)进行通信。这样,您可以在后端汇集连接,并避免设备出现连接问题。