Adobe’s PhoneGap 2.0 makes building cross-platform apps easier

Update includes Windows Phone support, overhauled JavaScript library.

Adobe has announced the release of PhoneGap 2.0, a major new version of the open source mobile application development framework. The update brings a number of new features and improvements to the PhoneGap development experience. The update also introduces support for Microsoft’s Windows Phone mobile platform.

PhoneGap allows developers to build cross-platform mobile applications with standards-based HTML and JavaScript. It supports packaging and deployment across a range of mobile operating systems and provides a standardized set of JavaScript APIs for accessing underlying platform functionality.

Nitobi, the company behind PhoneGap, was acquired by Adobe last year. Adobe donated the underlying PhoneGap code to the Apache Software Foundation so that it could be developed in an inclusive environment with open governance. The project is currently being developed through the Apache Incubator program under the name Apache Cordova.

Adobe has continued to play a major role in the project, investing in ongoing development. Adobe decided to keep the PhoneGap name to describe its own distribution of the Cordova project. PhoneGap 2.0 has been transitioned fully to a Cordova base. Adobe says that the community around the project is growing and that development is moving at a faster pace due to engagement from new contributors.

“The PhoneGap community is bigger and stronger than ever with new contributors since last year like Google, Microsoft, RIM and HP,” said Adobe PhoneGap engineering director Andre Charland in a statement. “With a bigger community and additional resources from Adobe we’re shipping new versions of PhoneGap much faster than a year ago.”

PhoneGap 2.0 incorporates an overhauled JavaScript library stack. Previous versions had separate implementations of the framework’s JavaScript APIs for each supported mobile platform. These disparate implementations were converged to create Cordova-JS, a unified implementation that can be used across all of the platforms. The undertaking was a joint effort that involved developers from Adobe, RIM, IBM, and other contributors.

One of the advantages of this approach is that will accommodate increasing the modularity of the framework. As Adobe developer Fil Maj explained when Cordova-JS was introduced in March, an important goal of the effort was to make it possible for developers to add and remove core APIs at their discretion, with a behavior much like that of PhoneGap plugins.

Another major new feature in PhoneGap 2.0 is the Cordova WebView, an embeddable HTML rendering control that incorporates Cordova functionality. This makes it possible to integrate Cordova functionality into a conventional native mobile application. This feature is supported on Android and iOS.

Other improvements include Windows Phone 8 support, the introduction of a new remote debugging tool, standardized command line tooling, and much-improved documentation. For additional details, you can refer to the official release announcement. PhoneGap 2.0 is available for download from the official PhoneGap website.

Adobe gutted its failed mobile Flash strategy in 2011, shifting its focus from the proprietary plugin to modern standards-based Web technologies. In addition to acquiring Nitobi and investing in the Cordova effort, Adobe has also been developing tools for creating rich standards-based Web content. The company is developing an HTML5 animation tool called Edge and an open source editing tool called Brackets.

