3 ms·
I've had pretty extensive experience with PhoneGap targeting iOS, Android, WP7 and WP8, and would neither recommend it or use it again. This isn't so much a co
by gisenberg 13y ago
I've had pretty extensive experience with PhoneGap targeting iOS, Android, WP7 and WP8, and would neither recommend it or use it again.
This isn't so much a commentary on PhoneGap as much as it is HTML5 as an application platform. The bar for an application tends to be much higher than a web page; a fantastic web page may be pretty shit when compared against the app bar. Users have fundamentally different expectations around responsiveness, interaction and fluidity for an app that they had to go install as opposed to a site they visited.
Apps demands certain responsiveness, and replicating that behavior in HTML is exceptionally difficult and leaves the user with a bunch of UI behaviors that are close, but not quite right. Fluidity in user interactions, specific scrolling behaviors and so on that are exceptionally difficult to replicate across platforms.
A browser is also a pretty leaky abstraction. Targeting an API level in Android guarantees a specific set of behavior and functionality, but targeting a browser offers no such guarantees. The Samsung Galaxy S2 has a modified fork of Webkit that provides device-specific app problems within the same versions of Android, which make releasing a quality product pretty difficult to guarantee.
And, of course, different screen dimensions are a problem. Android devices can range from variable aspect ratios with a minimum width of 240px all the way up to 1280px. Responsive design is a bit of magic that can be sprinkled on to help make things work better, but that's a substantial bit of effort relative to using the native UI tools for each individual platform.
edit: Another challenge with PhoneGap applications is targetting iOS. HIG without designer assistance is a challenge, and this particular gem in the iOS approval guidelines is somewhat damning: 2.12 Apps that are not very useful, unique, are simply web sites bundled as Apps, or do not provide any lasting entertainment value may be rejected.
- mcgwiz 13y agoVery interesting. So it sounds like the problem is effecting a native experience with HTML5 (something, notably, that Windows 8 gives first-class support to). So then, given the HTML5 expertise and attention to detail, would you recommend PhoneGap? Or would you still advocate separate, native efforts? (Or something else?) Also, do you really think adding media queries to the stylesheet(s) is "substantial relative to native tools"? Taken holistically, I would think that when you're targeting multiple platforms, you expend much greater effort building natively for each platform. Using those native UI tools to provide a good experience for variable aspect ratios actually entails knowledge of different languages, build tools, runtimes, standard libraries, third-pary library ecosystem, and best practices related to all the above.
- itsboring 13y agoI've had mixed feelings on all of this for a while. I think as developers, we're all keenly aware that there's just no silver bullet. I can't say I'd necessarily always steer others away from PhoneGap, because it may be perfect for their project and team. But as mentioned, the abstraction remains very leaky; you still have to deal with a lot of pretty frustrating scenarios that can just eat away your time. I've also found performance to be an issue, especially if you're using animation-heavy UI to try and simulate a native experience. Lately I prefer Xamarin's approach. The downsides have been discussed in this thread: cost, and you lose some of that open source advantage (also perhaps binary bloat--I haven't had a chance to check that out). But I think writing views separately but having common core logic, networking, etc., meshes well with how I want to work. HTML5 is great, and I enjoy using it for web sites. But I've just never been able to get fully satisfied with it in the app space. Maybe someday! In short, saving time is a worthy goal, surely, but producing the best quality output you can is also a worthy goal, and those two have to be balanced as appropriate for any given project. I feel that PhoneGap leans a little too much in one direction and I'm hoping Xamarin can help me find the sweet spot.
- gisenberg 13y agoIt's not a matter of expertise and attention to detail. It certainly isn't impossible to make a native-feeling web application, but I do think that the level of effort is comparable to just doing the app natively, and the web counterpart will still fall a bit short. For what it's worth, WinJS apps still feel clunky to me when compared to their native equivalent. I think summarizing responsive design as adding media queries oversimplifies things a bit. The test overhead for PhoneGap is enormous; deploying fixes to an app is much more difficult than deploying fixes to a site, and individual devices can exhibit bugs that other devices won't within the same Android version. Adding different levels of responsive layouts multiplies that effort. By the end of one particular PhoneGap project, I literally had a dozen different devices on my desk to assert reasonably small changes. The browser as a leaky abstraction thing also continues to be a pain point. One particular difficulty I had with PhoneGap was Android 2.3.x, in which div overflow scrolling isn't implemented (also, ironically enough, not implemented in WP8 IE10 when used in conjunction with the -ms-viewport CSS rule), requiring a design that either doesn't use scrolling elements, or emulates it with JavaScript. In either case, the native experience wins out. Hitting several platforms with a good-enough experience may be an overriding priority, and you could certainly pick worse than PhoneGap to make that happen. For my own tastes, though, I'll be leaning on Mono for cross-platform efforts.
- ergo14 13y agoSome of the problems like responsive design and webkit versions are remedied by dojotoolkits mobile component, it's worth to check that out. I have IOS/Android application that worked very well for us.