Jun 5, 2023

Comparing Hybrid (PWA), Cross-Platform, and Native Mobile App Development Approaches

Cover image

There are different approaches to building a mobile app: you can create a hybrid app, follow a cross-platform approach, or build native apps for each supported platform. Each approach has its own pros and cons. Now, I will provide a quick review of them and share my experience with each approach.

Hybrid

Hybrid mobile apps are essentially web apps (HTML, JS, CSS) packaged within a native container — a WebView container. This makes them native apps with a browser, featuring a single hardcoded URL and hidden controls. Hybrid apps can be built using technologies like Ionic^, Cordova, or PWA. Personally, I prefer the PWA approach, which involves creating a website using preferred libraries (React, Vue) with Service Workers that enable caching, offline access, and other features to enhance the user experience and make it feel more like a real mobile app.

^Ionic also offers native plugins, making it a viable cross-platform solution.

Pros:

  • Easier (and cheaper) to build
  • Less maintenance effort (one app for both Android and iOS)
  • Faster update deployment — simply deploy updates as you would for a web app, without waiting for review on App Store/Google Play Store
  • Easier scalability — lower learning curve, larger pool of available engineers
  • Universality — app can also function as a website and vice versa

Cons:

  • Limited native experience
  • Limited support for certain features (e.g., social logins, mobile payments, geo services)
  • Performance and UX issues
  • Limited access to native features (e.g., camera, photos folder, geo services)

These cons can be overcome by implementing them in a native container and emitting events to the app inside the container, effectively allowing the inclusion of many features that would otherwise require a cross-platform approach.

Suitable for:

  • MVPs — quick testing of ideas
  • Projects with limited time and budget
  • Lightweight content-centric mobile apps (listings, news, etc.)

Based on my experience, this approach can cover most use cases and is ideal for startups looking to bootstrap a new project, test it, and grow it. We have even used this approach for relatively large production projects with around 80,000 daily active users and requirements for native features like geolocation, social logins, payments, camera, and file browser.

While project requirements may vary, most features can usually be implemented. For those that require access to specific native functions, they can be implemented within a native container and communicated to the WebView via events. As mentioned earlier, we have successfully employed this approach.

Cross-platform

Cross-platform is an approach that involves using frameworks or tools to write a single codebase that can be used for different mobile platforms (Android, iOS). This single codebase typically acts as a layer of abstraction, translating the code into platform-specific language. Examples of cross-platform native app frameworks include Flutter, React Native, and Xamarin. The resulting apps are compiled into native code, providing access to native APIs and delivering a high-performance, platform-specific user experience.

Pros:

  • Faster development (using a single codebase for multiple platforms)
  • Easier maintenance (compared to native development)
  • Better support for native features
  • Enhanced offline support right from the download (unlike PWAs that require downloading and caching data)

Cons:

  • Limited access to native features
  • Potential performance limitations
  • UX challenges — difficult to adhere to all platform-specific guidelines
  • More challenging update deployment compared to hybrid approach

Suitable for production-ready apps that don't require extensive optimizations or high performance but do need access to native features (e.g., review apps).

I personally didn't like working with React Native. Debugging can be tricky, and building and launching for each platform can feel cumbersome and sometimes require additional steps. I have had less experience with Flutter, having only worked on a few small and simple projects. Therefore, I cannot provide an in-depth analysis of its pros and cons. Overall, my impression of Flutter was okayish, but it didn't stand out as something particularly special. I would be interested in exploring Unity more, but that would require a separate project with its own budget.

Native

Native apps are applications developed specifically for a particular platform or operating system. They are built using platform-specific programming languages, tools, and frameworks, such as Swift or Objective-C for iOS and Java or Kotlin for Android. Native apps have direct access to the device's hardware and software features, allowing for optimal performance, a seamless user experience, and integration with platform-specific functionalities.

Pros:

  • Performance: Native code can provide the best performance and battery usage, but it requires skilled engineers to build scalable mobile apps. Otherwise, there won't be significant advantages over hybrid or cross-platform approaches.
  • Native UX: Native apps can deliver a user experience that aligns closely with the platform's design and behavior, resulting in familiarity and usability.
  • Access to all native features: Native apps have full access to the device's native features and APIs, enabling the utilization of advanced functionalities.

Cons:

  • High development and maintenance costs: Building native apps for different platforms requires separate development efforts and specialized knowledge, leading to increased costs.
  • Longer time to market: Native app development often takes longer due to platform-specific requirements and processes.
  • More challenging update deployment compared to hybrid approach: Updating native apps requires going through the respective app stores' review and approval processes, leading to potential delays.

Suitable for:

  • Apps that require high performance and optimization.
  • Apps that cannot be effectively built using other approaches, such as games or AR/VR apps.

In general, I have had a positive experience with native app development. If you have the time, budget, and skilled engineers, it is undoubtedly the best approach for implementing mobile apps. However, if you are lacking in any of these aspects, you are more likely to encounter problems. Personally, I prefer Swift over Objective-C (who doesn't these days, huh?) and Kotlin over Java.

In conclusion, the choice of approach depends on the project's requirements. However, based on my experience working with early-stage startups, a hybrid approach with some native coding tends to work well and cover a wide range of use cases.


originally posted on linkedin.com

CV