Now, as work on evolving PhoneGap (and the related Apache Cordova open source project) slows, what’s next for hybrid mobile development?
Obviously, as an open source project, Apache Cordova won’t be going away anytime soon. Many companies have large investments in Cordova, and the Cordova community continues to fill gaps as corporate committers ebb and flow.
But PhoneGap was a project created with the explicit intent to eventually become obsolete, and that moment may be upon us.
Progressive web apps
Meanwhile, web standards have continued to evolve, and over the last three to four years, the push to improve the web standards necessary for creating higher-performance, offline-ready mobile apps has catalyzed under the term “progressive web apps.”
With progressive web apps, the web platform takes a another giant step forward. Now web apps have full control over the network stack, making it possible to do advanced caching and offline operations. There are also new APIs that help make web apps do other things often associated with native mobile apps, like launching with a splash screen, sending push notifications, or asking users for payment information. Add this to all of the other “HTML5” APIs that have landed in browsers—like access to accelerometers, cameras, etc.—and you have a very capable web platform for many kinds of apps.
All these capabilities would have required a native app when PhoneGap was created, but now the browsers have caught up. We can take off the hybrid training wheels.
Around five years ago, several companies started to try to find a solution to the frequent performance problems that plagued hybrid mobile apps. The goal: Create frameworks that could deliver “truly native” performance and UI richness while still being cross-platform and familiar to web developers. From this work, two popular options emerged: React Native (from Facebook) and NativeScript (from Progress).
These new frameworks allow developers to continue to reuse their web skills, but instead of simply wrapping a web browser in a native app shell (as PhoneGap does), these new approaches produce a native UI. The result is mobile applications that feel and perform more like “raw” single-platform native apps, while still gaining cross-platform productivity.
React Native and NativeScript are both thriving open-source projects, and both are ready to be the natural evolution of “hybrid 1.0” for cases where progressive web apps don’t fit the bill.
Which do you choose?
Choosing between the options should be simple, too:
- If your app doesn’t need a lot of device API access, doesn’t need to be in the app stores, and can live with some extra limits on iOS (for now), build a progressive web app.
- If you are a React shop, choose React Native.
- If you are an Angular or Vue shop, choose NativeScript.
Many of the companies that conceive these open-source frameworks are very willing to help, and most offer technical guidance for migrating from PhoneGap to their framework. If you’re looking for a place to start your migration journey, consulting with an expert is always a good idea.
And if you get stuck, or you would just prefer to talk to a third-party expert, there are a number of great resources available for the developer community—the obvious and most popular choice is GitHub. However, there have been many other forums created to help developers migrate from PhoneGap and hybrid to progressive web apps for a while now, and they offer some great pointers.
Hybrid (1.0) is dead. Long live hybrid (2.0).
Todd Anglin is vice president of product strategy and developer relations at Progress.
New Tech Forum provides a venue to explore and discuss emerging enterprise technology in unprecedented depth and breadth. The selection is subjective, based on our pick of the technologies we believe to be important and of greatest interest to InfoWorld readers. InfoWorld does not accept marketing collateral for publication and reserves the right to edit all contributed content. Send all inquiries to firstname.lastname@example.org.