- Progressive Web Apps with React
- Scott Domes
- 236字
- 2021-07-08 09:36:22
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.
- 企業(yè)級(jí)Java EE架構(gòu)設(shè)計(jì)精深實(shí)踐
- C#程序設(shè)計(jì)實(shí)訓(xùn)指導(dǎo)書(shū)
- AWS Serverless架構(gòu):使用AWS從傳統(tǒng)部署方式向Serverless架構(gòu)遷移
- 算法訓(xùn)練營(yíng):入門篇(全彩版)
- Arduino開(kāi)發(fā)實(shí)戰(zhàn)指南:LabVIEW卷
- Banana Pi Cookbook
- Visual Basic學(xué)習(xí)手冊(cè)
- 零基礎(chǔ)Java學(xué)習(xí)筆記
- C#程序設(shè)計(jì)教程(第3版)
- Solr Cookbook(Third Edition)
- 軟件測(cè)試教程
- Mastering AWS Security
- Java程序設(shè)計(jì)實(shí)用教程(第2版)
- MATLAB 2020 GUI程序設(shè)計(jì)從入門到精通
- 基于MATLAB的控制系統(tǒng)仿真及應(yīng)用