douzhoubing2805 2011-02-07 11:47
浏览 46
已采纳

哪个是从数据库共享数据的最佳可行解决方案?

here is my scenario, i am building a web application using PHP and MySQL. basically it is a real estate application. where i would like to share the data among several other platforms and devices, here is i what i intend to do

a) building the web app to be used with the browser using PHP, MySQL, and AJAX. (this will be my server)

b) extend the support and build a desktop application using POKKI.

c) extend the support and build an application for Androids and iOS devices.

d) all data transaction for the app should take place from the web server.

e) basically it will be server client application . where the server will be my web server and the clients will be iOS app, Android App Pokki etc.

i am not a hardcore programmer, although it has been more then 1 year since i started using PHP, and i do understand it to my use. i would like to know the best feasible solution on how to share the data among the different clients(POKKI, iOS App, Android App).

i would like to know.

a) do i have to connect to database directly from the client and access the data? is it possible? is it bad if i go this way?

b) do i have to create a public class with api sign up process? what would be the real scenario if i would like it to make it cross platform.

A Humble request to all of you to guide me on how does this things works. any articles, resources, links that can prove useful to me will also be appreciated.

thank you.

  • 写回答

4条回答 默认 最新

  • douyi3760 2011-02-07 12:07
    关注

    I think you should create an API which allows you to access the database strictly as you want it. Look at the twitter API for example and see how it allows third parties to access their data using simple requests.

    So your site uses the DB directly where as all other applications you want to make will use the API ( which runs on ur web server)

    This would allow you with the flexibility to have control who gets access and who doesnt ( only your own apps or even third parties etc etc) and allows you to build kick-ass applications without putting your actual database at risk.

    Hope this helps!

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog