官术网_书友最值得收藏!

Firebase gotchas

Firebase is a useful tool, but it does have some caveats.

One of the big selling points (for us especially) is its real-time database. This means that changes to the data by one user are automatically pushed to all users. We don't have to check whether a new chat message has been created; each instance of the application will be instantly informed.

The database also has offline persistence, which means our users can read their messages even when they're offline (which, if you remember, fulfills one of the user stories we outlined earlier). Firebase uses local caching to achieve this.

So, what's the downside? The Firebase database is a NoSQL database, and has a specific syntax that may seem strange to developers more used to SQL databases. The process is similar to a SQL database (with the major CRUD actions--Create, Read, Update, and Delete-- applying to data), but it may not be as intuitive.

The other gotcha with Firebase is that it is not (at the time of writing) optimized for Single-Page Applications (SPAs) like those built with React. We'll have to do a couple of workarounds to get everything running smoothly with our React application.

All that said, however, Firebase will save us a lot of time in comparison to setting up our own backend server/hosting solution, and it's a pleasure to use for personal projects; this is definitely something worth learning.

主站蜘蛛池模板: 云浮市| 海原县| 芜湖县| 嘉荫县| 五家渠市| 巴南区| 保山市| 建阳市| 抚顺市| 嵩明县| 松滋市| 集安市| 甘肃省| 汤阴县| 东港市| 泸定县| 邮箱| 昌江| 莱芜市| 额敏县| 固阳县| 大田县| 山东| 扶余县| 合山市| 青海省| 蒙城县| 察隅县| 凤山市| 靖安县| 英德市| 松潘县| 页游| 富蕴县| 武威市| 油尖旺区| 和平区| 银川市| 尉犁县| 思茅市| 昭通市|