Let me guess; you’re a mobile developer, and it's time for you and your team to decide on the coding technology you’ll be using for your brand-new project. You may be looking into learning a new skill and therefore think, “Maybe I should try to use a new library or framework, just to see what it’s like… .” Or maybe it's the other way around; you're confident with your skills and think to yourself, “I’ll just use what I already know, that's always worked for me… .” And then, it dawns on you: the decision you make will impact every single aspect of the project from here on out.
You’re not alone in that decision. Many developers have to answer the "Cross-platform or Native?" question. Adding to the stress, when you take into account that in today’s market, designing a good quality app and deploying it as fast as possible could be the difference between a groundbreaking success and a total failure. So, which is it? Is there a correct answer? To answer, let's deep dive into our dilemma by explaining what our two options entail.
Native
Let's first explore the idea of a “native application.” A natively built application is a piece of software developed with a specific platform or operating system in mind and built using that platform's officially released development framework and software development kit (SDK). Usually, these tools are developed by the same creator. Since these applications are built to interact with a specific system, they typically have access to “lower-level” functionalities and can better manage hardware interactions. A few good examples of native development frameworks are:
- Java for Android
- Kotlin for Android
- Swift for IOS
- Objective-C for IOS
Perks of being Native
A few perks of native development include:
- Development Flexibility - Native development will have a more extensive development package library. This means that, as a developer, you’ll have more options than other non-native frameworks. It also means that new functionalities or updates to the platform will become available first. One such example was the Android Jetpack suite, which became accessible for native developers in September 2018. However, it wasn't until February 2020 that it was available for Xamarin developers.
- Application Performance - Imagine you're talking to a person who speaks the same language. Assuming that you both use terms familiar to each other, understanding and getting your point across to the other person should be relatively fast. Now, let's imagine you try to communicate with someone who speaks a different language, and to make your life easier, you get an interpreter. Undoubtedly this will affect understanding in the conversation, and communication will become slower than usual. This example helps us understand how most cross-platform frameworks work. These must pass through one or more compatibility layers to function with our different operating systems or platforms.
- App Security - This isn’t applicable to all cross-platform frameworks, but it is well documented that frameworks based on web technologies are often less secure. There are cross-platform frameworks that ensure security by compiling into native machine code (a notable example being Flutter). However, all native solutions support this, which complicates the reverse-engineering process.
- Job opportunities - Cross-platform tool experience has grown considerably in demand due to the popularity of the “write once, deploy everywhere” mentality. However, most of the industry's top enterprises' applications were made natively. Even those that weren't made natively required knowledge about the libraries made for the native development language. A few examples of native apps are:
- Waze
- Twitter
- Pinterest
- Spotify
- Google Maps
- WhatsApp
Cross-platform popularity
What if I don't have a team of developers specializing in different coding languages? Or what if my delivery date goal is too aggressive, and I do not have the time to do one project for each platform? A cross-platform framework could be the solution. A cross-platform developed mobile app uses a single code base that can be implemented in multiple platforms or operating systems. To achieve this, they mainly use two different methods:
- Hybrid Development: This method can be considered another type of development option for mobile; however, for simplicity's sake, we’ll consider it part of the “Cross-platform” development category. Hybrid combines both native and web-based solutions. This allows apps to have a native-like look and performance while still allowing developers to use some web characteristics (like allowing the use of CSS, HTML and JavaScript).
- Pure Cross-platform Development: Though similar, both methods are not the same. The main difference is the lack of web-based technologies used to design the application’s user interface and experience (UI/UX). Exclusive cross-platform frameworks rely on their coding frameworks and other specific tools.
These have become incredibly popular in recent years, especially with web-based app developers, due to their popular programming languages (like JavaScript or C#). A programmer who previously knew nothing about mobile development can quickly learn the basics without worrying about a coding language barrier. A few good examples of cross-platform mobile frameworks are:
- React Native: Uses JavaScript as its primary coding language and is built on top of the already existing React Library. It was developed by Meta (previously Facebook) and was released in March 2015 for IOS; the Android release was delayed until September of that same year.
- Ionic: It uses TypeScript as its primary coding language and is built on top of the Angular Framework. It was created by Max Lynch, Ben Sperry, and Adam Bradley, who were part of Drifty Co. and was released in 2013.
- Xamarin: Uses C# as its primary coding language and is built on top of the .NET standard. Originally their own company, it was bought by Microsoft in 2016.
- Flutter: Uses Dart as its primary coding language and was released by Google in 2017 as a way for developers to deploy software to Android, IOS, Windows, macOS, Linux and the web with a single code base.
What do I get when developing cross-platform?
Some of the characteristics of cross-platform development include:
- Easier learning curve - Regularly, cross-platform frameworks use popular coding languages that are widely used. For example, this means that web developers who work with JavaScript will have an easier time learning React Native or Ionic. Similarly, those who have worked with C# using the .NET standard will have an easier time using Xamarin. In short, due to them being built on top of popular frameworks and using widely accepted coding languages, cross-platform mobile frameworks become easier to learn.
- Faster development time - Instead of creating an app for each type of device, you and your team can use the same solution everywhere. Even if some configurations for each platform are required, this will reduce the development time significantly. Though, something to take into consideration is that speed is highly dependent on the experience of the team you’re working with, so cross-platform doesn't automatically mean that you’ll have a shorter development cycle.
- Smaller development team - There is a plethora of coding languages, frameworks, and tools, and, as much as we'd want to, we can’t learn every one of them. Nowadays, it's normal for developers to specialize in using just a few of these development tools. Now let's imagine a team trying to build an app that wants to have the biggest audience possible. You’ll need Swift developers (for an IOS version), Kotlin developers (for Android) and maybe even some JavaScript developers (if you want a web portal). This operating method can become expensive and will complicate the project. However, suppose you use a cross-platform framework. In that case, your team size can suddenly become smaller, your development process can be simplified, and you can spend time and resources on what matters: making your app successful!
- Code reusability - Have you developed a JavaScript web portal using React a few years ago, and now you want to make a mobile version? The good thing is that React Native uses the same syntax. Realistically, not every cross-platform solution will allow you to reuse every line of code written using the same language and libraries. However, it’s common to be able to run the same code with minor modifications.
So, which one is better?
While you may have expected a straightforward answer, the reality is that both development solutions are useful in certain circumstances. Just like you wouldn’t use a hammer to tighten a bolt, you’ll have to understand that the use of “the right tool for the right job” is essential for developers. But here's a quick recap...
Use a “native” development framework when:
- You're creating an application that relies heavily on the platform’s hardware
- The client or audience is more concerned about quality over “speed-to-market”
- The team has enough resources to hire specialists
- You consider the application’s design, security, and stability is of high importance
- Your project’s scope isn’t completely clear, and you require high flexibility
Use “Cross-platform” when:
- Your application isn’t too reliant on the hardware being used
- The client is more worried about meeting delivery dates than creating additional features
- You have a small team with limited resources
- You code-reusability, documentation availability and developer community support is of high importance to the project
- Your scope is clearly defined and documented, along with all business logic (BL)
Once you implement these conditions into your decision-making process, the right option will become clearer. With this in mind, we hope you feel equipped to choose the right tool for that new project.