130 likes | 151 Views
The article covers features, advantages & disadvantages of Firebase & how to create project in MVC Core 2.1
E N D
Firebase with MVC Core 2.1 Hello friends, today I am going to talk about Firebase with MVC 2.1. This blog is only contains information on 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. 9series - Mobile App And Web Design & Development Company eMail : sales@9spl.com Call : +1 845 542 1553
[1]. Home Page of Visual Studio: [2] Creating New Project: Go to File > New > Project 9series - Mobile App And Web Design & Development Company eMail : sales@9spl.com Call : +1 845 542 1553
[3] Name of New Project and Press Ok. [4] Categories of New Project, Select Web-Application (Model-View-Controller) and press OK 9series - Mobile App And Web Design & Development Company eMail : sales@9spl.com Call : +1 845 542 1553
[5] This is Home Page of New Created Project and on Left hand side File Structure of MVC Core 2.1. 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. 9series - Mobile App And Web Design & Development Company eMail : sales@9spl.com Call : +1 845 542 1553
[1] First go to https://console.firebase.google.com/ and Press ok of Term and Condition [2] Click on “Add Project” then name new Project like “TestFirebase” and click on Create Project. 9series - Mobile App And Web Design & Development Company eMail : sales@9spl.com Call : +1 845 542 1553
[3] It will show us like this and go to “Develop” > “Database”. [4] It will Show us Database Approach use in Firebase. 9series - Mobile App And Web Design & Development Company eMail : sales@9spl.com Call : +1 845 542 1553
[5] Go to Settings> General. [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, 9series - Mobile App And Web Design & Development Company eMail : sales@9spl.com Call : +1 845 542 1553
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, 9series - Mobile App And Web Design & Development Company eMail : sales@9spl.com Call : +1 845 542 1553
– Firebase Dynamic link, – Firebase Invites, – Firebase Adwords Firebase has core features like Real-time database : 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 9series - Mobile App And Web Design & Development Company eMail : sales@9spl.com Call : +1 845 542 1553
– 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, 9series - Mobile App And Web Design & Development Company eMail : sales@9spl.com Call : +1 845 542 1553
[1] Add new Javascript file in Project. Go to wwwroot > js > Add > New Item. [2] Choose Javascript file Category and Name that File like “FireBaseScript”. 9series - Mobile App And Web Design & Development Company eMail : sales@9spl.com Call : +1 845 542 1553
[3] Paste the Firebase Key Script Here. [4] And call Javascript File Like this in View page. To Update database from firebase we need these type of codes in Script And We can Update Data of Firebase from Firebase with this type of code in Script, 9series - Mobile App And Web Design & Development Company eMail : sales@9spl.com Call : +1 845 542 1553
Conclusion: This Blog contains all required information for implementing firebase to MVC Core 2.1. Blog Contains Basic Features of Firebase, Advantages, and Disadvantages. It includes how to Create Project in MVC Core 2.1, How to Use Firebase Database and how Implements 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 Source By :https://www.9spl.com/blog/firebase-mvc-core-2-1/ 9series - Mobile App And Web Design & Development Company eMail : sales@9spl.com Call : +1 845 542 1553