1 / 33

Building Connected Systems with Visual Studio 2008

Building Connected Systems with Visual Studio 2008. Darryl Burling Developer Evangelist Microsoft. Agenda. The age of connected applications Whats new in VS2008 WCF Background: WS*, .Net 3.0 and WCF ABC’s & improvments Bindings Contracts & Content What about IIS7?

hue
Download Presentation

Building Connected Systems with Visual Studio 2008

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 Connected Systems with Visual Studio 2008 Darryl Burling Developer Evangelist Microsoft

  2. Agenda • The age of connected applications • Whats new in VS2008 • WCF • Background: WS*, .Net 3.0 and WCF • ABC’s & improvments • Bindings • Contracts & Content • What about IIS7? • HTTP Programming

  3. User Experience Productivity Collaboration Web

  4. The age of connected apps

  5. Whats new in VS2008 to help? • Application integration (office, etc)

  6. Extracting information from Outlook Demo

  7. Whats new in VS2008 to help? • Application integration (office, etc) • Client Application services

  8. Client Application Services demo

  9. What about connecting to other machines?

  10. Whats new in VS2008 to help? • Client Application services • Application integration (office, etc) • Windows Communication Foundation • Tooling support • New Bindings • WCF for Devices • HTTP Programming models • WCF Profiling

  11. Windows Communication Foundation • WCF is an SDK for building SOA on Windows • Service execution runtime • Released with Windows Vista • Part of Microsoft .NET Framework 3.0 • Requires .NET Framework 2.0 • Available also on • Microsoft Windows XP SP2 • Windows Server 2003 • Windows Server 2008

  12. Addresses • Every service is associated with a unique address • Address is the location of the service • Address provides: • Transport protocol to use • HTTP • TCP • P2P • IPC • MSMQ • Name of target machine, site or network • Communication port, pipe or queue • Specific path or URI

  13. Bindings • A simple way of wrapping multiple aspects of communication • Protocols • Format and encoding • Security • Reliability • Transaction propagation • Interoperability • Extract all of that out of your code • Use a pre-defined template • Can customize • Can write custom bindings from scratch

  14. Out of the box Bindings • BasicHTTPBinding • BasicHTTPContextBinding • MSMQIntegrationBinding • NetMsmqBinding • netNamedPipeBinding • netPeerTCPBinding • netTCPBinding • netTCPContextBinding • webHTTPBinding • ws2007HttpBinding • wsDualHttpBinding • wsFederationHttpBinding • wsHttpBinding • wsHttpContextBinding Or build your own!

  15. Service Contract • OperationContract attribute • Methods only • No properties/indexers/events • Independent of visibility • Opt-in model • Other methods not included

  16. Service Contract [ServiceContract] interface IMyContract { [OperationContract] string MyMethod(string text); } class MyService : IMyContract { public string MyMethod(string text) { return "Hello " + text; } }

  17. Hosting • Separate host process can be provided by: • Microsoft Internet Information Services (IIS) 5.0/6.0 • Windows Activation Service (WAS) (IIS 7) • Your application • Called self-hosted • In-proc must be self-hosted

  18. Hosting in IIS • IIS 5/6 • HTTP/HTTPS only • Self Host other bindings • IIS 7 • Windows Activation Services (WAS) • Host any binding

  19. WAS & Hosting NET.TCP HTTP NET.TCP NET.PIPE NET.MSMQ Self Hosted Process WAS .NET Worker W3SVC Service Host

  20. WCF = Interoperability • Kiwibank • Java • Perl • Jscript • VBScript • Visual Basic 6.0 code • and Universe Pick Basic http://tinyurl.com/335flo

  21. Improvements from VS2008 • Good tooling support in VS2008 • Templates for WCF Services • WCF Configuration Editor • Integrated Unit Testing • Invoke services without building a client • WCF Profiling • Examine performance of services at debug

  22. WCF Tooling Demo

  23. WCF for .NET Compact Framework 3.5 • Consistent programming model for Windows Mobile device and desktop • Shrunk footprint from over 10MB to less than 1MB • Interoperates with desktop • Supported features • Subset of messaging layer • Subset of WS-Security and WS-Addressability • HTTP Messaging • Store and Forward Messaging • Extensible Transports • Not Supported • Service Model and Contracts • Compact SVCUtil

  24. HTTP Programming

  25. The Web in the real world • Everything (mostly) is URI addressable • HTTP Verbs • GET - Most Prevalent • POST – Overloaded, Used for actions • PUT, DELETE – Largely Ignored • Representation Format – (X)HTML • HTTP Response Codes • Stateless

  26. webHttpBinding • New “web-friendly” WCF Binding in Fx 3.5 • Allows for the development of RESTful services • Works across REST Continuum • HTTP and HTTPS Transports Only • Does not use SOAP envelopes • WebMessageEncoding • JSON • XML

  27. [WebGet] and [WebInvoke] • Indicate the HTTP Method for the operation • WebGet – Don’t make me write it • WebInvoke – All verbs other than GET (Method parameter takes in the name of the Verb) • Other Parameters • BodyStyle – Indicates whether the Request / Response are wrapped or not • RequestFormat – Json or Xml • ResponseFormat – Json or Xml • UriTemplate – Covered in a minute…

  28. HTTP Programming Demo

  29. Consuming using LINQ to XML Demo

  30. Summary • Connected Systems: • Distributed Data • Functionality surfacing • Connectivity • Much improved tooling in VS2008 • Easy to use WCF and build connected apps • New HTTP programming support in .Net 3.5

  31. Reminders • http://blogs.msdn.com/darrylburling • Subscribe to our free, online newsletters to stay up to date with Microsoft news, information & events • www.microsoft.co.nz/subscribe • TechEd 2008 registration is now open! • www.microsoft.co.nz/teched • Don’t forget to fill in your Evaluation form! • Hand in at end of day for complimentary software

More Related