如何创建可由 iphone 应用程序访问的服务器

问题描述:

我想创建一个 iPhone/iOS 应用程序,其中包含一项功能,用户可以创建一个单词列表,然后将它们保存到服务器上的帐户中.此外(这一点非常重要),用户可以通过授予其他用户权限与其他用户共享他们的列表.

I a thinking of creating an iPhone/iOS app that would include a feature where one user could create a list of words and then save them to their account on a server. Also (and this is very important), the user could share their list with other users by giving them permission.

所以我的问题是,我该如何创建这样的服务器?现在,我有一台家用电脑(运行 Windows XP,只为我的音乐系统存储数据),我可以用它来托管服务器.我也愿意使用其他在线存储服务,如 Google Drive 或 Dropbox(我不记得亚马逊是否做过类似的事情).但是(我知道这可能会使事情复杂化),但至少现在,我想要/需要坚持使用免费服务/选项.

So my question is, how can I go about creating such a server? For right now, I have a home computer (running Windows XP that just stores data for my music system) which I can use to host the server. I am also open to the use of other online storage services like Google Drive or Dropbox (I can't remember if Amazon does anything like that). However (and I know this may complicate things a bit), but at least for now, I want/need to stick with free services/options.

回顾一下,我正在寻找的主要功能是:

Just to recap, the key features that I am looking for are:

  • 创建用户/帐户(在服务器上)
    • 最终,我可能会[尝试]使用其他服务来登录用户,例如使用他们的电子邮件帐户、OpenId 等.

    我知道这要求很多,但如果有人有任何建议或能让我朝着正确的方向前进,我们将不胜感激.

    I know this is a lot to ask for, but if anyone has any suggestions or can get me going in the right direction, it would be much appreciated.

基本设置如下:

  • 后端:数据库 (MySQL)、Web 服务器 (Apache),带有服务器端脚本 (PHP).
  • 客户端:带有开发应用的 iOS 设备.
  • 通信:使用 HTTP 客户端/服务器模型,使用 JSON 之类的东西进行通信.

这与网络服务器的设置大致相同,但不是提供 html/css/javascript 等,结果将是 JSON.

This is much the same setup as a web server, but instead of serving html/css/javascript etc the results will be JSON.

至于实现登录和用户之间共享数据等细节,这完全取决于您的实现.这不是微不足道的,也不是可以在一个帖子中轻松说明的.

As far as implementing specifics such as login in, and sharing data between users, this is purely dependent on your implementation. This is not trivial, and not something that can be easily stated in a single post.

希望这会有所帮助.