Live data from Hacker News

Write your app in HTML5, upload it and get back app-store ready apps

build.phonegap.com

11–20 of 97 posts

Re: Write your app in HTML5, upload it and get back app-store ready apps

#12
Speaking as someone writing a fairly major HTML5 iOS app using Jo and PhoneGap: this looks like a very helpful way to take the make-work out of the case where you have an app that uses no native functionality, and is not in any way optimized for best appearance.

That's not a knock - a lot of people have that use case, and spend a lot of time on their own systems for deploying to multiple platforms. Consider internal apps, for example, that don't have to be massively visually slick and polished.

But ... given the very large differences between even similar platforms, and even between versions of platforms, you're not going to be getting much from this if you are building ultra-slick apps in which you really do need consider, say, how hardware acceleration or browser quirks fit into the picture.

Re: Write your app in HTML5, upload it and get back app-store ready apps

#13
post #5

I may be ignorant, but to write a complex app, don't you need HTML5 AND a mobile javascript framework like JQuery Mobile and Sencha? Or does HTML5 handle that too? If it does require a Javascript framework, that's when the quality deteoriates... I think imitating the look and feel of native apps is easy. Making the performance smooth on the other hand is hard.

HTML5 is JavaScript. Without JavaScript, HTML5 is just a few semantic HTML tags (like header and section) and a few extra form input attributes (like required and placeholder).

As far as JavaScript frameworks go, you could use Sencha or jQuery Mobile or one of the other few dozen frameworks out there --- or you could roll your own.

I've been doing mobile web development for about a year now. I've done both PhoneGap and over-the-air mobile web/native apps (with embedded webviews that load HTML/CSS/JS from the web when requested). Both types of apps accepted by Apple and in the Appstore as well as in the Android Market. I would recommend rolling your own and not trying to imitate the look of native apps. One of the strengths of using HTML5 is that you can create a custom look and feel that doesn't look like every other app out there.

Since you mentioned Sencha and jQuery Mobile, here's what I think having used both:

Using Sencha is nothing at all like using HTML5. You don't even write HTML or CSS. You write JavaScript that uses Sencha's classes/methods. The look and feel very much tries to mimic native and they do a pretty good job at it...except that most widgets look like they were ripped from an iPhone, which is disorienting for users on Android. That said, you get good performance and a boatload of widgets/ui controls out of the box. The price for this is a large, multi-hundred kb framework and a commercial license.

jQuery Mobile doesn't really try to look native and it really doesn't "feel" native either. jQuery has it's own ui controls that more or less look identical on iPhone or Android. With jQuery Mobile, you do write HTML and have a more transparent view of that as well as of the CSS. But, you have to write HTML the "jQuery Mobile way" to utilize the UI built into the framework. You don't get as many widgets and ui-controls as you do in Sencha and overall, the look and feel is not of the same caliber either. But, it's smaller than Sencha, has your standard MIT license and is more easily modified.

Neither is perfect and both have pluses and minuses. If you know some HTML, CSS and JavaScript, you will absolutely get better performance and and a smoother look and feel by rolling your own light JavaScript for your app that does just what it needs to do.

If you'd like to see an example app I built using PhoneGap and handrolled HTML/JavaScript/CSS, you can download Easy Baby from the Android Market. It's free. You'll find a link to it on my website: http://newbabysleep.com

Re: Write your app in HTML5, upload it and get back app-store ready apps

#15
post #9

Earlier quoted context omitted.

The new LinkedIn and OkCupid apps are primarily HTML5 based. Not quite the same, but every new release of the Facebook app seems to have more of its existing views replaced by HTML5 counterparts.

I'm fairly certain that the Facebook iPhone app does not UIWebViews to render anything. Their fast-scrolling tableviews are painstakingly crafted from scratch, natively, and (I believe) still use Joe Hewitt's framework for complex view rendering. I know some guys on the Facebook iPhone app team and they're die-hard Cocoa developers, I can't see them ever saying "screw it" and using a UIWebView with HTML.

Go to your profile and swipe left on a wall post and observe the "Remove" button and its animation. Now go to the bottom of your wall, and tap on the "See more posts..." cell. Notice that the activity indicator is an animated GIF. Open the app frequently and you'll see certain elements in the UI automatically changing without downloading an update. Or check out m.facebook.com and play around with the news feed that is identical to the one in the iPhone app.

Granted, there are other approaches you can take to get this behavior, but I'm not sure why you would. My impression is that they're using HTML5 in these areas.

Re: Write your app in HTML5, upload it and get back app-store ready apps

#16

I think PhoneGap is doing great work, they're obviously getting better, and I don't mean to diminish what others have poured so much effort into. But, are there any successful apps made with PhoneGap? Writing apps in HTML5 is constantly hyped, but there isn't a single HTML app out of the dozens on my iPhone except Netflix. PhoneGap's app gallery doesn't have a single app I've heard of. (The Netflix app isn't too plea…

Mobile browsers are getting better and better, and apple's iOS happens to have the best. I think the app store distribution mechanism is the main reason you don't see many html apps. It's the big entry point, there's a huge network effect and its cool to say "we have an app for that". Maybe facebook's project Spartan will spark the inevitable switch to html. I mean, check out twitter or kindle on the ipad... what are they lacking in?

Re: Write your app in HTML5, upload it and get back app-store ready apps

#18
Nice, and I use PhoneGap for Android, but you lose all the niceties like access to hardware buttons (which means you convert limited screen space to menus) and keyboard and intents and whatnot.

I had to write some plugins to get my game working on Android (and there are still compatibility problems around opening intents), so PhoneGap apps definitely lose something in the usability department.

And of course animations are not successful in this environment.

Ads are a pain too, if that's important to you, with the Google Admob/Adwords migration happening and the mobile web vs app ambiguity.

PhoneGap seems helpful as a part of the app's main UI, but native chrome is still important to completing an app's functionality and usability. I don't see how Build solves that use case.

Still, it's a niche.

Re: Write your app in HTML5, upload it and get back app-store ready apps

#19
post #9

Earlier quoted context omitted.

The new LinkedIn and OkCupid apps are primarily HTML5 based. Not quite the same, but every new release of the Facebook app seems to have more of its existing views replaced by HTML5 counterparts.

I'm fairly certain that the Facebook iPhone app does not UIWebViews to render anything. Their fast-scrolling tableviews are painstakingly crafted from scratch, natively, and (I believe) still use Joe Hewitt's framework for complex view rendering. I know some guys on the Facebook iPhone app team and they're die-hard Cocoa developers, I can't see them ever saying "screw it" and using a UIWebView with HTML.

I just watched this video (http://gigaom.com/2011/09/27/facebook-mobilize-2011/) where Facebook's head of mobile product talks (a tiny bit) about using HTML5 in their mobile products instead of all native development to keep pace with launches on the Facebook desktop site.

Check out the video at ~16 minute mark.

Re: Write your app in HTML5, upload it and get back app-store ready apps

#20

Nice, and I use PhoneGap for Android, but you lose all the niceties like access to hardware buttons (which means you convert limited screen space to menus) and keyboard and intents and whatnot. I had to write some plugins to get my game working on Android (and there are still compatibility problems around opening intents), so PhoneGap apps definitely lose something in the usability department. And of course animation…

The menu button, back button, and search button all work with Phonegap. What version are you using?

http://docs.phonegap.com/phonegap_events_events.md.html

Post reply on HN