Avatar of SamJolly
SamJolly
Flag 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
ASP.NETResponsive WebJavaScript

Avatar of undefined
Last Comment
SamJolly

8/22/2022 - Mon
cubaman_24

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.
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
SamJolly

ASKER
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
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
ASKER CERTIFIED SOLUTION
cubaman_24

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
SamJolly

ASKER
Thanks for your help