• Creative Corner
  • Tips
  • Blog
16 July, 2018

Firebase with MVC Core 2.1

9series | 0Comment(s)

Firebase-with-MVC-Core-2.1 9series solutions

Firebase is a platform that allows you to build mobile & web apps without a server-side programming language. Here we will only discuss how to include Firebase with a program.

If u want to know about how to create a file in MVC Code 2.1 u can see this link
https://docs.microsoft.com/en-us/aspnet/core/tutorials/?view=aspnetcore-2.1
But we can also see some images for Creating Project in MVC CORE 2.1.

[1]. Home Page of Visual Studio:

1

[2] Creating New Project:
Go to File > New > Project

2

[3] Name of New Project and Press Ok.

3

[4] Categories of New Project, Select Web-Application (Model-View-Controller) and press OK

4

[5]  This is Home Page of New Created Project and on Left hand side File Structure of MVC Core 2.1.

5

First, we need to know what is Firebase???

Firebase is a mobile and web application development platform developed by Firebase, Inc. in 2011, then acquired by Google in 2014.

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 has a very smart and well-developed API. Firebase works like a server, API, and Database. These APIs can be modified as per our needs.

Now, we need to sign-in in Firebase Console with our Gmail accounts.

Then it should be like this.

[1] First go to https://console.firebase.google.com/ and Press ok of Term and Condition

6

[2] Click on “Add Project” then name new Project like “TestFirebase” and click on Create Project.

7

[3] It will show us like this and go to “Develop” > “Database”.

8

[4] It will Show us Database Approach use in Firebase.

9

[5] Go to Settings> General.

10

11

[6] Click on “Add Firebase to your web app” and Get Firebase Generated Unique Key Script

We will get our individual project script of firebase we need to copy the script and get to include this in our MVC CORE 2.1 project file.

Like I have this,

12

 

Firebase offers many features like,
– Real-time database,
– Push notification,
– Firebase Analytics,
– Firebase Authentication,
– Firebase Cloud Messaging,
– Firebase Storage,
– Firebase Hosting,
– Firebase Test Lab For Android,
– Firebase Crash reporting,
– Firebase Notification,
– Firebase App Indexing,
– Firebase Dynamic link,
– Firebase Invites,
– Firebase Adwords

Firebase has core features like
Real-time database :
A regular database requires Http call sync and get data from the database. But firebase works with Web Socket. Web Sockets are much faster than HTTP.

Firebase Storage :
File storage provides binary files to save file. It has its own system of security rules to protect your Google Cloud bucket from the masses while granting detailed write privileges to your authenticated clients.

Authentication :
Firebase authentication has been built with an email and password authentication system. It also provides Direct authentication from Google, Facebook, Twitter and GitHub.

Firebase Hosting :
Firebase includes hosting service for our files. It serves them from a global CDN with HTTP/2.

It also has Remote Config, TestLab, Crash Reporting, Push Notification, Dynamic Links, AdMob etc.

There are many Pros and Cons of Firebase:
Pros:-
– JSON (JavaScript Object Notation) storage means no barrier between data and objects
– Email and Password, Google, Facebook and GitHub authentication
– Real-time data
– Well Developed API
– File Hosting
– Firebase storage File Hosting
– Google Cloud Storage
– Built-in security at data node level
– Serverless

Cons:-
– Limited free data storage.
– It only contains simple CRUD operation. Firebase doesn’t use complex queries like join.
– No MapReduce

Firebase with MVC CORE 2.1:
– Firebase works as a simple script in MVC core 2.1.
– Firebase uses foreach loop for retrieving data from firebase node structure.
– Firebase has an n-level node structure.
– Firebase includes Create, Update, Delete function to run API.
– We can use Firebase with both sides like
1. Changing Data from Code
2. Changing Data from Firebase Console Database

It works like API, so it can catch in the backend with HttpPost method. Then it is simple to process to a database. This firebase script runs on View Page in MVC Core 2.1.

