Module 3. Firebase (Real time database) Cloud DB

Module 3. Firebase (Real time database) Cloud DB

 

 

 

 

 

 

 

  • Intro: What is the learning module about? For whom is it of interest? How will you learn?

  • Scenario: Narrative task which is presented in an authentic situation.

  • Development of the concrete tasks, the work plan, (international) division of work, ways of collaboration (Multidisciplinary or multinational) problem solving, implementation of the tasks

  • Assessment of training success

  • Meta-cognitive self-reflexion and evaluation of the learning process

 

 

 

 

1 Intro: What is the learning module about? For whom is it of interest? How will you learn

This submodule is focused on the database cloud Firebase.  Firebase is a backend platform for storage database for building Web and mobile applications.

This submodule could be cover for all the ICT Vocational specialties. In the Spanish case these are the specialties involved:

Technician in Microcomputer Systems and Networks (EQF4)

Higher Technician in Development of Web Applications  (EQF5)

Higher Technician in Multi-platform Applications Development (EQF5)

 

The steps will be :
1. Enviroment setup

2. Creating database

3. Using database

4. Authentication

 

 

 

 

 

2 Scenario: Narrative task which is presented in an authentic situation.

 

1. Enviroment setup

2. Creating database

3. Using database

4. Authentication

This submodule is totally related with submodule 2 , 4 and 5.
But can be learn individually for other purposes.

 

 

 

3 Development of the concrete tasks, the work plan, (international) division of work, ways of collaboration (Multidisciplinary or multinational) problem solving, implementation of the tasks

 

Task 1. Enviroment Setup


Basics:
From Official Firebase Documentation:

“Firebase can power your app's backend, including data storage, user authentication, static hosting, and more. Focus on creating extraordinary user experiences. We will take care of the rest. Build cross-platform native mobile and web apps with our Android, iOS, and JavaScript SDKs. You can also connect Firebase to your existing backend using our server-side libraries or our REST API.”

 

Real-time Database − Firebase supports JSON data and all users connected to it receive live updates after every change.

 

It is simple and user friendly. No need for complicated configuration.

 

The data is real-time, which means that every change will automatically update connected clients.

 

Firebase offers simple control dashboard.

 

There are a number of useful services to choose.

Firebase free plan is limited to 50 Connections and 100 MB of storage.


Setting up a Firebase Account

 

First Login with Google account to the Firebase console.
https://console.firebase.google.com/



Then Create a New Project testingDB

 


 

And once is created it will be taken to the project Dashboard

 

 

Task2 . Creating the Database

 

The Firebase data is represented by JSON objects.

 

 


JSON

JSON stands for JavaScript Object Notation. Is a lightweight text-based open standard designed for human-readable data interchange.

 

The filename extension is .json.

 

It is used while writing JavaScript based applications that includes browser extensions and websites. JSON format is used for serializing and transmitting structured data over network connection. It is primarily used to transmit data between a server and web applications.

Web services and APIs use JSON format to provide public data. Used with modern programming languages.

 

Characteristics of JSON

JSON is easy to read and write.
It is a lightweight text-based interchange format.

JSON is language independent.

 

 

Task 3. Using Database

Set

The set method will write or replace data on a specified path.

Update

The update method , update the Firebase data on the specific path.

Push

The push() method create a unique id when the data is pushed.

Key

Get any key from Firebase using the key() method.
For example to get our collections.


Read data
The on() method is used to retrieve data. This method is taking the event type as "value" and then retrieves the snapshot of the data. When we add val() method to the snapshot, we will get the JavaScript representation of the data.

Child added event
This event type will be triggered once for every new is added to our data. It is useful for reading list data because we get access of the added record and previous one from the list.

 

child_changed

This event type is triggered when the data has changed.

 

child_removed

To get access of deleted data, we can use child_removed event type.


Order by Child

To order data

Order by Key

Order by Value

https://www.tutorialspoint.com/firebase/firebase_queries.htm

 

 

4 Assessment of training success

Dsfdsfdsf

 

 

 

5 Meta-cognitive self-reflexion and evaluation of the learning process

asdsad