WEB504 Introduction to Web development
Part 1: Database Selection and Setup
Task 1: Research and document the core concepts of Google Firebase, focusing on its NoSQL structure and benefits.
concepts of Google Firebase
Google Firebase is a powerful backend-as-a-service platform. that offers a suite of tools and services to help developers build, scale, and maintain web and mobile applications. It provides developers with easy-to-use features like real-time databases, authentication, hosting, storage, and machine learning capabilities (What Is Google Firebase? Everything You Need to Know in 2023, n.d.).
Core Services
Real-time data: With Firebase's real-time databases, data is updated instantly, ensuring a seamless user experience.
Databases: Firebase offers two cloud-hosted databases, Cloud Firestore and Realtime Database, for data storage and synchronization.
Authentication: Firebase Authentication provides easy-to-use UI libraries, backends, and SDKs for user authentication, supporting various providers like Google, Facebook, and Twitter.
Hosting: Firebase Hosting offers scalable hosting solutions for web applications and microservices.
Cloud Storage: This service allows developers to store and manage application resources and user-generated content securely.
(What Is Google Firebase? Everything You Need to Know in 2023, n.d.)
NoSQL structure and benefits
Firebase's NoSQL database is a document-based database, rather than a traditional table structure. This makes it very suitable for storing unstructured or semi-structured data and has high scalability.
Firebase Firestore is Google’s serverless NoSQL database which makes storing and retrieving data super simple with minimal configuration. NoSQL databases sure have their allure of being flexible, schemeless and familiar to work with. Since most NoSQL databases are document oriented, the learning curve is quite low when you know JSON and objects in most programming languages (Bitton, 2024).
Benefits:
1. Realtime
Instead of typical HTTP requests, the Firebase Realtime Database uses data synchronization—every time data changes, any connected device receives that update within milliseconds. Provide collaborative and immersive experiences without thinking about networking code.
2. High scalability
Firebase automatically scales with your application, making it easy to accommodate user growth. Firebase's NoSQL databases, including Realtime Database and Firestore, can scale horizontally. Efficient read and write performance can be maintained even when the amount of data grows, or the number of concurrent users increases.
Instead of scaling up by adding more servers, NoSQL databases can scale out by using commodity hardware. This has the ability to support increased traffic in order to meet demand with zero downtime. By scaling out, NoSQL databases can become larger and more powerful, which is why they have become the preferred option for evolving data sets(Why Do Developers Prefer Nosql Databases?, 2020).
3. Flexibility
With SQL databases, data is stored in a much more rigid, predefined structure. But with NoSQL, data can be stored in a more free-form. fashion without those rigid schemas. This design enables innovation and rapid application development. Developers can focus on creating systems to better serve their customers without worrying about schemas. NoSQL databases can easily handle any data format, such as structured, semi-structured, and non-structured data in a single data store (Why Do Developers Prefer Nosql Databases?, 2020).
Task 2: Justify the selection of Firebase for the project, explaining how it supports the web solution's goals.
1. Reasons to choose Firebase
Real-time requirements: Firebase's real-time database function is suitable for scenarios that require data interaction.
For example, the user comment function on your personal website can be realized through Firebase to display the comments in real time. Firebase can provide this function through the real-time database.
2. User authentication
Firebase's user authentication module can easily implement functions such as user registration and login. It provides multiple authentication methods, such as email, mobile phone number, etc. This ensures data security.
3. convenience
Firebase provides a Local Emulator Suite for integrating and testing various features without incurring additional costs (What Is Google Firebase? Everything You Need to Know in 2023, n.d.).
4. compatibility
Firebase is very compatible and can be easily used with technologies such as HTML, CSS, and JavaScript. This reduces barriers. This is perfect for my web solution.
Task3: Set up Firebase in your project and provide detailed documentation of the integration process
Task 4: Provide code snippets and screenshots demonstrating the Firebase connection and successful integration
Create a Firebase project:
Log in to the Firebase console and click the "Add Project" button.
Enter a project name and click "Create Project" according to your needs.
Install Firebase SDK:
In the terminal, install the Firebase SDK via npm.
Firebase Configuration
Created firebaseconfig.js file to store configuration information
Part 2: Database Integration and Real-Time Data Operations
Task1