← Back to All Weeks
Week 9
Mar 2 - Mar 8: AJAX & Firebase
Key Concepts
- AJAX: Asynchronous JavaScript And XML — sending HTTP requests from code
- fetch(): Modern API for HTTP requests, returns a Promise
- Promises:
.then() chaining, response.json(), .catch() for errors
- async/await: ES2017 syntax for synchronous-style Promise handling
- useEffect: Hook for side effects after render; empty
[] runs once on mount
- Firebase: Web backend solution — hosting, databases, authentication
- Realtime Database: Single JSON object in the cloud with concurrent access
- onValue(): Real-time listener that fires on data changes, returns unregister function
- set() / push():
set() replaces value, push() adds with auto-generated key
Resources
From INFO 340: Client-Side Development