×

Making Life Easier When Building in iOS, Web, and Android: With Zach Goldberg- Lottery.com

https://lottery.com

Lottery.com is a global lottery platform that allows users to play Powerball and Mega Millions or check paper tickets from their mobile device. Winnings are redeemed directly in app and can be cashed out at anytime. Lottery.com is a different kind of tech company; they don’t aim to disrupt the industry, they work with existing stakeholders and seek to advance the industry. Zach Goldberg serves as their CTO.

Getting Started on Three Separate Platforms

As a company, Lottery.com has always been present on both the App Store and Play Store, although Apple’s policies are more lenient than Google’s. As of today, Apple allows users to purchase real tickets in the app, whereas Android users have to visit the website (play.lottery.com) to actually play.

Both the Android and iOS apps were originally coded as fully native applications with Java and Swift. According to Zach, this added a lot of overhead with the need to update and maintain two completely separate code bases. Around the time of building out these two code bases, they also wanted to build out Lottery.com for the web. This ultimately resulted in the creation of three different teams to manage each platform, although the three teams were all essentially producing the same features. To reduce some of the duplication, the company turned to React Native. Twelve months later, Lottery.com has completed the migration to React Native and has reorganized into one team that works on all three platforms.

Why Choose React Native?

Lottery.com debated between four frameworks: React Native, Ionic, NativeScript, and Xamarin. They had some requirements for choosing the right framework:

  1. Can it support all three platforms (web, iOS, Android)?
  2. Which has the best industry support and most active community?
  3. Which one is growing and advancing the fastest?

It came down to React Native and NativeScript. In their weekly architecture meetings, they had more extended discussions with all of the stakeholders. After a few weeks, it became apparent that React Native was the framework that was growing quicker. Facebook had put a lot of their support behind it, and there simply wasn’t the same level of support for NativeScript.

Challenges with React Native

The biggest issue is that the technology is still very new. If engineers run into any problems, the solution isn’t as easy as Googling the answer. Zach points out that “there will be things that are broken or bugs will pop up in code that you did not write. To get to the bottom of that, you need a certain level of senior engineer on your staff who can attack it without spinning their wheels too much.” Lottery.com is lucky enough to have two very experienced front-end engineers on their staff.

One of the most common frustrations with a hybrid framework is compiling and building errors; specifically, linking issues. They have an automated nightly build that takes place using Bitrise. Bitrise was built to service native applications, so they have had to shoehorn React Native into it.

They have also run into issues with their testing tools. Zach has found that tools such as Taplytics, Leanplum, Apptimize, or any visual A/B testing tool has very little support for React Native. They decided that Taplytics is the most useful to them. Why? Taplytics provides a visual editor for A/B testing. Say you wanted to test a button and if people have a better reaction to whether it says “yes” or “confirm.” To change the text on this button, Taplytics provides it visually. When making changes, everything looks the way the app looks to a user, so you can easily go in and make the change and the test runs. In React Native, or any programmatically instrumented test, an engineer has to physically go into the code and program both versions of that button. The good news is that with React Native, you can hotfix and push changes to the app without going through the full app review cycle.

At this point in his career, however, Zach is a React Native convert. Using separate teams to maintain separate platforms is unnecessary and inefficient. Lottery.com does have the advantage of having a fully themed app. It’s a “non-native” experience and it doesn’t utilize unthemed standard user experience controls. They are fully custom, which is easier to achieve with React Native. If you are looking for a native feel using native components, that is harder to achieve using React Native.

How Often Should Updating Happen Across the Board?

There is such a thing as update fatigue that can be harmful to the user experience and has a negative impact on growth metrics. Lottery.com tries to find a happy medium by doing updates every two weeks or so. One benefit of using a hybrid platform like React Native is that Lottery.com can push changes to the app without having users re-download the app, preventing so called “update fatigue”.

Advice to getting started on Android

Android is a different challenge. According to Zach, “the biggest issue for developers moving from iOS to Android is that everything is a comparison to what came before. It’s like always driving a manual then switching to automatic — they both work, you just have to get used to the differences.” You can’t always utilize the tools you know the best. You have to enter into Android with an open mind. Learn its strengths, be aware of its weaknesses. Comparison will only get you into trouble.

Overcoming Android Weaknesses

In Zach’s experience, “Android has many devices and thus it is difficult for developers to develop for all of them.” There are ways to combat this; one is to be selective in what you support. It is difficult to support Android operating systems that are more than two years old. You could cut out a lot of devices by choosing to only support more recent operating systems. Depending on your target audience, that may be acceptable and must really be handled on a case by case basis. Another way to handle the problem is simply to test on a wide variety of devices. The AWS Device Farm is a great tool to assist in that. It allows you to run your application on hundreds of different Android phones virtually and test that it works properly.

Lottery.com has a dedicated manual QA team as well. Their job is to run through checklists in the app on all three platforms. “This an extremely affordable option. Hiring well within this team has paid off tremendously,” claims Zach. He says they would not have build that works without the QA team. Zach’s advice to managers when working with Android is simple: “pay more money for high quality engineers.”

Working as a Manager of a Tri-Platform App

According to Zach, the role of a manager is the same as a coach: a good manager will help you make sure you’re always able to do your best work and will organize the team in a way that optimizes their success.  And always remember to have fun along the way, “the journey is the reward.”

Bonus: Zach’s Newsletter Recommendations

Sarah Shook

Sarah's a professional and creative writer with experience in marketing, film production, and research.