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?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
jQuery Mobile is:
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.
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.
Also, see http://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.
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.