0% found this document useful (0 votes)
12 views9 pages

Assignmetn No - 2 - Firebase

The document outlines the creation of a web-based application using Firebase, a Backend-as-a-Service platform that simplifies app development by providing real-time data synchronization, file storage, and authentication services. It details the advantages of Firebase, such as its ease of use and built-in security, while also noting some limitations like restricted query capabilities. The document concludes with a step-by-step guide on how to set up a Firebase project and deploy a web application.

Uploaded by

juzerlight53
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views9 pages

Assignmetn No - 2 - Firebase

The document outlines the creation of a web-based application using Firebase, a Backend-as-a-Service platform that simplifies app development by providing real-time data synchronization, file storage, and authentication services. It details the advantages of Firebase, such as its ease of use and built-in security, while also noting some limitations like restricted query capabilities. The document concludes with a step-by-step guide on how to set up a Firebase project and deploy a web application.

Uploaded by

juzerlight53
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Assignment No 2

Title: Write a web-based application and use Firebase.

Theory: Firebase is a Backend-as-a-Service — BaaS — that started as a YC11 startup and grew
up into a next-generation app-development platform on Google Cloud Platform. Firebase frees
developers to focus crafting fantastic user experiences. You don’t need to manage servers. You
don’t need to write APIs. Firebase is your server, your API and your datastore, all written so
generically that you can modify it to suit most needs. Yeah, you’ll occasionally need to use
other bits of the Google Cloud for your advanced applications. Firebase can’t be everything to
everybody. But it gets pretty close.

Most databases require you to make HTTP calls to get and sync your data. Most databases give
you data only when you ask for it. When you connect your app to Firebase, you’re not
connecting through normal HTTP. You’re connecting through a WebSocket. WebSocket’s are
much, much faster than HTTP. You don’t have to make individual WebSocket calls, because one
socket connection is plenty. All of your data syncs automagically through that single WebSocket
as fast as your client’s network can carry it.

Firebase sends you updated data as soon as it’s updated. When your client saves a change to
the data, all connected clients receive the updated data almost instantly.

It’s File Storage


Firebase Storage provides a simple way to save binary files — most often images, but it could
be anything — to Google Cloud Storage directly from the client!!!
Firebase Storage has its own system of security rules to protect your GCloud bucket from the
masses, while granting detailed write privileges to your authenticated clients.

It’s Authentication
Firebase auth has a built-in email/password authentication system. It also supports OAuth2 for
Google, Facebook, Twitter and GitHub. We’ll focus on email/password authentication for the
most part. Firebase’s OAuth2 system is well-documented and mostly copy/paste.

If you’ve ever written an authentication system, let’s commiserate for a moment. Custom
authentication is terrible. I will never write an auth system again for as long as I live. I fell in love
with Firebase Auth at first sight, and the flame has never wavered. Sometimes I get frustrated.
Sometimes we fight. But I never forget the cold, dark abyss of a custom auth system. I count my
blessings.

Oh, and Firebase Auth integrates directly into Firebase Database, so you can use it to control
access to your data.
It’s Hosting

Firebase includes an easy-to-use hosting service for all of your static files. It serves them from a
global CDN with HTTP/2.

And to make your development particularly painless, Firebase hosting utilizes Super static,
which you can run locally for all of your testing. I run Superstatic as BrowserSync middleware.
The following implementation uses Gulp, but Gulp is purely optional.

It’s a Fully-Featured App Platform

The Firebase team has integrated a bunch of new and existing Google products with Firebase. I
don’t plan to cover these features in detail quite yet. A bunch of these features apply to iOS and
Android but not to web.

Remote Config
Test Lab
Crash
Notifications
Dynamic Links
AdMob

Pros
Email & password, Google, Facebook, and Github authentication
Realtime data
Ready-made api
Built in security at the data node level
File storage backed by Google Cloud Storage
Static file hosting
Treat data as streams to build highly scalable applications
Don’t worry about your infrastructure!

Cons
Limited query abilities due to Firebase’s data stream model
Traditional relational data models are not applicable to NoSQL; therefore, your SQL chops will
not transfer
No on-premise installation
How to use Firebase:

1. Create a project on firebase website

2. Choose Account
3. Select webapp here

4. Add webapp name here

5. Now go to homepage and select database


6. Select Create database and select location as US central and security in test mode

7. Now go in project settings and select CDN


8. Copy the API key and other details to add it in the auth file of project

9. Install google cloud SDK and using terminal / CMD initialize it

10. Using “firebase init” initialize the directory & project


11. It will look like this after completion of initialization
12. Add webapp files to the public directory where you initialized the directory and
using “firebase deploy” deploy the code onto the server. before it would ask you
the services you want i.e. Hosting, database select them

13. Open the webapp link from console and it would show you index.html file

14. After adding the details on this webapp you can see them reflecting on database

You might also like