jQuery Mobile?

Hi all,

I was browsing around and I came across jQuery Mobile: http://jquerymobile.com/

Are they branching jQuery to work with mobile? I thought that the basic jQuery worked pretty well with mobile already. Does this mean that we are going to have to pick and choose when we design a site to work across all of them?

Thanks.

I was under the impression that the UI elements and themes were the main differences, while most of the library code was still the same.

But, I suppose the under-the-hood code would’ve also had to have been reworked in order for jquery javascript code to work with mobile browsers and all their quirks.

jQuery mobile can be thought of as an add-on to jQuery that given *slight modification to an existing site can provide an experience *similar to a native app via the use the AJAX and animation. That is really all it is. The goal of jQuery mobile is provide an “app like” experience with as little work as possible to an existing desktop site. By “app like” I would be referring to design, eliminating page refreshes and providing animations when changing between “pages”. That pretty much sums up jQuery mobile in a nutshell.

Yup, it does :slight_smile:

jQuery Mobile is a little like jQuery UI in that regard, except optimised for a mobile experience of course.

I’ve just built my first jQuery Mobile website a few weeks ago. TBH, I felt like I could have probably done without it as I didn’t really use it with any of the UI widgets that it comes with, but it was good to have a play with it anyway.

For the next mobile web-app I build I would probably be tempted to delve into Sencha Touch or [URL=“http://jqtouch.com/”]jqTouch to see what they are like.

Sencha Touch is a completely different world than jQuery Mobile. Where jQuery mobile decorates an existing desktop site Sencha Touch is a javaScript MVC framework where a complete application can be built using JavaScript. There is very little control of the default mark-up (all divs), it will not work without JavaScript and the most recent version only works on android and iphone (blackberry is planned). One of the major benefits is that while jQuery mobile pulls in complete pages than extracts part of it Touch has a concept of models that pull only the data necessary to update views. Also, a lot can be achieved with very little code once the inner working is understood. The design and everything is just about taken care of. The developer just needs to stitch everything together unless development of a custom component is necessary to achieve an *important design goal. Though you will also have to get use to SASS as well since the framework CSS is built on SASS. It is really only a viable option when there is already and existing site and the primary concern for mobile are android and iphone users since everyone else will need to go to the normal site anyway. Though if those things can be accepted it is very powerful and well written though my experiences interacting with the devs via forums have been less than ideal. If there is something you want you really just have to figure it out yourself which isn’t daunting considering the framework is well written. The best way to put the comparison between jQuery mobile and Touch 2 is that someone with very little knowledge of JS can use jQuery mobile but that is not the case with Touch 2.

Yeah absolutely, and this is also one of the reasons that I haven’t used it before as I’m much more of a Progressive Enhancement fan… and having all the markup generated in JS kind of bugs me.

And dev time would probably be a lot less on jQuery Mobile for smaller projects.

From my experience jQ Mobile was a bit more of a run-and-go scenario. I kind of feel like I should build an app in Sencha so I have a fair basis for comparison :slight_smile:

@oddz: do you have experience with jqTouch as well?

Thanks for the replies everyone.

So, to clarify, if I were to use jQuery Mobile, I would put it in the page along (and after) jQuery itself, right?

Sounds like I have some experimenting to do. =p

That’s correct :slight_smile:

You would use it in the same manner as you would jQuery UI or jQuery plugins in that regard.

So, I’ve been playing with jQuery Mobile, and it is essentially a UI as others described. Basically if you use certain elements with certain attributes, it gets a specific look without having to write any JS or CSS.

Yup :slight_smile:

Though I must say I didn’t use their theme CSS last time I used jQuery Mobile, it didn’t really suit my needs, I was essentially only interested in the JS and core CSS framework part of it. Kind of looking forward to building a “real” web app where I can use jQM to a more fuller extent.

The one issue I always ran into in the beta stage a couple months ago is that after say 20 or so page changes the entire application would crash with jQuery Mobile. I’m not sue if it was just because of the large data sets I was working with or what but that is the reason I left it behind. Though it is the very first thing I looked at when working on a past project.

I recall attempting to use it but didn’t get to far. I was going to use it to normalize the touch events but I quickly found out that it is very unreliable. That was about six months ago so perhaps it has gotten better with new releases.

I enjoy working with Touch 2 compared to all of the solutions that I have been through. it is probably the MVC in me though. I used Touch 1 initially and Touch 2 is a vast improvement to the architecture. Though it is not the end all of solutions considering it is all JavaScript based, compatible only with webkit browsers and takes mobile client-side capabilities to the limit.

I wrote about that library Thu May 12, 2011 5:51 pm on my Bulletin Board:

http://www.oopschool.com/phpBB3/viewtopic.php?f=32&t=187

under the heading: 3. jQuery mobile

Perhaps a little off topic, but while I searched for information about building “mobile” web sites, I found this thread and a short article http://www.ericewe.com/online-marketing/six-easy-ways-to-make-your-website-mobile-friendly/ written by Eric Ewe. I highly reccomend the SitePoint book:

http://www.sitepoint.com/books/mobile1/

You find additional resources on my Bulletin Board:

http://www.oopschool.com/phpBB3/viewtopic.php?f=10&t=122