Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Proper way to Use Xamarin Forms with RESTFull Web Services and backend data

$
0
0

Hi, I'm new to Xamarin.Forms,

I have some questions about project structure and data access. I would like to create a Xamarin.Forms.Portable Solution for all three platforms with common data access code.

I'm trying to access a simple web based service with a REST endpoint without having to code that data access 3 times for it in each platform's OS specific project.

Here's what I would like to do in the common PCL project of my Xamarin.Forms solution (or shared project)

  1. use RESTSharp client or other REST Client to read a REST Service for JSON data (any examples available for this?)
  2. using JSON.NET to create business objects from that data (not sure what components or clients are available for this it doesnt seem like you can use xamarin components in the common PCL project but it appears you can use nuget packages)
  3. populate the a SQLite Database with that data (I see documentation on how to do this)
  4. create Xamarin.Forms pages with that data for each platform (I see docs and understand how to do this)
  5. Post updates back to the backend Service (best practices for this?)

I'm a bit confused about Steps 1 and 2 in the context of Xamarin.Forms - what's the best methodology for querying web services in Xamarin.Forms Solutions? Also is there a simple cross platform app that exemplifies this structure available?

thanks!


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>