Skip to main content

Delivering Mobile Apps With Less Risk

· 7 min read
Roxana Halați
I'm pretty cool, but I cry a lot.

There’s nothing quite as exciting as seeing your app live on Google Play or the App Store. The culmination of months, if not years, of hard work can bring a sense of accomplishment, but with it comes the pressure of ensuring that your digital product functions as intended and meets the needs of your users.

Whether you’re planning to launch your first app or are a veteran in releases, you’re probably aware of the review process your app must go through before it can go live on the store. These reviews can take anywhere from a few hours to a few days, depending on the complexity of your app and the number of apps waiting to be reviewed.

Google Play on Mobile Screen

Redeploying code, whether for a feature update or a bug fix, means repeating the review process, which can slow down development. To speed up your CI/CD pipeline, it's best to minimize the number of times you have to go through this process. Fortunately, there is a way to reduce the number of redeployments for your app.

Updating in Production

Picture this: You’ve launched your app and everything is going smoothly until the (un)expected happens: a bug is discovered. Your developer team is quick to fix the issue, but your app must be reviewed again, which adds at least another day to the process. Meanwhile, your development team is becoming increasingly frustrated, as are your users.

What about those elusive bugs that are impossible to reproduce on the development server? Fixing a bug in production can cause significant issues for your product, especially if it affects the overall functionality of the app. Plus, a complicated bug can require actual app downtime.

Another issue can arise when you decide to update your app with new features. After implementing and thoroughly testing it, which can take a while, you must redeploy the code - only to be stopped by the pesky review system, which delays the process for another couple of days. And since it’s tough to simulate real-life loads, your infrastructure might crumble under requests.

It appears that as exciting as releasing your product can be, it can lead to headaches down the road. Fortunately, there’s a solution to the issues highlighted above - feature flags.

Feature Flags

Feature flags, also known as feature toggles or feature switches, allow developers to enable or disable specific features of an application without requiring a new version to be deployed.

They are like remote-controlled variables that can control what your app does. Feature flags help to execute the desired portion of code by determining the flag's value at runtime, making sure only the intended code is executed. This technique allows developers to test new features in production, reduce downtime, and release updates quickly and with less risk.

Feature Flags Explained in Diagram

In order to integrate feature flags in a deployed application, you can employ a feature flag management system. Such systems, like ConfigCat, allow you to connect to your app by using an SDK and a unique key. From there, the flags are introduced in if statements throughout your app and can be easily controlled, typically via a user interface. ConfigCat supports over a dozen SDKs for various programming languages, allowing you to embed flags in a wide range of digital products.

Feature Flags Uses

Feature flags can be used for a variety of different reasons. They can assist you with progressive delivery, timing the release of new features, isolating bugs, and quickly removing them from production. They can also help your marketing and product team create comprehensive A/B tests, target certain users, and remove features from production when the load becomes too heavy.

Progressive Delivery

Progressive delivery can help mitigate the risks of launching a new feature in an already-live application. With this approach, you can gradually release the feature to a small fraction of your users. Feature flags allow you to do just that by targeting certain users based on criteria decided by you. This allows you to test the feature with real users, collect feedback, and evaluate the infrastructure’s performance. Plus, bugs can be identified and fixed before rolling out the feature to the entire client base.

By wrapping your features in flags, you can eliminate bugged features from production without needing to deploy additional code. This gives your development team enough time to fix the problem without affecting your user base.

Progressive Delivery Explained in Diagram

Releasing Features on Time

You’ve decided ahead of time that you want your app to change its appearance and have a special theme for Christmas. You want this theme to be applied to all users on December 20th. However, if you deploy the code on the 20th, the store may take several days to review it, and some users may miss out on the holiday theme if they don't download the update. To avoid this issue, you can release the feature earlier, alongside a necessary update or bug fix.

You could argue that your customers could see the Christmas theme way too early. That’s where feature flags come in. By connecting your app to ConfigCat and wrapping your theme in an if statement, you can turn off the flag initially and turn it back on at the right time. As a result, all users will be able to enjoy the holiday theme in just a matter of minutes without the need for an additional download.

Streamlining App Development with Production Testing

Optimizing app development involves addressing potential bugs as they arise. While bugs are unpredictable, using feature flags can help avoid the risk of bugs taking down your production.

With ConfigCat's feature flags, you can target specific users such as your development team. A developer could work on the main page and configure a feature flag so that the changes are only visible to the development team. This might sound complicated, but it can be set up in a matter of minutes using unique IDs.

The developer can then log into the app in real-time to observe the changes without interrupting the user experience. This approach can be useful for production testing and bug fixes when you can’t afford downtime.

Takeaway

Releasing your app on the store is just the first step in its lifecycle, and redeployment will eventually be necessary. However, with feature flags, you can reduce the frequency of redeployments and speed up the development process.

App Store on Mobile Screen

To get the most out of feature flags, you need to plan ahead and have some foresight. Even so, they are a valuable tool for reducing redeployment frequency, increasing CD speed, and dealing with complex bugs. However, it's important to note that feature flags cannot completely eliminate redeployments, and you may need to wait for that review from time to time.

When used correctly, feature flags can help developers reduce the redeployment frequency and deal with other common post-launch issues more seamlessly. Plus, there’s plenty more you can use them for.

If you want to learn more about integrating feature flags in your app and explore other ways in which they can help, be sure to check out the ConfigCat blog and follow ConfigCat on Facebook, Twitter, Linkedin, and GitHub.