Wednesday, November 18, 2009

@PDC09 – Day 2 – Networking and Web Services with Silverlight

                                                                   (Rough notes from the session)

Getting Data into Silverlight :

  • Message Pattern
    • Request / Reply
    • Duplex (email sending, confirmation received from server)
    • Multicast (Server send only 1 copy)
  • Interaction Model
    • Operation centric (service and client in memory passing messages)
    • Resource centric (start with data or data model, CRUD)

Data Access Examples :

  • “Forms over data” E2E business app  
    (Request / Reply Message Pattern solution / Travel Agent Application example)
    • WCF RIA Services (System.Web.DomainServices)
    • Perscriptive model for CRUD services
    • Great tooling to maximize productivity
    • E2E data: sorting, paging, filtering, validation
  • Access data from third party REST service  (System.Net )
    • ClientHttp networking stack (WebRequestCreator.ClientHttp)
      • Integrated with the OS networking stack
      • Support common BrowserHttp stack features for consistent experience
      • Basic, Digest and NTLM authentication is supported in client stack
    • BrowserHttp stack
  • Access your database or SharePoint data model using REST (System.Data.Services)
    • WCF Data Services
      • Formerly ADO.NET data services
      • Services with RESTful interface and a set of conventions designed for easy data sharing
    • What is Data Services?
      • Server framework for .NET, other coming
      • Clients for silverlight
    • Accessing Data Services
      • Silverlight ClientHttp stack still an option
      • Data services client more usable as it knows the details of the data service interface
      • Features
        • Full abstraction on top of the services – no need to serialize
        • Data as objects with automatic change tracking
        • LINQ to querie
      • WCF Programming Model
        • Programming Model
          • Core Services
          • Web HTTP Services
          • Data Services
          • RIA Services
          • Workflow Services
        • Service Model
        • Channel Model
  • App which accesses server business logic (Operation Centric – System.ServiceModel)
    • Generated proxies
    • Serialization of objects on wire
    • High performance
    • Binary Message Encoder (server throughput increase / message size reduction)
      • Its the default encoder
      • It can also be used with IIS Gzip compression
    • WCF Features
      • Faults enabled in SL3
      • To get full exceptions, use ClientHttp stack
      • Security in cross domain scenarios enabled
        • Normally use browser-managed security (generally not safe for cross-domain use)
        • Transport security with message credentials in cross-domain scenarios
          (Browser never sees the credentials and can’t cache it for malicious things)
  • Chat app (System.Net)
      • Duplex Messaging
        • Server push is compelling when server has to notify client of events (email server)
        • Internet: PollingDuplex (HTTP-based)
          • SL4 – performance enhancements and scale across machines (for azure)
        • Intranet: NetTcp (TCP sockets based)
          • Also works for request / reply services
        • Both of above use same programming models, just need to change the binding
  • Streamed data (video, stock prices) inside an intranet  (System.Net)
    • Multicast Messaging
      • Scales to a large receiver population
      • Two key shapes
        • Single source multicast
        • Any source multicast
      • Need to expose a policy responder (just like sockets and http)
        • SL4 – policy file is going away for both sockets and multicast if app is elevated

No comments:

AddIn