Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Native vs Cross-Platform App Development: Pros and Cons of PhoneGap, Titanium, and Xamarin

DZone's Guide to

Native vs Cross-Platform App Development: Pros and Cons of PhoneGap, Titanium, and Xamarin

In this article, we'll help you decide whether to create a Native or Cross-Platform app, and which open-source dev tool best suites your needs.

· Mobile Zone
Free Resource

Every day, Entrepreneurs and business owners launch hundreds of new applications across the app marketplace with help from individual developers, or by partnering with an app development company. Careful planning and strategic technology decisions will help ensure a successful launch and encourage adoption. The user interface (UI), experience (UX), and desired functionalities all have to be considered before settling on a platform. Afterward, an appropriate development process should be implemented.

Whether the app will be native or cross-platform will determine a lot. The app’s preferred platform and programming language play a huge role in how intuitive the product is to users, as well as the type of audience that will primarily use the app. For example, will the app only be available for Android or iOS devices? The decision to choose native or cross-platform for app development ultimately depends on the business’s goals. No matter which route is taken, each method has its own strengths and drawbacks.

Native Apps

Native apps are built using platform-specific programming languages. For Android, it’s Java, Windows uses C#, VB.NET or C/C++, and Objective-C or Swift is used to program iOS apps. These apps are built from scratch with the intention of operating solely on their designated platform.

Pros

  • User Interface (UI) – The look and feel, as well as the overall usability of an app, can determine the success of the product. Because native apps seamlessly integrate with the platforms for which they are created, users navigate a familiar interface. This contributes to an overall positive user experience and encourages repeated use.
  • Performance (UX) – Native app development is optimal for apps that require a lot of interaction and extensive data processing due to heavy amounts of media, such as images, videos or animation. Native apps generally perform better because their native code speaks directly to the operating system’s unique hardware and software functions with little to no lag time. Additionally, using native code for complex apps will minimize the risk of the app freezing or crashing since it’s built specifically for a certain platform.
  • Better Positioning – Because native apps typically rank better among users, they will often have greater visibility in app stores. Native apps usually have higher recommendations due to their high performance and user-friendly interfaces.
  • Platform Integration – Native apps generally function flawlessly on their specific platforms. This makes their features more customizable to user preferences and gives the feeling that the app is truly an integrated part of their preferred device.

Cons

  • Time-Consuming – Developing native applications for more than one platform can greatly extend the development process. The same code will not be usable for different platforms, and developers will need to spend extra time converting, or even rewriting code.

  • More Skillful Developers Required – To develop native apps for multiple platforms, businesses may need to invest in hiring additional, specialist developers. Depending on the platforms the company is targeting, a total of 2 developers may be needed for one application. For example, one would be the Android application developer, while the other works on the iOS platform. 

  • Expensive – The cost of increasing the number of developers needed for each platform, combined with extending the length of the development process for the project could mean doubling or even tripling the overall budget.

Cross-Platform

Cross-platform apps are developed with code that is later customized to fit the OS when an app is launched. This all-in-one solution allows a single application to run on multiple platforms and is a very popular approach for businesses and developers who want to save time and money.

Pros

  • Time-saver – Unlike developing for native apps, cross-platform app development uses a single code across multiple platforms, which saves companies from having to prolong the project due to code rewrites and platform customizations.

  • Affordable – Businesses can cut costs and have fewer developers per project. Saving time by having a “write once, run anywhere” code leads to an efficient development process and expedited deployment.

  • Profit Maximization – Aside from cutting costs, cross-platform apps maximize profits through exposure across multiple markets targeted at platforms and users.

  • Easy to Launch and Update – The initial launch, as well as subsequent updates and changes to the app, can be rolled out simultaneously and affect multiple platforms.

Cons

  • Performance Delay - Cross-platform apps do not integrate with their platforms as flawlessly as native apps do. As such, these apps tend to freeze or lag because the non-native code cannot seamlessly communicate with the device’s hardware or software functions.

  • Alien – Apps with shared code do not always integrate flawlessly into platforms and usually cannot adopt previous customizations the user has made to the device. The results leave users with an app that is not able to take full advantage of the platform, which hampers the ability to use certain features on a device, such as preset gestures, the camera, and even the microphone.

PhoneGap

PhoneGap, also known as Apache Cordova, is a very popular open source platform for creating cross-platform/hybrid apps. It uses JavaScript, HTML5, and CSS3 programming languages.

Pros

  • Familiar Programming Languages – Because PhoneGap utilizes well-known programming languages like JavaScript, HTML5, and CSS3, developers can immediately begin working with the software. This reduces the amount of training required for developers to properly utilize PhoneGap and enables businesses to get their apps out into the market faster.

  • Easy App Store Discoverability – PhoneGap apps install similarly to native apps; therefore, they gain the benefit of having high visibility in app stores.

  • Plugin Architecture – PhoneGap possesses a flexible plugin architecture to extend native device APIs in a modular style.

  • No Licensing Costs – PhoneGap is open source and free to use, so businesses do not incur expensive licensing fees.

  • Many Libraries Available – Developers can easily access and seek assistance from countless libraries to enhance the functionality of their PhoneGap applications.

Cons

  • Performance – The performance of PhoneGap apps is often criticized. Issues may sometimes arise if there are too many graphics or complex elements in the app’s architecture, causing the app to become non-responsive or even crash.

  • Plugins – In many cases, developers that have chosen to work with PhoneGap have done so to avoid having to work with native-specific attributes.  PhoneGap’s flexible, plugin-friendly architecture is beneficial to developers if they are able to find the necessary plugins they require for their project, or if they possess the skills to write their own plugins should they need custom ones. But if a developer is unable to find the proper plugins or easily write an appropriate one, the development process could suffer delays.

  • Lack of Documentation – PhoneGap’s vague user guidelines and directions documents for the user interface lack the crucial information required for development. The documentation also lacks best practices information to enhance cross-platform app development.

  • Memory Loss - Because PhoneGap lacks cache/memory management capabilities, loss of memory is often an issue.

