jQueryMobile on Zepto.js?
Asked Answered
L

5

20

I'm wondering if someone has tried already to port jQueryMobile on top of Zepto.js (http://zeptojs.com/) instead of the required jQuery?

Lais answered 14/1, 2011 at 12:54 Comment(0)
H
16

The main feature of Zepto.js over jQuery is its file size of ~10kb (minified, not gzipped) instead of jQuery's ~80kb. If you were to replace jQuery wuth Zepto.js then you'd still have to include jQuery mobile, which weighs in about 95kb (JS & CSS).

  • jQuery and jQuery mobile: 175kb
  • Zepto.js and jQuery mobile: 115kb

You'd save about 1/3rd of the download weight (not including HTML, images and other JS), making making a port of jQuery Mobile to Zepto.js unlikely to be worth the time.

Zepto.js currently also only supports WebKit browsers, meaning you'd be loosing support of Firefox Mobile and IE7&9 Mobile too.

Update: Zepto now supports a lot more platforms.

Hauptmann answered 23/2, 2011 at 17:39 Comment(1)
Just an update, Zepto is supporting a large numbers of browser now including firefox and opera. Support for IE is underway. zeptojs.comLyndy
U
11

dave1010 makes good points.

You may also be interested in a back & forth between the creator of Zepto (madrobby) and jQuery (John Resig) on Hacker News

Unbent answered 13/7, 2011 at 14:51 Comment(2)
@max That is almost 2 year old rant abount Zepto vs Jqeury. And even in that topic the rant is on the first beta release of zepto.Vanadinite
@Unbent The link is nothing more then a rant/bribe topic. comparing apples to pears. Not anything positive or real comparable comes out of it.Vanadinite
W
4

I think it's simply to early for that. jQuery Mobile hasn't seen an official release yet (only alpha2) and zepto.js is also still in its infancy.

Furthermore, zepto.js states "[...] that emulation of all features of jQuery is not a project goal", they just want to emulate the most useful parts. With this direction it is questionable if zepto.js can ever serve as a drop-in-replacement for jQuery in the mobile context.

However, a possible success of zepto.js could inspire the jQuery team... maybe we will soon see a "jQuery for Chrome Smartphones" build that has all IE/Firefox/Opera stuff compiled out.

Wera answered 21/1, 2011 at 9:1 Comment(1)
Although in some cases it's desirable to target specific user agents, encouraging developers to do this based on the current browser market shares doesn't seem like a good idea.Hauptmann
K
1

jqtouch already support zeptojs, you may want to give it a try.

Kirsti answered 29/1, 2012 at 21:33 Comment(0)
A
0

I started on a web project and I really, rally wanna use Zepto, but the current users developing for Zepto is really low. Not a big community, not to many plugins and I don't see why not using google's CDN for jQuery.

Zepto is great for senior JavaScript developers maybe.

Automatic answered 10/3, 2013 at 13:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.