I had hoped to be able to create a quick SPA site on the spur of the moment, but I had given up on React because it is too big a job to create even a small site.
However, I recently started touching Recoil for React, and with Recoil, React was much simpler to write.
The ease of the front end can be solved with React+Recoil, so if we can just quickly create the back end, the dream will come true.
So I tried "Google Firebase" and "AWS Amplify" since I have heard a lot about them as a way to quickly create a backend for mobile apps.
Here I will write about my impressions of using each of them.
What Firebase and Amplify do for you
Both Firebase and Amplify do the following tedious tasks on the back end.
Resources
- hosting
- User Authentication
- database
- storage
- function
These back-end resources are set up for you. Moreover, they are configured to scale and can be used as they are without having to do anything, even if access increases in the future.
Simplified user authentication
- User management and authentication
- Access to back-end resources by authenticated users
There is no need to implement these yourself, and it is easy to do so using the SDK. Programmers can write code from the user's login.
With the above, Firebase and Amplify allow programmers to concentrate on the app logic, leaving infrastructure and authentication to the service.
Google Firebase
Originally, Firebase started as a backend service for creating chat apps, by a company unrelated to Google, which was acquired by Google and expanded into a mobile app backend service (summarized from Wikipedia).
Due in part to this trend, Firebase is complete as a stand-alone product, although it uses GCP as its foundation.
The unit of Firebase is one app (project), and if you want to create an app for a different purpose, create a new separate Firebase project. However, if the purpose of the app is the same, one app can be used to create apps for multiple platforms such as SPA, iOS, and Android.
When you create one Firebase project, a dedicated GCP project is created for it.
AWS Amplify
Amplify has been explained in many ways, and I honestly had no idea what it was until I actually tried it.
My own conclusion after using it is
"A collection of commands to easily build a mobile app backend on AWS."
It was.
Whereas Firebase was one app and one project, Amplify is just one service in AWS.
So, Amplify allows you to create a number of apps. And a dedicated backend resource is created for each app.
However, these resources are not exclusive to Amplify, but are the same as regular AWS services, and Amplify simply created them automatically on AWS with a single command.
For example, in the case of hosting, Amplify only creates S3 and CloudFront using CloudFormation, and the created S3 and CloudFront are displayed in the AWS console as they are bare.
Firebase hosting, on the other hand, uses a dedicated Firebase hosting location that is separate from GCP when the app is created and independent of GCP.
Differences between Google Firebase and AWS Amplify
The purpose of backend services for mobile apps is to satisfy the needs of users who say, "I don't want to think about the infrastructure, I don't want to implement the authentication. In this respect, both Firebase and Amplify fulfill this need.
The biggest difference between Firebase and Amplify is their standings.
Firebase was granular in terms of product and Amplify was granular in terms of tools.
While Firebase is a service that provides a complete mobile app backend called Firebase, Amplify is a collection of commands that make it easier to build a mobile app backend on AWS.
To use a strong analogy.
- Firebase is a blogging service
- Amplify is a WordPress installation service for rental servers
I guess that's what I'm saying. Put another way.
- Firebase allows you to create apps even if you don't know the backend.
- Amplify makes it easy to build a backend
Is it?
Charge
I think one of the reasons Firebase became popular is that it is free.
The infrastructure is free of charge, so individuals can distribute applications with zero running costs.
However, free apps are limited in number and functions are not available, so a paid plan is required to create elaborate apps.
Still, since the fee is for the excess of the free range, it would seem that a small application would hardly incur a fee.
Impressions, etc.
Firebase is closer to what I imagine when I hear the term "mobile app backend service.
Amplify was designed to be used by people with some back-end knowledge.
Firebase is less demanding, but since a GCP project is created for each app, the weight of one app is huge.
Firebase advises that apps with different purposes should be separated into different apps. Conversely, I think everyone is putting apps for various purposes into one app (project), but it's a hassle to separate projects, so I don't understand why you would want to do that. (Separating the environment for development and production would also result in separate apps, if we follow Firebase's manners...)
A simple comparison by performance and functionality of which is better is difficult, and it is likely that the position of the application and the development system will determine which is better suited for the application.
For example, in this case, I wanted to create a simple application that is independent of each function, so I think Amplify would be a good choice. Firebase has a stronger sense of excitement on first impression.