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)
- use RESTSharp client or other REST Client to read a REST Service for JSON data (any examples available for this?)
- 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)
- populate the a SQLite Database with that data (I see documentation on how to do this)
- create Xamarin.Forms pages with that data for each platform (I see docs and understand how to do this)
- 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!