Intel has even started a port of Cordova to Windows 7 (https://github.com/otcshare/cordova-win7). I've been playing with it for two years. Performance is an issue if you insist on using huge JS libraries in your apps. Just use custom-built smaller ones designed for the mobile platform.

As a Windows Phone 7 owner, I've been wanting to learn Visual Basic to make some simple apps. This might work out better for me! And, since WP7 apps will work on WP8, so much the better

I don't know if I'd make stuff cross-platform (it costs money to get onto the respective app markets, right?), but the prospect is pretty awesome. If nothing else, it might work for Windows 8 too, right?

If I were MS I'd be jumping all over this like an 8yr-old on a bouncy castle. Solid cross-platform development tools are a great way to get small developers to port their niche apps to a newly-evolving system without having to spend a load of money learning a new API.

Yes, performance is the issue, but this is a boon for all those quirky little apps that don't need to run on bare metal.

"PhoneGap 2.0 is all about a vastly improved developer experience," Very well said. Looking forward to the new version.

- Sarashamelesslinkspamming.com

While spamming comments with your mobile app development services, you should probably stay away from praising tools like phonegap. It would be like me spamming links to my web development studio while praising some site that sells Wordpress templates for $10.

whatever happened to the 'report' button, guess it cost too much to keep the unpaid moderators busy getting rid of spam

Still, Cordova is a great tool, MS should be all over it as it allows someone to write a iOS app and magically have it on WP with hardly any development effort - and that means people might actually port their apps to the platform.

I don't think this is for performance, though we've seen how some js can be faster than WPF animated fanciness, so some games can happily be developed on the platform, for most of them you're still going to be using the native dev kits.

Given that this has JS APIs to get deeper into the phone hardware and presumably data, what kind of precautions are they taking to avoid creating security holes? Adobe's record is not very good in this area.

Given that this has JS APIs to get deeper into the phone hardware and presumably data, what kind of precautions are they taking to avoid creating security holes? Adobe's record is not very good in this area.

They are only hooking into the underlying OS's APIs, so you're not going to be able to use this to, say, break out of an iOS sandbox or surreptitiously turn on the GPS.

"PhoneGap 2.0 is all about a vastly improved developer experience," Very well said. Looking forward to the new version.

- Sarashamelesslinkspamming.com

While spamming comments with your mobile app development services, you should probably stay away from praising tools like phonegap. It would be like me spamming links to my web development studio while praising some site that sells Wordpress templates for $10.

"PhoneGap 2.0 is all about a vastly improved developer experience," Very well said. Looking forward to the new version.

- Sarashamelesslinkspamming.com

While spamming comments with your mobile app development services, you should probably stay away from praising tools like phonegap. It would be like me spamming links to my web development studio while praising some site that sells Wordpress templates for $10.

Adobe sells tools, so they are doing things like adding a PhoneGap panel in Dreamweaver CS6 so that you can create mobile apps from Dreamweaver. I imagine Adobe Edge and other tools will be include PhoneGap functionality in the future.

Also Adobe owns PhoneGap Build which compiles mobile apps in the cloud. So that web developers don't need to install all the various mobile SDKs to create apps, or even create iOS apps on a Windows machine. PhoneGap Build allows 1 private app for free and then charges when you want more app projects than that. Note you can have multiple projects for free, you just have to delete the project and add the new one. Anyways, PhoneGap Build is one area that Adobe can make money from the project.

Given that this has JS APIs to get deeper into the phone hardware and presumably data, what kind of precautions are they taking to avoid creating security holes? Adobe's record is not very good in this area.

All mobile platforms have some sort of WebView that can display web content inside a native application, generally using the OS's default browser engine. PhoneGap apps are native apps that only show the WebView at 100% and then provides hooks from the native APIs to the JavaScript layer. So it really is no different than any native application and has the same type of security, plus any sandboxing that the OS SDK puts in. Any of the built in security is up to the OS and what they make available in the SDK. Phonegap / Cordova is just taking what is available and serving it up in a package to make it easier for web developers to make mobile applications.

I think the Facebook mobile app has left a sour taste in my mouth in regards to "native" HTML5. Has performance improved since its last iteration?

Facebook is now creating a native app for iOS, but I'm not sure it's going to be any faster. The biggest problem with Facebook seems to be that their API is slow as hell. Ask anyone who has made a Facebook game or an app using the Facebook API and they can tell you how painfully slow the damn thing is.

I have no idea if it's an issue with their database or how they scale their PHP code, but the problem seems to be a backend issue not a front end issue.

PhoneGap has a number of featured apps on their website, as does JS frameworks like jQuery Mobile and Sencha Touch 2.

That said, PhoneGap isn't the solution for all apps, it depends on the use case. But a lot of apps are really simple and really no reason to be native, especially when they lack the budget to make the app on other platforms locking out users.

What about performance vis-a-vis native applications? Any benchmarks yet?

If you are talking about actual PhoneGap APIs which are just hooks into the native API, it's likely in the range of milliseconds of the JavaScript call being passed to the native layer. Quick enough that I doubt many will notice.

If you are talking about UI, then you have to look beyond PhoneGap, as it doesn't provide any UI, it just gives developers a shell. Pull up jQuery Mobile, Sencha Touch 2 and other such JavaScript framework examples and do tests on them. There is obviously here a difference between native and PhoneGap + web technologies, but for many apps it's small enough that it doesn't matter. LinkedIn's new iPad app is apparently 95% web based, with just 1 native screen in the whole app. While their developers & designers might have been able to tell the difference between native & web, they did a lot of user testing that found the average user couldn't tell the difference.

Now that Microsoft is in, time to run away screaming with both hands in the air.

We know the plan:Today: yes, we wil conform to your standards, include us, use us, promote us.After gaining significant market share: We are extending the standard API for you to be able to integrated X & Y with windows! In order to take advantage you can buy our development tools! Oh, we almost forgot to tell you, the stuff you wrote with phonegap... it will break when everyone gets the next update. Cheers!

LinkedIn's new iPad app is apparently 95% web based, with just 1 native screen in the whole app. While their developers & designers might have been able to tell the difference between native & web, they did a lot of user testing that found the average user couldn't tell the difference.

Do you have any source for this info? I'd be very interested in reading this. My company is weighing creating a native vs. HTML5 mobile app and it'd be very helpful be able to use this as part of the decision.

As a Windows Phone 7 owner, I've been wanting to learn Visual Basic to make some simple apps. This might work out better for me! And, since WP7 apps will work on WP8, so much the better

I don't know if I'd make stuff cross-platform (it costs money to get onto the respective app markets, right?), but the prospect is pretty awesome. If nothing else, it might work for Windows 8 too, right?

Why would anybody want to learn Visual Basic?

I've worked very hard my whole software development career to make sure my CV didn't get within smelling distance of that turd. MicroSoft make some good tools, but VB is definitely NOT one of them.

I hope this turns out to be better than the horror stories I've been hearing about the current version of PhoneGap. The marketplace is beyond ready for some good cross-platform tools for mobile development.

As a Windows Phone 7 owner, I've been wanting to learn Visual Basic to make some simple apps. This might work out better for me! And, since WP7 apps will work on WP8, so much the better

I don't know if I'd make stuff cross-platform (it costs money to get onto the respective app markets, right?), but the prospect is pretty awesome. If nothing else, it might work for Windows 8 too, right?

Why would anybody want to learn Visual Basic?

I've worked very hard my whole software development career to make sure my CV didn't get within smelling distance of that turd. MicroSoft make some good tools, but VB is definitely NOT one of them.

Perhaps you should have worked harder at reducing your ignorance and gaining a proper understanding of vb.net before commenting. VB.net is far removed from vb6 or vba, its more like c# but with nicer syntax and like c# a modern object orientated language. So to answer your question; Developers want to learn it because its an excellent .Net language and pretty much on a par with C# in terms of what you can do with it.

I read somewhere on some article about PhoneGap Application Development that PhoneGap 2.0 has been transitioned fully to a Cordova base. Adobe says that the community around the project is growing and that development is moving at a faster pace due to engagement from new contributors.