Presentation is loading. Please wait.

Presentation is loading. Please wait.

Darryl Burling Developer Evangelist Microsoft The age of connected applications Whats new in VS2008 WCF Background: WS*,.Net 3.0 and WCF ABC’s & improvments.

Similar presentations


Presentation on theme: "Darryl Burling Developer Evangelist Microsoft The age of connected applications Whats new in VS2008 WCF Background: WS*,.Net 3.0 and WCF ABC’s & improvments."— Presentation transcript:

1

2 Darryl Burling Developer Evangelist Microsoft

3 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

4

5

6 Application integration (office, etc)

7

8 Client Application services

9

10

11 Application integration (office, etc) Windows Communication Foundation Tooling support New Bindings WCF for Devices HTTP Programming models WCF Profiling

12 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

13 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

14 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

15 BasicHTTPBinding BasicHTTPContextBinding MSMQIntegrationBinding NetMsmqBinding netNamedPipeBinding netPeerTCPBinding netTCPBinding netTCPContextBinding webHTTPBinding ws2007HttpBinding wsDualHttpBinding wsFederationHttpBinding wsHttpBinding wsHttpContextBinding Or build your own!

16 OperationContract attribute Methods only No properties/indexers/events Independent of visibility Opt-in model Other methods not included

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

18 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

19 IIS 5/6 HTTP/HTTPS only Self Host other bindings IIS 7 Windows Activation Services (WAS) Host any binding

20 Self Hosted Process Self Hosted Process W3SVC.NET Worker Service Host HTTP NET.TCP NET.PIPE NET.MSMQ WAS NET.TCP

21 Kiwibank Java Perl Jscript VBScript Visual Basic 6.0 code and Universe Pick Basic http://tinyurl.com/335flo

22 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

23

24 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

25 1.Define the contract (an interface) 2.Implement the interface 3.Run svcutil for NetCF Desktop / Server CustomBinding sendBinding = new CustomBinding(encodingElement, transportElement); IChannelFactory channelFactory = sendBinding.BuildChannelFactory ( params); channelFactory.Open() IRequestChannel outChannel = ChannelFactory.CreateChannel(new EndpointAddress(address); Message m = Message.CreateMessage() Message.reply = outChannel.Request(m, TimeSapn.MaxValue); TransmittedType o = reply.GetBody (); Net CF

26

27 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

28 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

29 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…

30

31

32

33

34 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

35 My Blog & Contact form http://blogs.msdn.com/darrylburling WCF Blog http://blogs.msdn.com/justinjsmith

36 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

37


Download ppt "Darryl Burling Developer Evangelist Microsoft The age of connected applications Whats new in VS2008 WCF Background: WS*,.Net 3.0 and WCF ABC’s & improvments."

Similar presentations


Ads by Google