Firebase is the product of Google. To create new Firebase projects, you need a Google account. Firebase projects can be created and managed using the Firebase console (https://firebase.google.com/console/). Firebase provides different SDKs for mobile and web apps to interact with its database. Ionic apps should use the web SDK (https://firebase. google.com/docs/web/setup).
Note: Ionic apps should use the web SDK (https://firebase. google.com/docs/web/setup).
Firebase has made the life of developers easier as they don’t have to spend time building backend server to build simple APIs. We can easily do all CRUD operations with minimum effort and with Web socket supports it’s super fast in syncing data. Also, Firebase offers offline sync, user authentication, and features or securing the data with sets of rules.
Firebase provides user authentication for multiple platforms: Custom – for integrating with existing authentication systems
- E-mail – register and authenticate users by e-mail and password.
- Anonymous – for guest accounts without any personal information required
Firebase provides many options such as Analytics, Authentication, Database, Storage, Hosting, Notification and many other options. All Firebase database data is stored as JSON objects and no relational tables exist.
Firebase has a unique database structure that is different from other databases. Each Firebase database is stored as a tree-like JSON object. This tree structure is very flexible for all kinds of data. You can organize the app’s data in a way suits most for your app. For an e-commerce app, its database can be organized as below
The property products is a map of product id to its properties. The property customers is a map of customer id to its properties. The property orders is a map of order id to its properties.
Each data value in the database has a unique path to identify it. If you think of the whole JSON object as a file directory, then the path describes how to navigate from the root to a data value. For example, the path of the price of the product with id 00001 is /products/00001/price. The path /orders represent all orders. The path is used when reading or writing data, as well as configuring security rules.
Adding Firebase database to Ionic
We have to create new project and Google will display three platform option as Android, ISO, and the web. The Ionic is web based so we have to choose to add Firebase to the web app. Add Firebase to your web app shows a dialog with code ready to be copied into the HTML file.
Google Place id
Taking review From single user