在網站上存儲數據並訪問數據

[英]Storing Data on and accessing data from a website


This is a total noob question. Sorry in advance if it is vague, but I'm looking for advice on how to start out. I have an app that I've developed that interacts with a local sqlite3 database. Everything works great, insofar as the data is local. Now, I want to move this data away from the local device and onto my website so that the app has to call out to that URL to get/set this data.

這是一個完全不可解的問題。如果是模糊的,請提前說聲抱歉,但我正在尋找如何開始的建議。我開發了一個與本地sqlite3數據庫交互的應用程序。只要數據是本地的,一切都很好。現在,我想把這些數據從本地設備移到我的網站上,這樣應用程序就必須調用那個URL來獲取/設置這些數據。

What topics should I be looking into? I need to understand how to 1) house this data on my website, and 2) modify my app to interact with it. Again, sorry if this is vague - just looking for topics to begin my search.

我應該關注哪些話題?我需要了解如何在我的網站上儲存這些數據,以及如何修改我的應用程序以與之互動。同樣,如果這是模糊的,抱歉——只是尋找話題開始我的搜索。

Thanks!

謝謝!

EDIT: I'm finding lots of resources out there that describe how to retrieve data FROM the site. What I am really spinning my wheels on is how to modify data stored on a site. This is back end data. No one will ever see it directly. JSON format sounds like the way to go, but I don't know where to look for ideas of how to update this data after a user initiates a change from the app. I need to update the data on the site, not just on the local database. Thanks again!

編輯:我發現有很多資源描述如何從網站檢索數據。我真正關注的是如何修改存儲在網站上的數據。這是后端數據。沒有人會直接看到它。JSON格式聽起來像是一種方法,但我不知道如何在用戶啟動app后更新這些數據。我需要更新站點上的數據,而不僅僅是本地數據庫上的數據。再次感謝!

2 个解决方案

#1


1  

JSON JSON JSON! JSON is awesome, and is IMO the easiest way to communicate between the web and any other platform. You can look here and here for more info on the android side. Depending on what platform you are using for your website, there are many awesome libraries to help export your info to JSON. Happy Coding!

JSON JSON JSON !JSON是非常棒的,在我看來是在web和其他平台之間進行交流的最簡單的方式。你可以在這里查看更多關於android方面的信息。根據您的網站使用的平台不同,有許多很棒的庫可以幫助您將信息導出到JSON。編碼快樂!

#2


1  

Check out the Volley library as it will simplify and speed up greatly your network communications (get it here).

查看Volley庫,因為它將大大簡化和加速您的網絡通信(在這里)。

You probably want to use JSON to retrieve and send data to your web-service as it is very light and compact.

您可能希望使用JSON來檢索和發送數據到您的web服務,因為它非常輕和緊湊。

An example using Volley and JSON

一個使用截擊和JSON的例子


注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2013/06/24/7828d12bf77a93ae38ac2e3b989d1108.html



 
粤ICP备14056181号  © 2014-2021 ITdaan.com