Link to home
Start Free TrialLog in
Avatar of SamJolly
SamJollyFlag for United Kingdom of Great Britain and Northern Ireland

asked on

What is the best way to link a PhoneGap app to an ASP.NET MVC application

Hi,

I am interested in created an ASP.NET MVC web application and have it link through to a native mobile interface using PhoneGap, for example to get some local GPS coordinates which then downloads some related data from the server application.

Another use may be to have a Mobile form application which may use some offline storage or Mobile feature.

So is it possible to link a PhoneGap app to an ASP.NET  MVC application. Some ideas I have had is via JSON within the page. However since PG is a container for webpages then perhaps there is someway to call a miniwebpage(View) within a page???

Thoughts?

Thanks,

Sam
Avatar of cubaman_24
cubaman_24
Flag of Spain image

Hello:
The easiest way is to have an WCF or MVC website returning json.
I don't understand very well what you mean with "call a miniwebpage(View) within a page"..

Best regards.
Avatar of SamJolly

ASKER

Hi there,

1./
"call a miniwebpage(View) within a page" was my attempt at describing the notion of having say part of a webpage with a form on it which calls back to the web application. Not sure if this form would be implemented as part of the app or as a MVC view thus using some concept of a container within the webpage which contains the view, abit like the old IFrame.

2./
With JSON I guess we are treating the PG app as a seperate entity(distributed) which occasionally calls out for data via JSON from the MVC application. My knowledge of JSON is very limited so I am not sure if you can do much more with JSON than text?

Thanks,

Sam
Another thought I have had is that since the PhonGap API is called via Javascript then one would think that one could embed this JS code in the MVC Views which would get executed when called from the app.

Sam
ASKER CERTIFIED SOLUTION
Avatar of cubaman_24
cubaman_24
Flag of Spain image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for your help