0

So we already have a web service that was develop a long time ago. It's the legacy .net web service (not WCF)

I'm looking into how to build a web application that i'll be able to run on multiple different devices : IPhone, IPad, Android.

So far i've seen PhoneGap : http://www.phonegap.com/. This is interesting for us because it seems to allow us to use Native Device Features. Our app needs to use Scanning capabilities.

Since phonegap is based on HTML ... would it be possible to have it communicate with our legacy web service? How can this be achieved?

Let's say our app don't need to use any device native features, I guess just building a regular ASP.NET page should work right?

Do I have to make modification to our existing webservice? Like making it RESTful?

Any advice is appreciated,

Thanks,

pdiddy
  • 6,217
  • 10
  • 50
  • 111

2 Answers2

2

You simply create an XMLHttpRequest in Javascript, pass in your GET/POST parameters, and handle the XML which the webservice returns. It's quite simple, really!

jQuery gives javascript developers $.get and $.post functions which make this extremely easy. Remember, you can use any javascript library and function supported by the devices webview within your phonegap application!

MatBee
  • 284
  • 6
  • 16
  • What if my web service is not RESTful would this work? it is just SOAP base – pdiddy May 26 '11 at 18:28
  • Check this out for handling SOAP requests/responses. http://stackoverflow.com/questions/124269/simplest-soap-example-using-javascript – MatBee May 30 '11 at 15:59
1

Titanium Appcelerator is another alternative.

The application is developed in javascript and native code generated for iPhone, Android and in the latest release for Blackberry as well.

EDIT: Here is a comparison of Phonegap and Titanium.

Related discussion on Stackoverflow:

  1. Is Titanium appcelerator worth it for developing camera based application on ipad, iphone and android?
Community
  • 1
  • 1
Ozair Kafray
  • 13,351
  • 8
  • 59
  • 84
  • Thanks it seems like another alternative to phonegap but it's not free. Where phongap is open source. Thanks for the info! – pdiddy May 26 '11 at 16:47
  • Its free. The Titanium Plus isn't but that gives additional features in the form of modules. Its not open-source though. – Ozair Kafray May 26 '11 at 16:49