Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"click instead of tap"

Do _not_ assume this will always work. If you bind to the tap events and change content positions you _will_ end up firing the click on an unintended element. Remember the click almost always trails the tap (save for on the Windows Phone platform). He mentions that jQuery Mobile does some "magic" to deal with the click and tap. This is the vmouse module and you can use this independent of the library for just this purpose.

"JQuery is enormous and has no business being on a phone"

It's a phonegap application, the assets can be packaged with the application itself which means that in many cases this doesn't apply.

"Massive Footprint. 248k wowsers"

I'm still confused why this matters if you are packaging your assets with the phonegap build which I would expect most people do.

He's very right. Phonegap is no trumpcard, but I'd appreciate a more thorough treatment of the "best practices" he espouses.



I don't develop phonegap apps but I'll have a go at answering this:

> I'm still confused why this matters if you are packaging your assets with the phonegap build which I would expect most people do.

Ignoring download time, loading, parsing, and evaluating 250k of javascript is not free[1].

[1] http://carlos.bueno.org/2010/02/measuring-javascript-parse-a...

That article is on a desktop (well, laptop) processor. The timings on mobile are obviously higher. JS parse & load is mostly ignored on the desktop but I know I've read at least one article where a team was pulling down their JS as plain text and eval()ing it later to get their load times down.


I'd be interested to see the actual numbers for jqm here but I don't think the 100-150ms initial load time is a deal breaker for almost any app.

Your point is well taken though, and thanks for the link.


It's more like 800-900ms. Here is a link to the jquery init time on Android: https://docs.google.com/spreadsheet/ccc?key=0Aq_a4WNAMuCEdDd...

I don't recall when this kind soul made this document public, but I believe it was in a similar discussion on hacker news and I've had it bookmarked since.

I have also done my own tests, and the iOS numbers are similar (depending on the device of course).


People sometimes have slow connections, particularly BB users who feel no need upgrade to the latest connection speed. The app has to be completely downloaded before it runs, unless you put external references in your PhoneGap packaged HTML, I guess, but then it would only run online.

Additionally mobile browsers are often slow to execute, so loading a lot of JS can bog down your app. For a while there was a big stink about iOS only using their best JS engine in Safari and not web controls, not sure if that every got solved, but laggy HTML based apps is a big problem.


Here's the standalone vmouse I use. It can be dropped into any project alone whereas the jquery team's vmouse cannot. https://github.com/michaeldhopkins/jquery-mobile-abstract-to...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: