The benefits of Firebase and Heroku

In this blog, I am going to tell you about two new technologies/tools named firebase and heroku and their benefit along with a real world example.

So let’s get started with it.

First, I am going to give you a brief introduction of these technologies and tools and then I will show you how I deployed my website using these tools.

Firebase

It is a BaaS(Backend as a Service). It’s main aim is to help developers to focus on creating a good user experience without any need to worry about the server or DB management.

You can use firebase to support almost every platform — ios, android, web, admin (Nodejs SDK, Java SDK, Pythos SDK), Web, Unity, C++.

Firebase provides you a wide variety of tools like:

Real-time DatabaseHosting (on SSL) with custom domainAnalyticsAuthentication — Custom and SocialCloud Storage

You can integrate Firebase directly with your frontend application or you can also write REST APIs in node, Java or Python and let your server communicate with firebase.

You can check Pricing Plans for Firebase and official website.

Heroku

It is a Cloud based PaaS(Platform as a Service). It supports wide variety of programming languages. You just need to focus on building your application and rest is managed by Heroku.

If your app doesn’t have the backend then you probably don’t need to use heroku.

In free plan you don’t get that much but still it is enough to go up and running and you can deploy your website on heroku in less than 15 minutes.

You can read more about it here. You can also check Pricing plans of Heroku.

You can use either one of them or both of them to make your application live, but it depends on the requirements.

I will talk here about how you can deploy and host your website for free. Your website could be either a static website or a dynamic website or hybrid mobile application based on REST API.

If you want to create your website, any hobby project or an initial stage product, you can deploy them for free in the live environment. By free, I mean up to a certain limit, but they provide more than enough configuration to support your small-scale project and anytime you can upgrade to their paid plans.

So, let me introduce you to my website that is running and hosted using firebase and heroku.The Project

You can have a look at the website here → https://snowplanetservices.com/ which is deployed and hosted using Firebase and Heroku.

firebase and heroku
Basic flow of application

As per the flow diagram, I am storing all of the data inside the firebase database and using a nodeJs application deployed on Heroku to communicate with the firebase database. It acts as a middleware between a front end and back end application and all of the communication is happening through REST API.  I am using nodeJs SDK for firebase through which I can get or add/update any record.  Data can be exported manually from firebase also but automatic DB backup is not provided in the free plan. You can also specify some security rules to prevent unauthorized access to your DB.

Why Heroku ??

Why I am using NodeJs and Heroku for my static website ?? Because, I want to implement some additional features like: I want to be notified via email if someone sends me any message using the contact us page and I have few other private APIs for tasks like automatic resume builder. So, like I said it depends on your requirement otherwise, you can build the same website using firebase only.

Why Firebase ??

I am using firebase-

As a DatabaseTo host my front end static filesFor Domain pointing

One of the main benefits of using Firebase for Domain pointing is that it provides custom domain pointing in the free plan also and that too on SSL whereas, Heroku provides an SSL enabled sub-domain and custom domain is included in the paid plan.


So, I hope you get the basic idea about using firebase and Heroku for your application deployment. For more details, you can refer to their documentation or connect with me.

Thank you 🙂

2 Responses

  1. Bhawna says:

    Nice

Leave a Reply

%d bloggers like this: