简体   繁体   English

Web Service作为Android客户端和MySQL服务器数据库之间的中介

[英]Web Service as an intermediate between an Android client and a MySQL server database

I am developing an Android client to connect to a database (in my case MySQL server). 我正在开发一个Android客户端以连接到数据库(在我的情况下为MySQL服务器)。 The nice approach is using a Web Serive between them. 不错的方法是在它们之间使用Web服务。

I found some nice reason for it here : Best way to access a remote database: via webservice or direct DB-access? 我在这里找到了一些很好的理由: 访问远程数据库的最佳方法:通过Web服务还是直接进行DB访问?

Elad wrote nice reasons such as complexity and security around this approach. Elad围绕此方法编写了很好的理由,例如复杂性和安全性。 Can you give me some new advice around these approaches and let me know about the source of your ideas, since Elad did not provide any source. 您能为我提供有关这些方法的一些新建议吗,让我知道您的想法的来源,因为Elad没有提供任何来源。

The simplest reason is that a JDBC connection needs to be stable. 最简单的原因是JDBC连接需要稳定。 And mobile connections are not stable enough. 而且移动连接不够稳定。 Thus using an intermediate web service is a good option. 因此,使用中间Web服务是一个不错的选择。 Providing a rest service around some database will provide you with a secure, stable, standard way to access your data. 为某些数据库提供休息服务将为您提供一种安全,稳定,标准的方式来访问数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM