I’m hoping my app will make a million bucks at some point. If you’re here hoping to do the same, I’d recommend this book I’m reading – App Secrets: How to Make a Million Dollar App. (Affiliate Link)
Most apps these days have a “backend”, which is usually a server in the “cloud”, usually on AWS, Google Cloud or some other cloud provider where you hold your app’s data, and allow users of the app to access it. Here you can store things like images, user data, analytics info, and allow users to connect with each other, and many other things that will allow amazing types of functionality in your app that would otherwise be pretty much impossible without a backend.
I’m not a web programmer and though I’ve worked with different API’s I’ve never built one myself. This is usually where I head over to Udemy, and find a course on whatever it is I’m trying to learn so I can avoid as many newbie pitfalls as possible and waste as little time as possible. I landed on this course, which is really good:
If you’re into Python, this one is great. It goes over the basic Python you need to get going, creating a basic API with Flask, securing it, putting data in a proper SQL database, and more. If you need to build an API from scratch I’d highly recommend it.
From Scratch – Only If It’s Your Special Sauce
I realized I wasn’t really excited about building the backend. As much as I like writing code and learning new things, what I really wanted to have was just a basic cloud component for my app to securely store data. You’d be surprised how much is involved with just that. But I figured building the backend was just a necessary component if I wanted to make a cool app, and I needed to get it done so I could get to part I was really interested in – actually building the app.
There are many tools to make developers’ lives easier for certain tasks, for example Flask is a web framework for Python that makes creating a basic API a matter of a few lines of code compared to fully implementing HTTP message handling all by yourself. As far as servers – it’s never been easier to spin up an inexpensive virtual machine in Amazon Web Services, compared to buying a huge expensive server and renting space in a co-location provider like Rackspace, and mounting/configuring it yourself.
But I honestly found myself downright scared to implement things like authentication and encryption, after all I’d being storing user data. The last thing I’d need while trying to attract users to my app was a data breach or my server getting hacked. I began realizing that my special sauce – the app and its content, had very little to do with backend building. Obviously I needed a backend, but at any point during building something you should be asking yourself if somebody already has the component you’re working on figured out already. Especially if you’re working with limited time and resources, any opportunity to save time/effort/money/cycles should be taken. I was around halfway through the above Udemy course when I stumbled onto a service for iPhone developers – Apple CloudKit.
MBaaS – Mobile Backend-as-a-Service
Working in technology I should have known. Anytime developers find themselves building the same thing repeatedly, services crop up to offer it as a service to allow developers to get back to whatever their core competency is. In my case, that’s building my app.
Apple’s CloudKit looked nice, but it’s only for iOS and Apple services, of course. Naturally I wanted to find out if anybody else was offering a similar service but with Android support, and since I use Google services in my personal life quite I bit, I did some searching. It didn’t take long to find Firebase, a Mobile Backend-as-a-Service company started in 2011 and acquired by Google in 2014.
Firebase had all my boxes checked – encryption and authentication are handled entirely behind the scenes, there are SDK’s for both iOS and Android, there is a Python (and many others) administrative SDK, and to top it off it’s completely free to get started and test your app. Not to mention the web-based console is super cool:
The documentation for Firebase is extensive and easy to read. Getting a Firebase “Hello World!” app up and running took no time at all. There’s also a vast user base, and there are many questions posted and answered on good old StackOverflow.com. I promise I’m not affiliated with Google or Firebase in anyway, my mind was simply blown by how easy and awesome Firebase is to use.
After switching to Firebase for my backend, I saved myself loads of time, learning and development effort. I was able to quickly start working on my app instead of building a backend, which I was really not looking forward to. If you’re working alone or on a very small team, this might be something you should seriously consider.