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?
4 Answers
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
-
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.– yannisDec 1, 2011 at 8:30 -
For all these reasons here: http://tech.amikelive.com/node-22/7-reasons-to-use-jquery-as-the-javascript-framework-in-your-web-20-apps/ (ok, maybe not the last one if you don't care about John)
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.
I use JQuery because I like how it has evolved, how there seems to be a plugin for everything I want, and most of all in the Javascript world, because the documentation is great. Also, I like the fact that you write very few lines of code to great effect. You really don't need to write rich UIs to have a reason to use JQuery.
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"...– yannisDec 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.
-
-
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
-
-