1 / 14

Building Data Driven Applications Using WinRT and XAML

Building Data Driven Applications Using WinRT and XAML. Sergey Barskiy, Magenic Microsoft MVP – Data Platform Principal Consultant. Level: Intermediate. Overview. Dealing with Data in XAML Based Windows 8 Metro Style Applications WinRT – Windows Runtime. Data Options in WinRT.

tallis
Télécharger la présentation

Building Data Driven Applications Using WinRT and XAML

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Building Data Driven Applications Using WinRT and XAML Sergey Barskiy, Magenic Microsoft MVP – Data Platform Principal Consultant Level: Intermediate

  2. Overview • Dealing with Data in XAML Based Windows 8 Metro Style Applications • WinRT – Windows Runtime

  3. Data Options in WinRT • Persisting Data • Local • Remote / Cloud

  4. Data Binding • INotifyPropertyChanged • INotifyCollectionChanged • Changed since preview

  5. Data Options In Detail • WCF Custom Services • SOAP • REST • Web Api • Part of MVC 4 • OData • WCF Data Services (coming soon..) • Local • Windows.Storage • SQLite (not yet)

  6. Setting up For WCF Development • There is a setting in Project Properties to allow Loopback address or .. • Find Your Application’s ID (HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Mappings • Run CheckNetIsolation CheckNetIsolation LoopbackExempt -a -p=S-XXXXXX • Update Manifest to enable Networking and Internet Client

  7. WCF • WCF Custom Services • Create new WCF Service / Add Reference • Data Contacts / Data Members / Operation Contracts • End point configuration • Querying and updating data • SOAP vs. REST • Soap is easier to use / proxy generation • REST offers better performance and scalability

  8. WCF SOAP Service • Create new Service. • Use Service Contract • Operation Contract • Data Member • Define operations • Build the service • Add Service Reference to generate a proxy in Windows Metro Style project • Handle data binding! • Deploy the service • Setup URL on proxy

  9. WCF REST Service • Create new Service. • Use new template to get a head start • Define operations • WebGet, WebInvoke • Message Type XML vs. JSON • Build the service • Deploy the service • Use HttpClient • Use XML Serializer or JSON Serializer to convert data between service and client • Use headers to set content type

  10. ASP.NET Web Api • ApiController • Define actions • Update route table if necessary / match Urls in client to actions • Match actions to calls • User serializers to convert the data • Handle data binding • Validation

  11. WCF Data Services • WCF Data Services • Subject to changes • There will be a client for WinRT • Data Service Collection? • Define a service • Create proxy (http://odata.codeplex.com) DataSvcUtil.exe /uri:http://localhost/odataservice.svc/ /out:MyModel.cs /Version:2.0 /DataServiceCollection • Configure end point • CRUD operations

  12. Local Storage • Using Isolated Storage • Using Serializers • Helper class

  13. Data Options in WinRT • Summary • Remote vs. local data • Hosting remote data • Azure / Cloud • Hosting providers • Local Storage Options • Files • SQLite (coming later) • Data binding / storage solutions

  14. Contact Information • SergeyB@Magenic.com • http://DotNetSpeak.com

More Related