android - Firebase 作为 Android 应用后端

标签 android firebase

我正在开发 Android 应用程序并计划使用 Firebase 作为后端。

我的主要问题是除了 Firebase 之外我还需要任何其他后端资源(托管、服务器端脚本等)。

在前端,我的应用程序将收集一些用户数据,将其转换为 Json(据我所知 Firebase 使用 Json)并发送到 Firebase。

我将在 Firebase 中创建和维护一个数据库。

主要问题:我可以在 Firebase 上运行代码/脚本/逻辑来将用户数据与数据库中的数据进行比较。然后将结果返回给该特定用户。

这个问题特别是在 Google 引入 Firebase“功能”之后出现:https://firebase.google.com/docs/functions/ .

或者我是否需要像 AWS 这样的额外后端服务?

毕竟你会推荐使用原生后端而不是使用 Firebase。

在此先感谢您的支持。

最佳答案

对您有好处,因为 Firebase 提供了一个 实时数据库 和一个新的,它也很适合使用 Firestore。为此,您不需要服务器,一切都将在 firebase 数据库下通过您的应用程序代码在某些规则下完成。从 this link 的实时数据库上的 Firebase 官方网站上查看此报价.

The Firebase Realtime Database can be accessed directly from a mobile device or web browser; there’s no need for an application server. Security and data validation are available through the Firebase Realtime Database Security Rules, expression-based rules that are executed when data is read or written.

此外,因为您正在制作一个新应用,所以最好的方法是使用 Firestore 作为您的数据库,因为除了跨多个设备的同步之外,它还具有可扩展性,而且比它的新应用(现在是测试版)更重要。因此,如果您打算在拥有大量用户的地方开发应用,那么是时候了解一下 Firestore。如果要比较两个数据库的差异check this link.有关更多信息,请查看 official firebase site here.

关于android - Firebase 作为 Android 应用后端,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46624666/

相关文章:

android - "Must supply height attribute"错误

android - 如何在 Android 上使用 OpenCV 提高人脸检测性能?

android - 如何导入只有 src 和 res 文件夹的项目

java - 如何使用基于 ListView 选择的字符串数组填充 Activity

javascript - React 显示嵌套数组项

ios - 在同一引用下将图像保存在 firebase 上是否会删除旧图像?

typescript - 使用 firebase 功能读取文件

Android Listview 在适配器更改后保留旧项目

firebase - 如何删除 Firebase 中的动态链接?

ios - 触发后续的分页调用