Titanium

Appcelerator Titanium is an open source development platform for developing desktop, native mobile, and cross-platform apps. More than 35,000 apps have been developed in Titanium using programming languages like JavaScript, HTML5, jQuery, and CSS3.

Pros

  • Familiar Programming Languages – Titanium utilizes well-known programming languages, so it’s easy for developers to quickly begin working with the platform.

  • Access to Advanced Features – Titanium has independent APIs that can access features on devices like the camera, microphone, touchscreen, and GPS. This allows users to perceive Titanium apps as part of their devices and enhances the user experience.

  • Instant Feedback – Titanium reduces app development timeframes because developers can create apps with fewer lines of code.  This allows developers to build quick prototypes of their apps and evaluate how users interact with the UI and gain immediate feedback.

  • Large Community – The Titanium / Appcelerator community boasts over 200,000 developers and offers access to its Open Mobile Marketplace. Developers can buy, sell, and share modules, templates, design elements, and extensions for web services.

Cons

  • Increased Complexity – As the complexity of apps increase, so do the costs. More often developers will find themselves dealing with technical issues, such as crashes and bugs, as well as putting in extra effort in keeping the code organized and maintaining multi-platform support. 

  • Limits on Flexibility – Although Titanium’s API saves developers time by requiring fewer lines of code to enable certain features, its limitations can cause problems for complex applications. These limitations can cause delays and ongoing problems with the app.

  • Unstable Features – Appcelerator offers StoreKit, a module that enables in-app purchases to the Apple App Store. However, this feature is extremely buggy and does not work 100 percent of the time. The partial functionality of this module greatly affects Titanium’s freemium pricing strategy. The free-to-download software is too unstable for the user to consistently, and properly make in-app purchases. This instability in the software could result in the app bringing in less revenue.

  • Toolkit Trouble – Many developers agree the learning curve for Titanium has greatly increased since the introduction of Titanium Studio, an Eclipse-based IDE that is built on a modified version of Aptana that enables users to test their apps on a simulator, and manage their projects. Titanium Studio has been known to suffer from glitches, most notably those that cause the build process to ignore changes. This forces developers into an uncomfortable situation where they must constantly clean their project after each change, or restart completely with a new project.

Xamarin

Since its launch in 2011, the mono framework known as Xamarin has been widely used for cross-platform app development. Through APIs, Xamarin apps natively communicate with the camera and GPS functions of iOS, Android, and Windows devices.

Pros

  • One Code to Rule All Platforms – Xamarin uses C# combined with .NET framework to make apps for multiple platforms. As a result, developers can reuse a large percentage of the source code to speed up development processes. Xamarin also works with Visual Studio and Xamarin IDE, so developers do not have to switch between development environments.

  • Mimics Native – Cross-platform apps developed with Xamarin can theoretically be classified as native since their performance metrics rival those of native apps designed specifically for one platform. Thus, Xamarin apps can leverage high visibility and ratings in app stores.

  • Native UX – Xamarin makes it possible to customize the UI for each platform. By using the Xamarin.Forms tool, developers can build cross-platform apps that convert the app’s UI components into the platform’s specific UI. For even greater performance results, developers can use the Xamarin.iOS or Xamarin.Android tools to develop fast and reliable cross-platform apps that offer a native user experience.

  • Functionality – With Xamarin, all hardware compatibility issues become nonexistent. Xamarin offers developers access to platform-specific APIs and can connect with native libraries to work seamlessly with nearly all devices across varying platforms without compromising on functionality or performance.

  • No More Expensive License – Before Microsoft acquired Xamarin in mid-2016, licensing fees for Xamarin came at the expense of $1,000 per developer, per platform. This means businesses could easily spend large sums of money for a small team of three or five developers who would create apps just for the two most popular platforms. Since the acquisition, Microsoft began offering Xamarin for no extra cost for Visual Studio users and is in the process of making it a truly open source platform.

Cons

  • Small Community – Xamarin’s growth over the past few years has been steady with a majority of followers stemming from Microsoft. However, the Xamarin community remains smaller than that of the iOS and Android societies, so finding experienced Xamarin developers can be a challenge.

  • Versatile Skill Set Required – Xamarin makes extensive use of .NET open source resources as well as other open source technologies. Developers looking to work with Xamarin should, therefore, be skilled in .NET and also have knowledge of some other platform-specific framework with JavaScript or Objective-C aspects.

  • App Size – Xamarin requires a lot of operational software for linking codes and referencing between .NET frameworks and the platform specific operating systems.  This increases the overall size of the application.

Conclusion

The first step to bringing an app idea to life is deciding whether to develop natively or cross-platform. For simple apps that will only be released for a single platform, native app development is the way to go. But, if the goal is to launch the app on multiple platforms while saving time and money, then the best option is a cross-platform approach.

Businesses in need of high-performance native apps will most likely incur higher development costs up front. Cross-platform app development is preferred for cost-conscious development, but each of the most popular tools possesses drawbacks. To successfully introduce new applications, enterprises must ensure they partner with a company that can offer native and cross platform options, and developers with a clear understanding of the appropriate tools to use on the project.

Topics:
mobile ,cross platform mobile app ,native applications ,app development

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}