Firebase
Firebase Realtime Database
Yesterday I completed the newly added section on building a progressive web app that looks like a mobile app, using the core frontend trifecta, HTML, CSS, and JavaScript, hooked to a Firebase Realtime Database backend. Throughout the course I built a basic Add to Cart/todo list app. At the end I built the solo project We are the Champions.
The key strength of the Firebase Realtime Database is its onValue
function, which enables your app to get a
snapshot of the data, i.e. realtime READ, anytime something changes, whether it's a push
, i.e. CREATE, update
, or
remove
. The list
of constants and functions I learned and used include:
appSettings
, in which you include thedatabaseURL
initialiseApp()
getDatabase()
ref()
push()
onValue()
remove()
update()
snapshot.exists()
snapshot.val()
Object.values()
Object.keys()
Object.entries()
CSS
In addition, I looked at some new CSS properties:
flex-wrap: wrap;
, to wrap children of a flexboxgap: 1em 2em;
, for gaps among rows and columnsuser-select: none;
, to prevent text selection
Favicon and the Web Application Manifest
I also looked at generating favicons and how to use the web application manifest to produce a mobile app like site.