Live data from Hacker News

JQ.Mobi Is A Mobile-Optimized HTML5 Rewrite Of the JQuery Framework

readwriteweb.com

31–40 of 43 posts

Re: JQ.Mobi Is A Mobile-Optimized HTML5 Rewrite Of the JQuery Framework

#31
post #15
post #2

does anyone know if it's compatible with backbone like zepto can drop in and replace jquery on mobile?

It might take a bit shimming to get it to work but JQ.mobi supports a lot of the most obvious methods used by Backbone: .bind(), .unbind(), .html(), .ajax(), .append(), .attr(). It doesn't seem to support .delegate() or .data() though, so you would probably have to shim these (and probably a couple of others that I forgot) yourself.

Does backbone use .data()?

Re: JQ.Mobi Is A Mobile-Optimized HTML5 Rewrite Of the JQuery Framework

#32

I've never had a need for JQuery on mobile. Since all mobile browsers support document.querySelector and document.querySelectorAll, I don't feel you gain that much from JQuery. That was always its killer feature on desktop. The event stuff is just sugar.

jQuery Mobile adds a lot of other useful stuff -- primarily the ability to create an iPhone-style UI from HTML markup. Unfortunately as other posters have mentioned, it's pretty slow.

Yup. All great projects but jQuery Mobile is just too damn slow. Drives me crazy.

Re: JQ.Mobi Is A Mobile-Optimized HTML5 Rewrite Of the JQuery Framework

#33

I wouldn't call this a rewrite of jQuery, it's more of a from-scratch implementation of a very small subset of jQuery APIs. The semantics of the subset vary significantly from jQuery as well. Take for example the show/hide implementation. `.show()` blindly sets the display to block. jQuery remembers the value it had when you hid it (block, inline-block, table-cell, etc.) and restores that setting.

Interesting, John Resig shared that exact same critique when Zepto first came out over year ago: http://news.ycombinator.com/item?id=1843787

Funny how both rewrites are missing this level of detail, or it could just be further evidence of how much JQ.Mobi "derives" from Zepto

Re: JQ.Mobi Is A Mobile-Optimized HTML5 Rewrite Of the JQuery Framework

#34
post #29

Something about the marketing of this makes me feel uneasy. The graphs that depict size are misleading. The initial release (today) is already at v0.9 and the site (opened 1 week ago?) says it's "fully ready to use in production" The video aims to enumerate and demonstrate a number of issues with jQuery UI and Sencha touch ("we can't get anything to work..."). "Zepto is slow", Zepto objects are big and have "large fo…

"fully ready to use in production", with absolutely no unit tests, and when the question comes up it's immediately dismissed: https://github.com/appMobi/jQ.Mobi/issues/2 Skip.

Funny as hell how they closed that issue with "trying to stop flamewar" comment :D :D

Re: JQ.Mobi Is A Mobile-Optimized HTML5 Rewrite Of the JQuery Framework

#35
post #15

Earlier quoted context omitted.

It might take a bit shimming to get it to work but JQ.mobi supports a lot of the most obvious methods used by Backbone: .bind(), .unbind(), .html(), .ajax(), .append(), .attr(). It doesn't seem to support .delegate() or .data() though, so you would probably have to shim these (and probably a couple of others that I forgot) yourself.

Does backbone use .data()?

Actually, you're right, it probably doesn't. I always use Backbone with the backbone.modelbinding plugin, so I forgot that it's not part of the Backbone core lib.

edit: Looks like JQ.Mobi does support .data() anyway: https://github.com/appMobi/jQ.Mobi/blob/master/jq.mobi.js#L3...

Re: JQ.Mobi Is A Mobile-Optimized HTML5 Rewrite Of the JQuery Framework

#36
post #30

WebKit only. That might be acceptable in certain circumstances, but only if your definition of acceptability stretches to “95% of the world is on IE6; we don’t have to support anything else for our site.” See also: “Those who cannot remember the past are condemned to repeat it.” Edit: to downvoters, I’m not being cranky: I specifically wouldn’t use this because of this lack of compatibility and would advise against u…

