I am new to jQuery and mobile apps development. I know the features of jQuery Mobile. I want to know where and why to use it. Can I use jQuery Mobile if I am developing a native app?
jQuery Mobile is:
A unified, HTML5-based user interface system for all popular mobile device platforms, built on the rock-solid jQuery and jQuery UI foundation.
Its use is to provide a consistent experience across mobile devices UI for web applications. Web applications are applications that are accessible via a web browser through the Internet. Some web applications are intended for local use but you would still need a browser to access them.
So if your intentions are to build a native mobile application (your question wasn't very clear), jQuery Mobile is not of much use to you. But if you are developing a web application that targets mobile devices, jQuery Mobile is a valid option. If it's better than other similar options is not a question that's considered on topic here, you should decide for yourself. Personally, I like it and use it but I don't have much experience on the mobile domain, so don't take my word for it.
No problem, also I upvoted you, I feel sad when I see an accepted answer with a score of "0" :-)– JalaynDec 1, 2011 at 8:20
@Jalayn Well it was a very low hanging fruit :) Dec 1, 2011 at 8:23
To really give an exact answer to your question: Yes.
Although JQueryMobile is meant for web applications (as pointed out by Yannis Rizos), you can use Phonegap to create native applications with JQuerymobile.
What Phonegap does, is create a native app with a webkit browser embedded. So it still is kind of a web application, but also kind of a native app, so it can be downloaded from the Market/Appstore, etc.
Also see Phonegap and JQuerymobile.
1+1 I did write that
Some web applications are intended for local use but you would still need a browser to access them, but that's far from actually giving a practical example. And now that I re-read it, although I had phonegap in mind there's no sane way to decipher that from my answer. Dec 1, 2011 at 8:30
Yeah, my answer was really meant as an addition to your answer :) Dec 1, 2011 at 8:35
Also, see https://stackoverflow.com/questions/176324/why-does-everyone-like-jquery-more-than-prototype-script-aculo-us-or-mootools-or and the accepted answer.
But honestly, prototype or scriptaculous are also great. In the end, it's just a matter of personal taste I think.
+1 for answering the "why" in the question instead of going for the very low hanging fruit of the "what"... Dec 1, 2011 at 8:33
You CAN. Your whole native application could be a single web browser screen (on iOS that would be a UIWebView) loading up local html and js content, and for that you absolutely can use any js library you like, including jQuery Mobile, JQ Touch, Sencha, or whatever.
SHOULD you? Maybe. Depends on whether you have the time and inclination to learn the native stuff for the platform you're developing for. Wrapping a web application has its benefits--it's how things like PhoneGap and Titanium work. You'll never build something that's as nice or fast or integrated as a native app, but it's quicker to develop.
Titanium actually creates real native applications these days.. Dec 1, 2011 at 13:36
Really? It doesn't just wrap a web application into a native wrapper? That's new since I considered it a year or so ago.– Dan RayDec 1, 2011 at 13:39
Its new since about a year or so ;) Dec 1, 2011 at 14:37
Well there you go.– Dan RayDec 1, 2011 at 14:42