Firebase和Express之间的核心区别是什么? [英] What are the core differences between Firebase and Express?

查看:134
本文介绍了Firebase和Express之间的核心区别是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在我正在探索如何使用Express和MongoDB编写API。我也使用Angular做我的路线和意见。我知道Firebase和AngularFire可以做到这一点,所以我可以绕过使用Express(或所以我认为),并让我的应用程序是实时的。



他表示,他不能放弃Express,因为他需要它来使用Firebase,Stripe和MailChimp的Mandrill的npm包Quiver-Invoice服务。



这个SO帖子

另外我也看到人们谈论认证和安全差异在这里的差异 https://groups.google.com/forum/#!topic/firebase-谈话/ WF9gf - A3Qo



问题



那么核心差异是什么Firebase和Express之间?




  • 是否有可能像在Express + MongoDB中一样在Firebase上构建API?


  • 有没有可能(或很快就可以)像使用Express一样自定义Firebase服务器?


$ Firebase是一个后端即服务,其旗舰功能是实时事件的数据库功能。 Express是一个Node.js的Web框架。比较两者就是苹果。



你可以用Express / Node做任何你想做的事情,但是你必须管理自己的服务器并写后端功能。借助Firebase等BaaS,您可以避免管理任何服务器。您甚至可以将这两者混合使用,并将Firebase用于某些事情,并将自己的服务器用于其他事情。这就是Flawk所做的事情。



如果您主要想用Express来实现实时事件,那么您可以使用一些低级别的事情,比如工具将事件推送到客户端,或者像 LiveResource 允许同步RESTy对象。


Right now I'm exploring how to write an API using Express and MongoDB. I'm also using Angular to do my routes and views. I know Firebase and AngularFire can make it so I can bypass using Express all together (or so I think) and have my app be realtime.

In this article by Chris Esplin he states that he could not give up Express because he needed it to write promises instead of callbacks for cleaner code when using his npm package 'Quiver-Invoice' with Firebase, Stripe and MailChimp's Mandrill service.

In this SO post the poster says they need to use Express & Node for the ability to send emails out. I assume this is impossible if one uses only Firebase with Angular.

Also I have seen people talk about differences in authentication and security differences between the two here https://groups.google.com/forum/#!topic/firebase-talk/WF9gf--A3Qo

Question(s)

So what are the core differences between Firebase and Express?

  • Is it possible to build an API around Firebase like I can do in Express + MongoDB?

  • Is it possible (or will it be possible soon) to customize the Firebase server like one can with Express?

解决方案

Firebase is a backend-as-a-service, with the flagship feature being database capability with realtime eventing. Express is a web framework for Node.js. Comparing the two is apples to oranges.

You can do whatever you want with Express/Node, but you have to manage your own servers and write backend functionality. With a BaaS like Firebase, you can avoid managing any servers at all. You can even mix the two and use Firebase for some things and your own servers for other things. This is what Flawk does.

If you're mainly looking for a way to do realtime eventing with Express, you could use something low-level like Shoe to push events to clients, or something high-level like LiveResource which allows syncing RESTy objects.

这篇关于Firebase和Express之间的核心区别是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