Sep 16, 2024

The Universal First Transformation

Mo Khazil, Head of Mobile at Theodo UK, discusses the future of frontend development and how React Native is shaping cross-platform experiences in the universal-first era.
Aditi Dixit
Aditi DixitContent Writer
lines
Screenshot 2024-09-16 at 3.38.38 PM.png

Editor's Note: This recap from thegeekconf features Mo Khazil as he takes us on a journey through the evolution of frontend development, discussing the past, present, and future of cross-platform technologies. 

How Frontend is Changing: A Look at the Next 5 to 10 Years we’re going to talk about how frontend development is going to change in the next 5 to 10 years. Throughout the day, you’ve probably heard the phrase “write once, run anywhere” a couple of times already. It’s the ultimate goal for frontend developers and UI engineers, right? The idea that we could develop an app from a single codebase and run it on any platform we want. It turns out, though, that this idea is nothing new.

Let’s take a trip back to the late 1990s. You come home after a long day of work, sit on the couch, turn on your TV, and what do you see? An ad for Java. The ad says something like, “Java can change the way we view the world and the way we live. It entertains, communicates, transacts, speeds across the ground, soars through the air, seeks out new frontiers—anywhere and everywhere, Java is there.” Suddenly, Java is everywhere, and the phrase “write once, run anywhere” becomes the mantra. You could use Java to target the web, phones, and desktops. It was the magical technology that could run on any platform.

Fast forward a decade to the late 2000s, and we’re in the age of Flash. Who here remembers Flash? Raise your hand if you’ve used Flash. And for those of you who haven’t—congratulations! You missed out on what was, frankly, a terrible time for the web. Flash was everywhere in the late 2000s and early 2010s. It worked on Windows, Mac, Linux, and the web. It even supported mobile platforms like Android, Blackberry, Palm, and Symbian. Flash tried to take the “write once, run anywhere” approach and expand it to more and more platforms. They were even targeting gaming consoles like PlayStations, the Wii, and Xbox.

Both Java and Flash, in their respective times, were at the forefront of app development. They promised to let developers write once and run anywhere. But as we all know, they ultimately failed. “Write once, run anywhere” turned into the joke of the developer community: “write once, debug everywhere.” Both technologies declined over time.

The Next Contender for Write Once, Run Anywhere

Screenshot 2024-09-16 at 3.39.02 PM.png

So, both Java and Flash failed. But around 2015, a new technology emerged, and it’s been climbing the ranks ever since. And it’s promising something very similar to what Java and Flash promised—“write once, run anywhere.” The question is, will this one succeed? Or are we chasing the same pipe dream?

My name is Moe. That was the longest introduction I’ve ever done to a talk, but we’ll roll with it. I work at Theodo, and I head the mobile team in the UK. I work closely with Charlotte, who spoke earlier today. I also organize the React Native London Meetup, which is probably one of the most fun things I get to do in my job. I maintain the React Native TV blog, which is a knowledge base of React Native TV information.

A lot of the work I do has to do with universal apps, and recently, I gave a talk at a meetup where I mentioned, “write once, run anywhere.” During the Q&A, an older gentleman, who clearly has a much longer career than I do, asked me a question. He said, “I’ve been hearing the promise of write once, run anywhere since the 90s. It was the promise of Java and Flash, and both failed. What makes you think React Native will succeed?” And he said it in a very patronizing tone, but his question was valid.

It all comes down to the architecture of how we’re trying to target cross-platform applications.

Why React Native is Different: The Native Advantage

Screenshot 2024-09-16 at 3.39.41 PM.png

Let’s take a look at how Java used to work. In a typical Java frontend application, you’d have your Java source code that goes through a compiler, which compiles to bytecode. That bytecode runs on the Java Virtual Machine (JVM), which sits on top of the operating system. This custom runtime abstracts the app from the OS, meaning your app isn’t running natively—it’s running in the JVM.

Flash worked similarly. You’d write ActionScript source code, it’d compile into a file that runs in the Flash runtime, and once again, the app isn’t running natively—it’s running in a custom runtime.

React Native, however, works differently. You write React code, and it goes through a bundler and build process. The native build process for each operating system compiles the app into native code, with JavaScript orchestrating the native functionality under the hood. On Android, a view in React Native becomes an Android view; on iOS, it becomes a UIView.

React Native is native.

It uses a common API with native components, so when you have a view in React Native, it’s actually rendered using native components on each platform. It’s not a WebView. This is a subtle difference, but it’s incredibly important. And that’s the key to React Native’s success.

The Past, Present, and Future of Frontend Development

Let’s take a look at how frontend development has evolved. From 1995 to 2005, we were in the desktop-first era. Windows dominated, and if you wanted to write a document or send an email, you needed desktop client applications.

From 2005 to 2015, we moved into the web-first era, where the web became powerful enough to replace desktop apps. Chrome took off, and we saw web-based services like Google Drive, Gmail, and Facebook replace traditional desktop apps.

Since 2015, we’ve been in the mobile-first era, where everything revolves around mobile apps. WhatsApp replaced phone calls, Instagram became the social network of choice, and mobile apps became the default way to interact with the world.

But here’s the thing: the mobile-first era is over.

Technologies follow an S-curve—they start strong, grow exponentially, then plateau. And mobile technology has plateaued. We’ve reached a point where the vast majority of the global population has smartphones, and mobile development is no longer the frontier it once was.

The Universal First Era: What’s Next for Frontend Development

So, if the mobile-first era is over, what’s next? I believe we’re entering the universal-first era. In this new era, it’s not just about mobile or desktop—it’s about seamless experiences across all the devices we use in our daily lives. From smartphones to smartwatches to smart fridges, everything is becoming interconnected.

Take Apple’s Vision Pro, for example. When you put on the Vision Pro, your entire interface changes. But the most impressive thing is the seamless handoff between devices. You can be working on your MacBook and then seamlessly continue on your Vision Pro without missing a beat. We’re seeing similar trends with other devices, and it’s clear that the future of front end development lies in building these universal experiences.

React Native’s Role in the Universal First Era

So, what’s the best technology for building universal apps? Is it Flutter? Kotlin? Native development? The answer, I believe, is React Native.

React Native provides a platform-agnostic API to define UIs that map to native components. It started with mobile, but today, you can target desktops, web browsers, TVs, and even AR and VR devices. Tools like Expo Router have already solved the handoff between platforms, and React Native has native support for Vision OS — no other cross-platform technology has achieved that yet.

Watch the full video ⬇️

Find the speaker here: Mo Khazali

Hire our Development experts.