Hi, I am Rutik, Today I am talking about Firebase And what was the features & how it works. If you Like/love this information share it with your friends. And place a comment for me to improve my writing skills, and for future updates subscribe by Email.
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 the Google Cloud Platform.
Firebase frees developers to focus on 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.
So, what is Firebase?
It’s a Realtime Database
Real-time data is the way of the future. Nothing compares to it.
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. WebSockets 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 new 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. I’m writing this as if it’s an afterthought. It’s not. It’s the second reason that you will love Firebase Auth.
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 Superstatic, 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.
var gulp = require('gulp'); | |
var superstatic = require('superstatic'); | |
var browserSync = require('browser-sync').create(); | |
gulp.task('serve', function() { | |
browserSync.init({ | |
server: { | |
middleware: [superstatic({stack: 'strict'})] | |
} | |
}); | |
gulp.watch('public/*.html').on('change', browserSync.reload); | |
}); |
The BrowserSync + Superstatic development environment is slick. BrowserSync handles reloading your development app across all connected devices and Superstatic replicates Firebase hosting locally in such a way that you can deploy straight to Firebase for production use.
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 the web.
- Remote Config
- Test Lab
- Crash
- Notifications
- Dynamic Links
- AdMob
Firebase Pros & Cons
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 Firebase: From Beginner to App Architect
Resources
The Docs
Forecasts: The official Firebase YouTube channel
The Firebase Blog and @Firebase
Firebase can be used for
Why Use Firebase?
- Firebase manages real-time data in the database. So, it easily and quickly exchanges the data to and from the database.
- Firebase allows syncing real-time data across all devices - IOS, Android, and Web - without refreshing the screen.
- Firebase provides integration to Google Advertising.
- Everything from databases, analytics to crash reports is included in Firebase.
- Firebase applications can be deployed over a secured connection to the Firebase server.
- Firebase offers a simple control dashboard.