We have all had a great idea at some point but not all of us have taken time to flesh it out, prototype it and put it out to market. Why? Well, a common answer is often “Time!”. Finding the time to build out a great idea is often our greatest obstacle.
We know that rapid prototyping and speed to market are key factors when releasing an app. The value of interacting with our users in real time and receiving their feedback can make all the difference in making a good idea great.
This is where a serverless achitecture can be an incredible boon. For those not familiar with cloud platforms such as Google’s Firebase or Amazons AWS Lambda, these platforms offer core functionality such as authentication, realtime databases, analytics, storage and cloud to name a few. My experience has predominantly been with Firebase and as such I will give a brief summary of that journey — the good as well as the bad.
First off, I would caution that there is no such thing as a silver bullet and, like with most things, Firebase is not going to cure all your ailments and chase away all your scary monsters. It’s vitally important to understand your use case before committing to a technology like Firebase. Mine was prototyping and for this I would give it a huge thumbs up!
As mentioned, Firebase comes out the box with several very handy features.
The free base plan was more than enough for me to get going and hammer out a prototype in a couple days and I found the learning curve gradual and easy to manage.
I started building my prototype application, which was a simple personality test with pdf download of results by bootstrapping a project together with Ionic 2 and adding the necessary Firebase node modules, which enabled me to talk to the Firebase API. In no time at all, I had a sign-up and login page and had set-up a simple email and password authentication process. Useful to note is that Firebase comes with a number of different sign-in methods that can be enabled/disabled at the click of a button.
This small experiment was enough to convince me to finish prototyping my application and I was able to complete it without too much pain.
While running serverless has many benefits, it doesn’t mean that you won’t have to deal with any of the logic that your server would usually run. In fact, some of this may find its way on to your web or mobile client which can balloon the code base and make it messy to deal with.
Firebase downloads all the data on a queried node and as such you can end up with much more than you actually needed for your use case. This can result in slower page loads/performance than expected.
Firebase’s NoSQL style database has no concept of relations and what is a simple process with something like MySQL becomes a pain to deal with as you have to manually store relational IDs in the individual objects being stored.
Let’s not fool ourselves. While Firebase is a phenomenal product, it comes with pitfalls that you need to be aware of. I have listed only a few here but there are more and one can find several blogs listing them in more detail. The Firebase team is working hard to address these obstacles and I do believe they are doing an admirable job. A good instance of this is cloud functions that take the load off the front-end when it comes to executing code that is more at home on the server side.
For my use case, which was rapidly prototyping an idea I wanted to try, I would definitely use Firebase again.
by Michael Stievenart