CEO at Avalonia UI
mikecodesdotnet / app-service-helpers Goto Github PK
View Code? Open in Web Editor NEWAdd data storage and authentication to your app in a few lines of code.
License: MIT License
Add data storage and authentication to your app in a few lines of code.
License: MIT License
CEO at Avalonia UI
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:
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
Certain users may have large first-pulls when downloading the app (see Evolve app). We should add configurable options to allow users to better define the conditions for when these operations take place. For instance, I may not want push/pulls over LTE - only WiFi.
We still need to sort out exactly what this API would look like, but it's definitely something we should add.
Just wondering how you're thinking people will set the URL themselves as it was readonly?
I've changed this in the Forms sample branch to make it work.
Demonstrate how to use the library with Xamarin.Mac
There are a lot of customization scenarios (such as adding custom DelegatingHandler
s) 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.
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
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.
I believe we are requesting an incorrect offline_access
permission scope, which is causing issues. Just tested the 1.1 branch against Facebook, and issues are not occurring there.
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
Not sure if this is due to Xamarin Studio acting up or what... But we need to use the package. For now, I've manually compiled their portable project and am using that.
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.
https://github.com/jamesmontemagno/mvvm-helpers/blob/master/MvvmHelpers/ObservableRangeCollection.cs
This will only trigger 1 event instead of n events when inserting as you can AddRange(IEnumerable)
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.
Currently, there's a decent amount that needs to be changed to make the first-run process as simple as possible.
Initialization:
Init
method to each platform to handle the MobileServiceClient
/ SQLite
client initialization (particularly on iOS).I seem to have some package issues since fiddling.
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
Before shipping 1.1, we need to ensure that we have tests for the following scenarios at minimum:
Folders currently use codename Azure.Mobile
, instead of App Service Helpers
. Update folders and solutions to reflect this change.
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>(); }
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.
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.
Need to add XML method documentation so that we can get rich documentation for Azure.Mobile's APIs from Intellisense.
Thanks for the great demo!
I just tried this.
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?
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.
Hi there,
can I use the package after removing easytables (and automated backend Installation by azure) since nov2019?
Thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.