Skip to content

shannonpahl/App-Service-Helpers

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Most mobile apps are what we consider connected apps (they have some form of backend infrastructure). Myself and Pierce have spent the last few months building numerous Xamarin apps that consume Azure App Services. During this time we've found ourselves writing the same code over and over which prompted us to put it into an easily consumable package and share on Nuget.

Follow Us

What is it?

AppService.Helpers

App Service Helpers makes it as easy as possible to add a backend to your mobile application. In just four lines of code, you can create a cloud-connected mobile app with online/offline synchronization and automatic conflict handling, so that your app continues to function even if the user loses network connectivity. App Service Helpers also comes with a preconfigured Xamarin.Forms ViewModel, so that you can bind directly to your data without having to write any additional code.

Getting Started

Add App Service Helpers

Configuring data access in your mobile apps with App Service Helpers is easy. Simply add the App Service Helpers NuGet, initialize the library, pass in your Azure mobile app’s URL, register a data model as a table, and finalize the schema, as seen below:

using AppServiceHelpers;
 
// 1. Create a new EasyMobileServiceClient.
var client = EasyMobileServiceClient.Create();
 
// 2. Initialize the library with the URL of the Azure Mobile App you created in Step #1.
// Example: http://appservicehelpers.azurewebsites.net
client.Initialize("{Your_Mobile_App_Backend_Url_Here");
 
// 3. Register a model with the EasyMobileServiceClient to create a table.
client.RegisterTable<TodoItem>();
 
// 4. Finalize the schema for our database. All table registrations must be done before this step.
client.FinalizeSchema();

AppService.Helpers.Forms

The Forms package is an extra download that unlocks a ViewModel base class that allows you to bind from XAML to Azure tables with minimal configuration on your end (just a couple of lines of code).

App Service Helpers for Xamarin.Forms includes a preconfigured view model that handles all communication with the EasyMobileServiceClient to help you get started fast. Add the App Service Helpers for Xamarin.Forms NuGet and subclass the BaseAzureViewModel:

using AppServiceHelpers.Forms
 
public class TodoItemsViewModel : BaseFormsViewModel<TodoItem>
{
        public TodoItemsViewModel(IEasyMobileServiceClient client) : base (client) { }
}

Release Notes

1.0.4

Bugs

  • Resolved package errors

Features

  • Removed Plugin.Connectivity

License

Licensed under MIT see License file.

Sample Apps

License

Licensed under MIT see License file.

About

Added awesomeness to Azure with Xamarin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%