适用于iOS应用程序的后端

适用于iOS应用程序的后端

本文介绍了适用于iOS应用程序的后端类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Swift创建了一个iOS应用程序,该应用程序本质上是拉丁词典.用户可以创建应用程序中未包含的新单词.数据存储在本地的两个SQLite数据库中的应用程序文档目录中.第一个包含应用程序附带的单词.第二个保存由用户创建的单词.

I've created an app for iOS using Swift that is essentially a Latin dictionary. Users have the ability to create new words that aren't included in the app. The data is stored locally in the app's document directory in two SQLite databases. The first one holds the words that ship with the app. The second holds the words that are created by the user.

我希望用户创建的每个单词在运行时上载到服务器,并添加到单词主数据库中.然后,该服务器会将每个传入的条目与威廉·惠特克的话语进行比较,以查看它实际上是否有效拉丁词,然后查看它是否已经在master数据库中.如果它是有效的并且不在主数据库中,则将添加该词.在对master数据库的每个新条目输入之后,服务器将生成一个包含新单词的新SQLite数据库.每次运行该应用程序时,它都会检查StandardData.sqlite文件的较新版本,如果有,则将其下载.然后,将从标准库中删除标准库和用户的自定义库中通用的单词,以防止重复.

I want to have each word created by the user uploaded to a server at runtime and added to a master database of words. That server would then compare each incoming entry to William Whitaker's Words to see if it is in fact a valid Latin word and then to see if it is already in the master database. If it is valid and not already in the master DB, then the word would be added.After every new entry to the master database, the server would generate a new SQLite database that includes the new word. Every time the app runs it will check for a newer version of the StandardData.sqlite file and if there is one, it is downloaded. Words that are common to the Standard library and the user's custom library would then be deleted from the custom library to prevent duplicates.

随着时间的流逝,将创建一个大型的拉丁词库,而无需我从词典中手动输入它们.

Over time a large library of Latin words would be created without me having to manually enter them in from a dictionary.

我对MySQL有点熟悉(当与MySQL工作台一起使用时),但除此之外,我几乎不熟悉当今的Web编程工具:HTML5,CSS,JavaScript,Java,Ruby,Rails,PHP等.我的预算是0 $,理想情况下,我想将服务器托管在自己的硬件上.将后端添加到我的应用程序的最佳方法是什么?

I'm somewhat familiar with MySQL (When using it with MySQL workbench) but beyond that I'm mostly unfamiliar with today's web programming tools: HTML5, CSS, JavaScript, Java, Ruby, Rails, PHP, etc. My budget is 0$ and ideally I would like to host the server on my own hardware. What is the best way to add a backend to my app?

推荐答案

这是一个见解,所以我不确定这是最好的论坛.但是,您有多种选择,包括一些可能完全免费的选择.

This is a question of opinion, so I'm not sure this is the best forum. However you have several options, including some that could be completely free.

您已经提到过,Rails和PHP可用于使用mysql作为数据层来创建后端.如果您对这两种语言都不熟悉,则可以使用众多框架之一来研究Python.如果您的应用程序完全基于iOS,则您可能还会考虑使用CloudKit,CloudKit可以免费使用某些大小的文件(听起来您可以轻松地保持在下面). CloudKit的优点是您甚至不必在自己的硬件上托管服务.还有一些其他类似的选项,包括Firebase和Parse,它们都具有免费层,它们可能会提供您需要的所有存储.

Rails and PHP as you have mentioned can be used to create a backend using mysql as the data layer. If you are new to both of those languages, you might look at Python using one of the many frameworks for it. If your app is completely iOS based, you might also look into using CloudKit, which is free up to certain sizes (which it sounds like you could easily stay below). The advantage of CloudKit would be that you don't even have to host the service on your own hardware. There are a few other similar options as well, included Firebase and Parse which both have free tiers that likely would provide all the storage you need.

使用这三种方法中的任何一种,您都可以在iOS项目中迅速使用API​​,而不必学习新的语言.

With any of these three, you'd be using the API in swift in your iOS project, and not having to learn a new language.

这篇关于适用于iOS应用程序的后端类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-10 22:48