GithubHelp home page GithubHelp logo

mikecodesdotnet / app-service-helpers Goto Github PK

View Code? Open in Web Editor NEW
79.0 79.0 28.0 4.71 MB

Add data storage and authentication to your app in a few lines of code.

License: MIT License

C# 100.00%

app-service-helpers's Introduction

Hello there ๐Ÿ‘‹

Working on improving Avalonia UI by day โ˜ผ and building a .NET lighting controller by night โ˜พ

CEO at Avalonia UI

app-service-helpers's People

Contributors

dansiegel avatar kiliman avatar mikecodesdotnet avatar robgibbens avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

app-service-helpers's Issues

Add "SyncStrategy" options for tables.

Each BaseTableDataStore should have a setting based on the SyncStrategy to allow users to select on a per-table basis how they would like to handle conflicts. The options are as follows:

  • LatestWins (Default Value)
  • ServerWins
  • ClientWins

Column with name 'azureVersion' is not defined

Hi. When I tried to add the model App.MobileClient.Table<Foo>().AddAsync(Foo);

I'm getting this exception

System.InvalidOperationException: Column with name 'azureVersion' is not defined on the local table 'Foo'.

I tested with the stable version and with the pre-release version="1.1.0-pre-release" version...

I have registered everything as the sample project

MobileClient = new EasyMobileServiceClient();
MobileClient.Initialize(Keys.ApplicationURL);
MobileClient.RegisterTable<Foo>();
MobileClient.FinalizeSchema();
public class Foo: EntityData
{
    public string Bar { get; set; }
}
public class FooStore : BaseTableDataStore<User>
{
}

Thanks

Allow users to initialize EasyMobileServiceClient with their own IMobileServiceClient.

There are a lot of customization scenarios (such as adding custom DelegatingHandlers) that cannot be done with App Service Helpers. To help open up App Service Helpers to more potential users, we should allow users to pass in their own IMobileServiceClient.

This will allow users to take advantage of App Service Helpers easy-to-use API, while still maintaining control over necessary customizations.

Remove requirement on Sync table

Right now we're using a sync table which assumes we'll be using SQLite. It'd be great to have an option to specific to not use a SyncTable as this would mean we can use the library with Xamarin.Mac

Add in the ability for BaseAzureViewModel<T> to customise data loaded

It would be beneficial when the data is loaded to be able to restrict what is loaded. It is quite likely that someone would want to restrict as it may be part of a one-to-many, many-to-many relationship or just filtering based on some device identifier.

Doing something like changing

var _items = await table.GetItemsAsync();

to a virtual method such as

var _items = await GetItemsForTable();
...
protected virtual Task<IList<T>> GetItemsForTable()
{
    return table.GetItemsAsync();
}

would allow users to have the flexibility of customising what they bring down for the table in more complex situations.

Reference Error in UWP Project

Hi,

i receive an error when trying to install the AppService.Helpers.Forms package in a UWP project :

AppService.Helpers.Forms 1.0.1 is not compatible with UAP,Version=v10.0 (win10-x86).

Is there a compatible package for this platform ?

Thanks

custom data store not working

I've created and registered a Table Data Store.

class ParticipantStore : BaseTableDataStore<Participant>
{
        
        public async Task<IEnumerable<Participant>> GetGameParticipantsAsync(Game game)
        {
            Initialize();
            await Sync();
            return await Table.Where(item => item.GameId == game.Id).ToEnumerableAsync();
        }

    }

public class ParticipantsViewModel : BaseAzureViewModel<Participant> {...}

and replaced

 //client.RegisterTable<Participant>();
 client.RegisterTable<Participant, ParticipantStore>();

Seems to fail when my view models vm.RefreshCommand.Execute(null) gets called

System.NullReferenceException: Object reference not set to an instance of an object.

Also,
Not sure how I can eventually call the GetGameParticipantsAsync(Game game) method I've created in the RefreshCommand because it looks like it only has a getter and no setter.

BaseAzureViewModel does not support EntityDataAlwaysLatest

The BaseAzureViewModel requires T to be of type EntityData and since there is no inheritance between EntityData and EntityDataAlwaysLatest, there is no way to actually use models inheriting from EntityDataAlwaysLatest with the BaseAzureViewModel.

Fix library setup/installation papercuts

Currently, there's a decent amount that needs to be changed to make the first-run process as simple as possible.

Initialization:

  • Add an Init method to each platform to handle the MobileServiceClient / SQLite client initialization (particularly on iOS).

Issue to sync

Hi,

I have used the App-Service-Helper for a hand-on lab with the Xamarin team. We have used the code here: https://github.com/histechup/xamarindevdayslab

After full completion of the lab, we ended up having an issue that I think was caused by the App-Service-Helper implementation. We were two guys on our own laptops using the same Azure instance. If one of us modified the Title field of one speaker, we could see the update in the table in Azure. However, the second guy would not see the update in its own emulator. Even after refreshing, closing the app, etc. It seems that there is a problem with getting the latest changes from Azure if using the call ITableDataStore.GetItemsAsync.

Have you seen that before? Is this a bug?

Cheers

Tests

Before shipping 1.1, we need to ensure that we have tests for the following scenarios at minimum:

  • Authentication
    • Facebook
    • Twitter
    • Google
    • AAD
  • Data Access
    • Easy Tables API
    • Custom Data Stores

LocalCachedUser Account deserialization always fails due to incorrect username key string check

Currently the Deserialize method in AppServiceHelpers.Authentication.Account is checking for __username__ (with double underscores) for the username key in the serializedString, however the string appears to only have a single trailing underscore: __username_

if (key == "__username_")

The method also creates the account using the empty constructor, which means the Properties field is always null, so the account is never completely constructed with it's properties.

public static Account Deserialize(string serializedString) { var acct = new Account();

Initialising the Properties dictionary in the empty constructor fixed this for me:

public Account() { Properties = new Dictionary<string, string>(); }

Can we get around having to register a data store

Just thinking out loud with this. Most users will simply inherit from our BaseDataStore without any modification and then register this with the SL.

It might then be beneficial to just register the model instead and deal with creating the datastore for them.

For existing tables?

I am not discounting the fact that the demo rocks and it is really good to see how simple it is to use the Azure APP Service. Thanks a lot of the demo. :) ๐Ÿ’ฏ

It is wishful thinking that people start with easy tables. Most often there will be hundreds of tables with interconnected references. Can we replicate the sample with Northwind database showcasing CRUD operations? That will help many people quickly adopt Azure APP Service.

Add XML method documentation

Need to add XML method documentation so that we can get rich documentation for Azure.Mobile's APIs from Intellisense.

Data not syncing with easytables

Thanks for the great demo!

I just tried this.

  1. Created a "MobileApps QuickStart" Template in Azure and created a AppService.
  2. QuickStart -> Xamarin Forms -> It created the todotable
  3. EasyTables -> todoitem table is available.
  4. Downloaded this ASH project, changed the URL to my appService URL.
  5. Deployed to device.
  6. Its working fine on the device, I am able to add and edit items.

But the problem is whatever the data I added is not visible in the table under EasyTables. Is there any additional steps I need to follow? To enable sync?

Create GitHub pages with docs

We need to ensure users can get started with the package as quickly as possible. To make this easy, I'll create a deployment script for a test backend and a number of sample apps.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.