Here is a code snippet showing the mechanism for directly consuming mobile cloud based data. The native interface supports LINQ based queries of POCO objects (strongly typed) via the RESTful interface. This code will populate a presentation layer asynchronously without creating ANY server side code to handle it.
private void RefreshTodoItems() { items = App.MobileService.GetTable< TodoItem >() .Where(todoItem => todoItem.Complete == false) .ToCollectionView(); ListItems.ItemsSource = items; }
At this point, you have built a data driven SOA that is able to be consumed directly by any windows 8 presentation layer.
Other items that are directly supported via the Azure Mobile Services are: push notifications, user authentication and paged queries -- all with the native services provided. It seems to be quite easy to directly connect your Windows 8 application to the mobile services in Azure. The upside being that it makes developing a Windows 8 client based on a cloud solution very quick and easy. The unanswered question is still how easily you can use this to consume data in cloud style without using a Windows 8 application. It appears that it would be possible to directly hit this service from any application able to read JSON from a REST service, but all of the supporting documentation is focused on a Windows 8 client. Either way, this is an exciting addition that should be investigated by those of us using Azure.
No comments:
Post a Comment