This is a special guest post from David Drobik, co-founder at Rapid.
Until recently, we had only one option for communicating with friends, family, and colleagues from our mobile phones: Short Messaging System (SMS).
Now, though, we don’t have to limit our communication to 160 characters (the SMS max per message, in case you don’t remember), and the options for real-time communication are virtually limitless.
In my work at STRV, creating web and mobile apps for Silicon Valley’s hottest companies and leading global brands, including Caviar, LegalZoom, Hallmark, and Lufthansa, and in developing our own real-time database (Rapid), we’ve seen the mobile explosion, beginning with the earliest smartphones in 2004.
Today we’re seeing the chat explosion. From dating to customer service and team collaboration, you name it and there’s a real-time messaging app for it. Industry research backs this up: Business Insider notes the top four messaging apps are bigger than the top four social networks, and eMarketer predicts that more than one-quarter of the world’s population will be using mobile messaging apps by 2019.
This is a massive opportunity, but chat interfaces are notoriously challenging to implement due to their complex asynchronous nature and underlying real-time infrastructure.
We developed Rapid to solve this problem for ourselves, as a 160+ member development shop, and for you, as an indie, commercial, or enterprise developer. We’ve combined numerous cloud services (the ones most critical to chat apps, including Azure Cosmos DB, Azure Redis, and Azure Container Service) into one simple real-time database to help you move fast.
In twenty minutes or less, any developer can get their first real-time chat app up and running. In this post, we’ll show you how (and why) to add “chat apps” to your StackOverflow Developer Story, GitHub repos, or [insert your preferred skills profile]. We’ll dive into basic chat requirements, what separates the good from the great, plus give you the code samples and step-by-step docs you need to get started.
But first, a little more on the rise of chat apps.
It’s no surprise that real-time messaging has permeated all industries, verticals, and demographics; humans are social beings, and we crave interaction with others.
Developers everywhere are incorporating social elements into their apps, from gamification to social sharing, and chat capabilities are arguably “social-plus.” Real-time messaging is the most direct, fastest form of digital interaction. From a developer's point of view, this results in happier, more engaged users; your user base launches your app more frequently, checking for updates, new messages, or shares with their friends.
Chat drives user engagement and loyalty, but there’s usually a trade-off. You want (and should) spend your time delivering a great user experience, not solving the server-side challenges, like scaling WebSockets, that chat messaging entails.
With the help of Azure and Visual Studio App Center, Rapid removes these barriers. Without further ado, let’s take a look at what it takes to build a chat app that people are eager to use again and again.
Anatomy of a Chat App
As users, we’re accustomed to seeing chat groups where we can talk to dozens of friends or colleagues, in real-time or asynchronously, and direct messaging capabilities that allow us to communicate directly with one other person.
As you build your chat app, you need to make sure you can display, search, and send messages to multiple groups and associated members, as well as limit message sends to conversations between individuals.
Building the List of Channels
Most chat apps contain a list of all chat groups, commonly called channels, where users search, select, and post messages. Whatever you refer to them as, they allow your users to easily navigate through conversations.
In addition, don’t forget the “create a channel” feature. Offering pre-existing channels in your chat app is great, but users also need to create channels for specific teams, interests, events, and more, as well as have the ability to invite users to collaborate.
Implement and Send Messages
Channels are the framework for your app. The core of your app is building the actual chat capabilities and allowing your users to easily read, write, and send messages to other users and channels.
Building the List of Messages
Every chat app has a way of displaying messages to users, but the best chat apps make navigating through conversations with other users as simple as possible. Building a list of messages makes it easy for users to parse, search, and find messages. We’ve seen this magnified in work-related chat applications, where colleagues sending new information quickly buries earlier (but important) information and documents.
Engage Users with Push Messages
According to a recent report from App Annie, average US users have over 80 apps installed on their smartphones, but only use around 30 on a monthly basis. To make your app stand out on a busy home screen, re-engaging users with push notifications is crucial.
We all know that as the number of App Store and Google Play apps increases, app discoverability gets harder and harder. How your app ranks in store searches (ASO) depends on various criteria, and how frequently your app is used per day is a major factor. This is partially in your control; using push notifications thoughtfully can drive significant increases in app launch frequency and boost your rankings.
Sending Notifications with Azure Notification Hubs and Visual Studio App Center Push Service
To get started, identify when, how, and why you’ll push notifications and conversation updates to your users.
Just like with email, push notifications fit into two different categories:
- Transactional Notifications: Notification that a new chat message is received.
- Marketing Notifications: Messages intended to re-engage your users by promoting a new upgrade or by prompting them to check out your latest features.
Visual Studio App Center’s Push service allows you to send re-engagement notifications directly from the App Center portal, and you can also use Azure Notification Hubs to send push notifications dynamically from any backend (including on-premises).
Both services handle device registrations for you, including storing device tokens and deleting them if they’re no longer valid, which is a big advantage since it gives you one less moving part to worry about. On the implementation side, each service has its own client-side SDK, with a slightly different API. Visual Studio App Center’s Push SDK handles most of the registration for you with a single line of code. The Notification Hubs SDK requires a deeper understanding of the platform’s specific device registration process.
Next Steps: Make it Your Own
From there, you can customize the UI, add more capabilities, and, most importantly, show it off to your colleagues and friends!
To start sharing with others, check out Visual Studio App Center’s Distribute service. You’ll create and add members to distribution groups in minutes, send notifications to all group members with prompts to download your app, as well as automatically send notifications for future updates as you keep adding features.
We can’t wait to see what you build. And who knows—you might have the next big real-time app!
More About Rapid
We started Rapid, a globally distributed real-time database, to solve common problems and make it easy for web or mobile developers to deliver real-time data from servers to any client (iOS, Android, React Native, or React.js).Rapid relies on Azure Cosmos DB and many other Microsoft Azure services (VMs, Containers Services, Redis Cache), surfacing its powerful hyperscale capabilities, like rich queries, auto indexing, low latency, and predictable throughput, in an easy-to-use UI.
We’re a startup passionate about helping other startups ship lightning-fast, amazing apps - from chat apps to games to IoT scenarios. Any situation where speed is essential, Rapid has developers covered.
Special thanks to the Rapid team who helped with the heavy lifting on this post, namely: Martin Stava, Jakub Kinst, Jan Schwarz, Filip Skaloud and Daniel Kraus.
If you haven’t already, create your Visual Studio App Center account, connect your first app, and start shipping better apps now.
Have an account? Log in and let us know what you’re working on!
About the Author
David Drobik is the co-founder of Rapid, launching in early 2017. Prior to his work with Rapid, David led business development at STRV, Silicon Valley’s go-to software development partner. He’s enthusiastic about sharing his rich experience in tech and startups with the world through his blog and frequent community meet-ups, hackathons, and more.