Add web project in phonegap - android

I have web application design only with HTML5, CSS3 and Jquery along with this i have one project with AJAX enabled WCF services to provide endpoints to the HTML pages. I also have couple of projects that have webservices used in my web application.
Now I want to use convert this application into native apps with Phonegap.
please help me on this, forward resources that we can use to convert web application into native android via phonegap.

If you have used only used HTML, JS and CSS in your apps and no server side technologies like ASP.NET or PHP, you can easily get the entire code base running on phone gap. If you need to get the real mobile experience try mobile frameworks like jQuery Mobile or Kendo UI Mobile for UI.

Related

Desigining a mobile app for an existing Spring MVC application (Spring Mobile or Phonegap)

I created a web application on Openshift using Spring MVC and MySQL.
Now I want to go mobile for this application. I want to publish the same application as a mobile app (Android mainly). Primarily, this mobile version should play with HttpPost/Webservice security authorisation too.
I know Pivotal has a Spring Mobile project which helps create a mobile site for the same application (with more sophistication like spring form tags and all).
On the other hand, Phonegap can create a cross-platform mobile app with the help of HTML5 and CSS.
My questions are:
Is it worth it to put my effort on Phonegap or Spring Mobile?
If I choose Spring Mobile, how do I publish a mobile app in the Android Play store?
Some pros and cons or any links for reference would be helpful.
Intro
First, let me give you a warning. While this is a constructive question (better than average questions asked here), people usually like questions from users who spent some time searching for an answer themselves. I will explain this part later.
Differences
Phonegap (Cordova) and Spring Mobile are two completely different frameworks, they serve completely different purposes. You could have found that Googling.
Phonegap (Cordova) is a wrapper framework used for hybrid mobile app creating. Your HTML/CSS/JavaScript code is wrapped into native shell and you can use JavaScript <-> Native bridge code to access native phone functionality. Though you can use it as it is with vanilla JavaScript, it is often used with other mobile frameworks like jQuery Mobile, Sencha Touch, or Kendo UI.
Spring Mobile is an extension to Spring MVC that aims to simplify the development of mobile web applications. Spring Mobile is a framework that provides capabilities to detect the type of device making a request to your Spring web site and serve alternative views based on that device.
Effort
Everything depends what are you going to do. Hybrid mobile applications are usually done with separate client and server side code. Communication is done using AJAX. Because of this I would skip Spring Mobile and use only Spring as a RESTful web service framework. I personally prefer Play framework, but that's just me.
Of course, you would still need to choose a client-side JavaScript framework, or you can create everything from scratch. I would advise you to use prebuilt frameworks like mentioned jQuery Mobile.
If you really really want to use Spring Mobile
If you really want to use Spring Mobile, it can still be done. Phonegap can be used to wrap remote web sites into mobile applications. This approach has several downsides. The application is useless if your site is down and you will not be able to create iOS application because these kinds of applications are rejected on first sight.
Best course of action
Separate client and server side code
Choose a client side mobile JavaScript framework.
Use Spring as RESTful web service, or any other RESTful framework such as Play.
Wrap your client side code into Phonegap (Cordova)
Publish as Android, iPhone application
Links
How to create jQuery Mobile application with Phonegap | Mac version
Sencha Touch vs jQuery Mobile
Secrets of a good jQuery Mobile page architecture
If you already have experience with jQuery, learn the differences between jQuery and jQuery Mobile
http://projects.spring.io/spring-android/
Spring for Android is a framework that is designed to provide components of the Spring family of projects for use in Android apps. Like all Spring projects, the real power of Spring for Android is found in how easily it can be extended.

How to convert Asp.net mvc 3 mobile web Application to Android Application using Eclipse?

I m developing mobile web application using Asp.net mvc 3, jquery mobile, jquery it is running fine in android, iPhone.
How to convert this application into Android application using Eclipse?
First I do prefer not to convert them. Because if you are directly converting that you can not take benefit of native UI. But it will look same in mobile like it is running in mobile browser. But still if you want to try you can use phonegap .
If you want to do things with native I highly recommend mono for android . So, your backend will stay in asp.net mvc application and other things move to native application. And you can code in C# only.
Please let me know if any-other information needed.

Does Jquery Mobile Framework Help Web Developer

I am .net developer. I want to develop an application for mobile devices. As i am a web developer i am well versed with web technology & scripting languages. I am a big fan of JQuery so, i found something Jquery Mobile Framework for mobile application development.
So, I've got few questions:
Will this framework help me develop web applications or only for designing purpose?
Can i use my Jquery knowledge to implement web application using Jquery Mobile Framework?
Can i use Jquery AJAX in mobile app development?
It won't help you build a mobile "application" but it will help you create a mobile enabled web site.
It will help you build the front end of a mobile web application.
Yes
Yes, if you are referring to mobile web applications.
The back-end technology you use does not matter. I've built several .NET MVC sites using jQuery Mobile, which have all worked pretty well.
jQuery Mobile will help you build a website, you can then view that website in a browser or package it into an app. If you want to create native applications out of HTML/CSS/JS then you will need an intermediary step that lets you run a webview as your app. PhoneGap is an example of a framework that allows you to use native APIs while building your application in HTML/CSS/JS.
Your knowledge of jQuery will come-in handy but you will be forced to think about a jQuery Mobile website differently. For instance, pages are not HTML documents, but pseudo-pages that can be in separate documents but can also have multiple pseudo-pages inside a single HTML document. And because remote documents are brought into the DOM via AJAX (for animated transitions), you need to code your site to use unique IDs across the whole site, not just from page to page.
Absolutely! jQuery AJAX makes creating dynamic websites and native apps easy. You basically just load a bunch of views (in HTML/JS/CSS) into the app. package and then your server does the modeling. One cool thing to take into consideration is that since you are running from a mobile app., there is no domain from which the response is sent, so there is no cross-domain-policy to worry about.
If you have not yet checked-out PhoneGap, do so, and also see the documentation on the jQuery Mobile website regarding how to create PhoneGap applications using jQuery Mobile:
http://jquerymobile.com/demos/1.1.0/docs/pages/phonegap.html

UI Application using Spring MVC for web browser, android, iphone device

I have web app made using spring mvc. The web app gets jsp and renders on client.
How can I convert web UI to be better viewed on an iPhone or Android device?
I mean can I use something to sow my web UI properly on android or iphone browsers?
I would look at Dojo or jQuery. They both have modules to support mobile devices. Your view tier in Spring MVC would still be jsps.

Is it necessary to develop Pages separately for the Mobile access and browser access

We need to develop a Finance Application in Java J2EE which can be accessed from any client that is ( A mobile or Browser )
We need to use technologies like HTML , JSP , Servlets , EJB , Hibernate .
Please let me know is it necessary to develop Pages separately for the Mobile access and browser access?
what you are looking for is adaptative and responsive design, you will be mostly dealing with frontend. Boagworld has some nice contents and a great podcast on the subject
http://boagworld.com/dev/a-case-study-in-responsive-design/
You could have the backend entirely in java. And use jQuery mobile/bootstrap in the frontend. That way the application should work well in mobile browsers. Also using Ajax and having server compute all most everything should give you a very performing app in mobile browsers. Also checkout chrome emulation mode it should help in development and testing the responsive behavior

Categories

Resources