December 27th, 2016
If you have ever tried to build anything more than a very basic mobile app, you probably ran into the need for a backend. You likely then discovered that designing and maintaining one of these is no simple task. Enter BaaS (Backend as a Service) platforms like Firebase and Parse — game-changers for developers who want to focus on building an app.
Google snapped up Firebase in 2014, and it has since evolved from a simple BaaS provider into a full “App as a Service” platform, with a suite of new tools for building and growing an app. For developers, this is fantastic news: it’s now easier than ever to get an MVP up and running. Since many of us on the Branch team are mobile engineers ourselves, we find the potential of the Firebase toolkit very exciting and we highly recommend giving it a look as a way to jumpstart work on new projects.
Of course, there is a downside too: these new tools are competing in service verticals that have already seen more than four years of innovation and product advancement. We believe Google bit off more than even they can chew by trying to launch almost a dozen at the same time. The result is that many of these new components are classic cases of “a mile wide and an inch deep.” It can be hard to know when you have grown enough to need something more powerful, and shortcomings may not be obvious until too late, after you’ve already built a core part of your app on top of the platform.
At Branch, solving the app discovery problem through better linking has been our focus for the last three years, which means we deal with more app deep links than anyone else on the planet (300 million per day, as of December, 2016). With this in mind, let’s take a closer look at the Firebase Dynamic Links module and see how it compares to the Branch linking platform. We will also show how easy it is to implement Branch instead of Dynamic Links if you need more power, while still using the rest of the Firebase toolkit.
The Firebase team wrote an introductory blog post for Dynamic Links that outlines the core issue they are attempting to solve: linking to content inside apps is hard. The post goes on to identify some key requirements that apply to any link system for mobile apps:
Dynamic Links fulfills these basic requirements. At least, enough of them to give you a taste of the potential of deep linking. However, this is one of the newest and least developed Firebase components, and you will quickly run out of juice if you want to do anything more advanced.
The requirements above are the same ones we identified when we began building Branch back in 2014. They are the core of a successful deep link service, and the foundation for everything Branch has built as we’ve become the linking infrastructure for the world’s best apps. But the devil is in the details. As an app developer, what can you actually do with these links?
|Generate links inside the app||X||X|
|Generate links using online dashboard||X||X|
|Non-spammy link URLs||X|
|Flexible, custom data parameters per link||X*||X|
|Route to specific content, even when app is not installed||X||X|
|Standardized link data response in JSON format||X|
|First-time install attribution||X|
|Guarantee match accuracy during first-time install||X|
|Identify unique users (for referrals, etc.)||X|
|Industry-leading, SLA-backed technical support||X|
|Comprehensive edge case handling (including Facebook and email)||X|
* Must be manually encoded as part of link URL
That looks good as a table, but what if we want to implement equivalent deep link functionality in a simple iOS app, like our office Branch Room Maps app? Let’s compare the code directly.
First we need to start a session and handle incoming links. Here’s what that looks like using Firebase:
And the same thing, implemented with Branch:
As you can see, fairly similar so far. Most things are slightly simpler on the Branch side, but nothing a good programmer couldn’t handle.
Next, let’s create some links. Firebase first:
Now with Branch:
Again, a bit more manual work in the code for Firebase, though the real difference is the link URLs themselves (branded links really do matter).
But most importantly, what can you actually do with these links when they are used? Here is the data you get from those
dump statements back in the AppDelegate:
+click_timestamp: 1482541476 +clicked_branch_link: 1 +is_first_session: 0 +match_guaranteed: 1 +referrer: https://www.google.com/ +phone_number: //only returned when link is SMSed from desktop to mobile ~creation_source: 3 ~referring_link: https://branchmaps.app.link/D1PpymBZlz ~feature: sharing ~channel: Pasteboard ~id: 341010052121261919 $one_time_use: 0 $og_title: Pine Cone $identity_id: 339834809826614244 $canonical_identifier: room/PineCone $publicly_indexable: 1 $exp_date: 0 room_name: Pine Cone
Here, the two platforms are not even close. Branch gives you a whole list of useful contextual parameters, including install detection (
+is_first_session) and matching accuracy (
+match_guaranteed). Install detection is critical for building experiences like customized onboarding, and matching accuracy allows deep linking to personalized content with the confidence that you have the correct user, which Branch does better than anyone else in the ecosystem.
In fact some of our customers trust our accuracy so much that they use Branch links to automatically log users into an app the first time they open it.
Firebase returns a simple raw URL.
And this is where Dynamic Links end. They’ll send your users where you want them (most of the time…if you don’t run into too many edge cases) and track link clicks, but not much else. On the other hand Branch is only just getting started. For us, a solid deep linking system is just the framework on which to build everything else:
Plus since we are app developers and programmers ourselves, we understand how important it is to get help when you need it. We monitor every question on StackOverflow with the Branch.io tag, and our Integrations team offers free unlimited support for ALL partners.
Here’s the best part: you don’t have to choose. Firebase is implemented as a series of independent, modular SDKs. You have to add another SDK to implement Dynamic Links anyway, so it’s just as easy to use Branch instead. In fact, it’s probably easier! You can have all the benefits of the Firebase platform AaaS platform, and the flexibility and power of the world’s most advanced mobile deep linking system.