So, I am fairly new to mobile app developing. Are currently making project documents for a mobile app, and I want some input on what database solution I should use.
所以,我对手机应用开发很陌生。目前正在为一个移动应用程序制作项目文档,我想输入我应该使用什么数据库解决方案。
1) mobile app -> online only -> talking to a database
1)移动应用->仅在线->与数据库对话
2) I Have several webservers up and running (mysql mostly), possible to use?
2)我有几个正在运行的服务器(大部分是mysql),可以使用吗?
So my question is simple :) What solution should I use for my mobile app database. - Setup a mysql database on a server? - Use some kind of cloud based solution? - Any API considurations?
所以我的问题很简单:)我应该用什么解决方案来解决我的手机应用数据库。-在服务器上安装mysql数据库?-使用某种基于云的解决方案?- API considurations吗?
- need to be "best practice" for both android and ios.
- 需要成为android和ios的“最佳实践”。
Any and all suggestions is much appreciated! Thanks all! You are AWESOME!
非常感谢您的建议!感谢所有!你太棒了!
2 个解决方案
#1
2
Tom - If you need data to be available offline without internet connectivity then you should you SQLITE database which comes as part of android/ios.
Tom -如果你需要数据离线而不需要互联网连接,你应该使用SQLITE数据库,它是android/ios的一部分。
If your app saves the data on server which in turn is used by other portal or other devices (sharing) then consider storing data via web/server and mysql database.
如果你的应用程序保存了服务器上的数据,而服务器上的数据又被其他门户或其他设备(共享)所使用,那么可以考虑通过web/服务器和mysql数据库存储数据。
So really it depends on the usage and sharing requirements. Storing data locally has much benefit because it is faster, no network required, data always available, and not using network also increases battery life..
这取决于使用和共享需求。本地存储数据有很多好处,因为它更快,不需要网络,数据总是可用的,不使用网络也会增加电池寿命。
#2
4
Tom,
汤姆,
The most common solution for this problem is:
对于这个问题,最常见的解决方案是:
1) Your application get data via a webservice in your server. You can use Soap solution based on XML communication, or simple REST access (simple http request in GET or POST method) and use your own choice: XML or JSON. Today, there is a lot of solution based on REST GET/POST with JSON file communication.
1)应用程序通过服务器中的web服务获取数据。您可以使用基于XML通信或简单REST访问(GET或POST方法中的简单http请求)的Soap解决方案,并使用您自己的选择:XML或JSON。现在,有很多基于REST GET/POST和JSON文件通信的解决方案。
2) After, if you want that your application can turn in offline mode or just be more reactive, you can store old loaded data by webservice in local database. For this, in Android you can use direct access to sqlite database, and in iOs, you can use the CoreData api.
2)之后,如果你想让你的应用程序可以在离线模式下运行,或者只是变得更加被动,你可以在本地数据库中通过webservice存储旧的加载数据。因此,在Android中,您可以直接访问sqlite数据库,在iOs中,您可以使用CoreData api。
Hope it help you.
希望它对你有所帮助。
Fabecc.
Fabecc。
#1
2
Tom - If you need data to be available offline without internet connectivity then you should you SQLITE database which comes as part of android/ios.
Tom -如果你需要数据离线而不需要互联网连接,你应该使用SQLITE数据库,它是android/ios的一部分。
If your app saves the data on server which in turn is used by other portal or other devices (sharing) then consider storing data via web/server and mysql database.
如果你的应用程序保存了服务器上的数据,而服务器上的数据又被其他门户或其他设备(共享)所使用,那么可以考虑通过web/服务器和mysql数据库存储数据。
So really it depends on the usage and sharing requirements. Storing data locally has much benefit because it is faster, no network required, data always available, and not using network also increases battery life..
这取决于使用和共享需求。本地存储数据有很多好处,因为它更快,不需要网络,数据总是可用的,不使用网络也会增加电池寿命。
#2
4
Tom,
汤姆,
The most common solution for this problem is:
对于这个问题,最常见的解决方案是:
1) Your application get data via a webservice in your server. You can use Soap solution based on XML communication, or simple REST access (simple http request in GET or POST method) and use your own choice: XML or JSON. Today, there is a lot of solution based on REST GET/POST with JSON file communication.
1)应用程序通过服务器中的web服务获取数据。您可以使用基于XML通信或简单REST访问(GET或POST方法中的简单http请求)的Soap解决方案,并使用您自己的选择:XML或JSON。现在,有很多基于REST GET/POST和JSON文件通信的解决方案。
2) After, if you want that your application can turn in offline mode or just be more reactive, you can store old loaded data by webservice in local database. For this, in Android you can use direct access to sqlite database, and in iOs, you can use the CoreData api.
2)之后,如果你想让你的应用程序可以在离线模式下运行,或者只是变得更加被动,你可以在本地数据库中通过webservice存储旧的加载数据。因此,在Android中,您可以直接访问sqlite数据库,在iOs中,您可以使用CoreData api。
Hope it help you.
希望它对你有所帮助。
Fabecc.
Fabecc。