- 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.
- Vue 3移動(dòng)Web開(kāi)發(fā)與性能調(diào)優(yōu)實(shí)戰(zhàn)
- C程序設(shè)計(jì)簡(jiǎn)明教程(第二版)
- 大學(xué)計(jì)算機(jī)應(yīng)用基礎(chǔ)實(shí)踐教程
- 樂(lè)高機(jī)器人設(shè)計(jì)技巧:EV3結(jié)構(gòu)設(shè)計(jì)與編程指導(dǎo)
- MySQL數(shù)據(jù)庫(kù)管理與開(kāi)發(fā)實(shí)踐教程 (清華電腦學(xué)堂)
- PHP+MySQL+Dreamweaver動(dòng)態(tài)網(wǎng)站開(kāi)發(fā)實(shí)例教程
- Mastering ServiceNow(Second Edition)
- Hands-On Full Stack Development with Go
- Windows內(nèi)核編程
- Python機(jī)器學(xué)習(xí)算法: 原理、實(shí)現(xiàn)與案例
- Solr Cookbook(Third Edition)
- 青少年學(xué)Python(第2冊(cè))
- Instant Apache Camel Messaging System
- 軟件工程與UML案例解析(第三版)
- OpenCV 3.0 Computer Vision with Java