2个解决方案的优点和缺点是从sqlserver获取数据到Android应用程序? [英] Advantages and disadvantages of 2 solutions get data from sqlserver to android app?

查看:56
本文介绍了2个解决方案的优点和缺点是从sqlserver获取数据到Android应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道2解决方案从sqlserver获取数据到Android应用程序:

1.为您的数据创建一个WebService并通过Android设备上的该Web服务进行连接。

2.使用JDBC驱动程序库

那么2个解决方案的优点和缺点是什么?

I known 2 solution to get data from sqlserver to android app:
1.Create a WebService for your data and connect via that web service on your android device.
2. Using JDBC driver library
So what are advantages and disadvantages of 2 solutions ?

推荐答案

我建​​议最好去哪里用于Web服务方法,而不是从Android应用程序直接连接到数据库。它使您有机会在CPU和带宽要求方面使客户端更轻量级。



通过拆分系统,我们可以更好地控制业务规则如果我们将通过Android应用程序直接连接到数据库来进行其他方法,那么在需要时更改结构将不那么容易。



此外,如果您的企业同时拥有Web应用程序和Android应用程序,那么创建Web服务并从这两种应用程序调用Web方法更好。





希望这个描述对您有所帮助。
What i will suggest is better to go for web services approach rather than connecting directly to database from android application. It gives you an opportunity to make your client more lightweight, both in terms of CPU and bandwidth requirement.

By splitting the system we can get more control over our business rules, the structure of database etc. If we will go for the other approach by directly connecting to the database by android app, it will be not so easy to change structure when required.

Also if you have both the web application and the android application for your business then it is a better idea to create web services and call the web methods from both kind of applications.


Hope this description will be of help to you.


这篇关于2个解决方案的优点和缺点是从sqlserver获取数据到Android应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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