We can Connect this Script with Core like this,
[1] Add new Javascript file in Project. Go to wwwroot > js > Add > New Item.

13

 

[2] Choose Javascript file Category and Name that File like “FireBaseScript”.

14

[3] Paste the Firebase Key Script Here.

15

[4] And call Javascript File Like this in View page.

16

To Update database from firebase we need these type of codes in Script

17

And We can Update Data of Firebase from Firebase with this type of code in Script,

18

 

Conclusion:
Developers can find all the required information for implementing firebase to MVC Core 2.1. It discusses the basic features of Firebase, its advantages, and disadvantages. One can also know how to Create Project in MVC Core 2.1, how to use Firebase database and how to implement Firebase script in MVC Core 2.1

[References]
1. Google Firebase: https://firebase.google.com
2. https://docs.microsoft.com/en-us/aspnet/core/tutorials/?view=aspnetcore-2.1
3. https://en.wikipedia.org/wiki/Firebase
4. https://howtofirebase.com/what-is-firebase-fcb8614ba442
5. https://medium.com/@puthnith/firebase-for-ios-invalid-api-key-cdde76ff92c4
6. https://www.quora.com/What-is-firebase
7. https://console.firebase.google.com/
8. https://stackify.com/wp-content/uploads/2017/10/NET-core-2.1-1-793×397.png

 

 

Recent Posts

  • Deep Learning Explained: Understanding the Brain Behind AI

  • The Intersection of AI and IoT: Creating Smarter, Connected Environments

  • The Evolution of AI: From Simple Algorithms to Neural Networks

  • The Role of AI in Sustainable Development

  • Scaling New Heights: Integrating Advanced Technologies in Startup Product Engineering

Categories

  • .Net MVC (3)
  • AI Solutions (7)
  • Amazon DynamoDB (1)
  • Amazon Web Services (AWS) (1)
  • Android (25)
  • Android App Developers (3)
  • Android app development (8)
  • Angularjs Development (4)
  • Apple (25)
  • Artificial Intelligence (6)
  • Artificial Intelligence Solutions (4)
  • Beacon Technology (4)
  • Best Christmas Offer (2)
  • Blockchain Technology (2)
  • ChatGPT (1)
  • Cloud Service (4)
  • Clutch (1)
  • Collaboration (1)
  • custom mobile app development services (4)
  • DevOps (2)
  • Digital Engineering Landscape (1)
  • Digital Marketing (9)
  • Django (2)
  • Docker (12)
  • E-Learning Technology (3)
  • Ecommerce (1)
  • Events (4)
  • Flutter app development (3)
  • GDPR (1)
  • Google I/O (1)
  • Graphic Design (12)
  • html5 developers (2)
  • Human Resource (5)
  • important for an organization (2)
  • Infographics (33)
  • iOS (21)
  • Laravel Development (2)
  • Large Language Models (2)
  • machine development companies in India (1)
  • machine development services in India (1)
  • Machine Learning (10)
  • machine learning development company (1)
  • machine learning development services (1)
  • Market Research Companies (11)
  • Marketing (9)
  • mean stack development (1)
  • Microsoft (11)
  • Mobile App Design (3)
  • Mobile App Development (53)
  • Moodle Development (1)
  • next-generation technology (7)
  • Node.js (2)
  • Online Marketing (1)
  • Open Source (11)
  • open source Javascript framework (1)
  • Opening Ceremony (1)
  • Python (3)
  • Python Development (4)
  • Responsive Website Development (9)
  • SaaS App Development (2)
  • Search Engine Optimization (4)
  • Social Media Marketing (2)
  • Software Development Company (2)
  • Technology (45)
  • Testing (11)
  • Top Laravel Development (2)
  • Travel and Hospitality Technology Solution (4)
  • Typescript (1)
  • UI Design Company India (1)
  • UI Design Services (2)
  • UI/UX Design (12)
  • Uncategorized (11)
  • VueJS (3)
  • Web Application Development (9)
  • Website Design (2)
  • Website Development Company (8)

Archives