It quite clearly states it is intended for the certain circumstances you describe, Webkit on mobile devices. I don't believe anyone would suggest using this for the desktop environment.

Why would I be talking about desktop browsers on a post about a mobile framework?

Firefox I know at the moment is a very minor browser on mobile, but it has the potential to grow its install base. Opera is massive outside the US (StatCounter suggests it’s leading worldwide [1]) and doesn’t use WebKit either. And Microsoft doesn’t embed WebKit as a default browser on Windows Phone 7.

It’s fine to make the choice that you only want to support WebKit but you’re cutting out potential users and that should be highlighted, not hidden away in the source code comments.

[1] http://gs.statcounter.com/#mobile_browser-ww-monthly-201012-...

Re: JQ.Mobi Is A Mobile-Optimized HTML5 Rewrite Of the JQuery Framework

#37
post #33

I wouldn't call this a rewrite of jQuery, it's more of a from-scratch implementation of a very small subset of jQuery APIs. The semantics of the subset vary significantly from jQuery as well. Take for example the show/hide implementation. `.show()` blindly sets the display to block. jQuery remembers the value it had when you hid it (block, inline-block, table-cell, etc.) and restores that setting.

Interesting, John Resig shared that exact same critique when Zepto first came out over year ago: http://news.ycombinator.com/item?id=1843787 Funny how both rewrites are missing this level of detail, or it could just be further evidence of how much JQ.Mobi "derives" from Zepto

This is sort of thing that happens when developers start thinking that jQuery is "bloated" and that they can do better and start ripping out code without fully understanding the expected behaviour. Nothing in jQuery is there without good reason.

Re: JQ.Mobi Is A Mobile-Optimized HTML5 Rewrite Of the JQuery Framework

#38
post #24

Something about the marketing of this makes me feel uneasy. The graphs that depict size are misleading. The initial release (today) is already at v0.9 and the site (opened 1 week ago?) says it's "fully ready to use in production" The video aims to enumerate and demonstrate a number of issues with jQuery UI and Sencha touch ("we can't get anything to work..."). "Zepto is slow", Zepto objects are big and have "large fo…

Especially when parts are straight copies out of Zepto. Zepto Closest Implementation: https://github.com/madrobby/zepto/blob/master/src/zepto.js#L... JQ.Mobi: https://github.com/appMobi/jQ.Mobi/blob/master/jq.mobi.js#L3... Zepto End Implementation: https://github.com/madrobby/zepto/blob/master/src/zepto.js#L... JQ.Mobi: https://github.com/appMobi/jQ.Mobi/blob/master/jq.mobi.js#L4... That said, it's all open source an…

They didn't even bother to change the indentation whitespace...

Re: JQ.Mobi Is A Mobile-Optimized HTML5 Rewrite Of the JQuery Framework

#39

WebKit only. That might be acceptable in certain circumstances, but only if your definition of acceptability stretches to “95% of the world is on IE6; we don’t have to support anything else for our site.” See also: “Those who cannot remember the past are condemned to repeat it.” Edit: to downvoters, I’m not being cranky: I specifically wouldn’t use this because of this lack of compatibility and would advise against u…

I'm sorry you're being downvoted.

I tried their site on my phone, and got a nice "jQ.Mobi requires a webkit browser" popup, with a site that didn't react to any input.

And yes, I use Opera on Android.

Re: JQ.Mobi Is A Mobile-Optimized HTML5 Rewrite Of the JQuery Framework

#40
post #30

Earlier quoted context omitted.

It quite clearly states it is intended for the certain circumstances you describe, Webkit on mobile devices. I don't believe anyone would suggest using this for the desktop environment.

Why would I be talking about desktop browsers on a post about a mobile framework? Firefox I know at the moment is a very minor browser on mobile, but it has the potential to grow its install base. Opera is massive outside the US (StatCounter suggests it’s leading worldwide [1]) and doesn’t use WebKit either. And Microsoft doesn’t embed WebKit as a default browser on Windows Phone 7. It’s fine to make the choice that…

Well, I can't argue, excellent point.
Post reply on HN