Windows Communicaiton Foundation

1,570 views
1,508 views

Published on

WCF is unified framework for building Service Oriented Applications.

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,570
On SlideShare
0
From Embeds
0
Number of Embeds
820
Actions
Shares
0
Downloads
38
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • 1980s - Object Oriented 1990s – Component Based (dynamic loading) 2000s – Service Oriented (doing messages.. That is when we think about distributed envirountemnt) WCF – is unified framework for building service oriented applications. Windows Communication Framework – what the HECK does that mean? WCF, WPF, WF, Microsoft’s merry-go-round of acronyms seems to have experienced exponential growth with the releases of 3.0 and 3.5. Is it all just marketing hype? Fortunately, no! WCF was first released in 3.0, and lives in its most current form in 3.5. WCF puts a wide swath of .NET service technologies all under the same roof. Windows Communication Framework utilizes declarative and configuration-driven programming to enable you to define multiple endpoints against the same code. In a lot of ways, it is very much a hybrid of legacy ASMX, WSE, Web Service Enhancements and remoting all in one. Juval Lowy very rightly describes WCF as “plumbing,” and as “an SDK for developing and deploying services on Windows.”
  • Replaces ASMX services. Web Services Enhancements ( WSE ) is an add-on to the Microsoft .NET Framework which includes a set of classes that implement additional WS-* Web service specifications chiefly in areas such as security, reliable messaging, and sending attachments. [1] Web Services are business logic components which provide functionality via the Internet using standard protocols such as HTTP. Web services communicate via either SOAP or REST messages. WSE provides extensions to the SOAP protocol and allows the definition of custom security, reliable messaging, policy, etc. All the COM+ services that are available today are available to .NET and COM objects. Some of these services include, transactions, object pooling and construction strings, JIT, synchronization, role-based security, CRM and BYOT.
  • TodoItem Content Priority IsDone DateTimeSent ITodoService Void SubmitTodo(TodoItem) List<TodoItem> GetTodoItems(); Void RemoveTodo(string id); [ServiceBehaviour(… InstanceContextMode] TodoService Endpoint Change first endpoint Talk on Metadata endpoint Talk on testing tool wcftestclient Time for me [13]
  • What is Endpoint. Take a look on existing configuraiton. Address, Binding, Contract Address – is where should we talk to our service – the actual network address Binding – how should we communication (transport protocol, wc…) Contract – what the service should contain… Talk more on the mex binding!!! Base address … Press F5 and talk where from metadata is downloaded and more on test client, what does it have etc.. Change base address to localhost:8080/todoservice Change the address for the first endpoint (ws) Add new endpoint basic basicHttpBinding ---- is basic SOAP interactions Contract is the same! Show how to add enpoint through the wisard TCP // evalservice New one: NamedPipes.. – is for the same machine!! Show config once again! Show the client and how it differs now I can simply choose! show from one, then from another HIGLIGHT that this is the main key feature of the WCF! you don’t need to rewrite your code once again Time [12]
  • IIS hosting - new WCF site - delete existing services - add reference - rename svc file - specify TodoServiceLibrary.TodoService and don’t need code behind it - Configure our web.config - change name of the service - reconfigure to use ITodoService - IIS version plays role - view in browser for svc file May show loading metadata from the IIS hosted application Map directory the the site’s directory! Hosting in Win Service! ServiceHost host … typeof(TodoService) host.Start(), host.Close() serviceMetadata httpGetEnabled = true Create installer, change User account to LocalSystem build project ? wsdl
  • Windows Communicaiton Foundation

    1. 1. Windows Communication Foundation Getting Started Andriy Buday http://andriybuday.com/
    2. 2. <ul><li>Introduction to WCF </li></ul><ul><li>What is that? Why do we need it? </li></ul><ul><li>ABC concept of the WCF </li></ul><ul><li>Hosting </li></ul><ul><li>That all are words, let better dive into code. </li></ul>Outline
    3. 3. Windows Communication Foundation Unified framework for rapidly building service-oriented applications
    4. 4. What does WCF replace?
    5. 5. <ul><li>Data Contract </li></ul><ul><li>Service Contract </li></ul><ul><li>Simplest Ever Service </li></ul><ul><li>See how we can test it </li></ul>DEMO 1: Just to get started with something… Damn it! Let’s write some code!
    6. 6. Understanding WCF Principles Client Service Message Message
    7. 7. Client Service Message Endpoint Endpoint Endpoint
    8. 8. Client Service Message Address Binding Contract (Where) (How) (What) Endpoints Endpoint A B C A B C A B C
    9. 9. <ul><li>Endpoints in Configuration </li></ul><ul><li>ABCs in configuration </li></ul><ul><li>Different types of transferring </li></ul><ul><li>The main feature of the WCF lives here </li></ul>DEMO 2: Endpoints Damn it! Let’s configure it!
    10. 10. <ul><li>Simplest ever WCF client </li></ul><ul><li>IIS Hosted </li></ul><ul><li>Self-Hosted </li></ul><ul><li>Win-Service Hosted </li></ul>DEMO 3: Client & Hosting Damn it! Let’s use & spread it!
    11. 11. <ul><li>Book: </li></ul><ul><ul><li>MCTS_Self_Paced_Training_Kit_70_503 .pdf </li></ul></ul><ul><li>Great screencasts on WCF: </li></ul><ul><li> http://msdn.microsoft.com/en-us/netframework/wcf-screencasts.aspx </li></ul><ul><li>WCF Security Guidance : http://www.codeplex.com/WCFSecurity </li></ul><ul><li>Downloadable WCF Examples : http://www.microsoft.com/downloads/details.aspx?familyid=2611A6FF-FD2D-4F5B-A672-C002F1C09CCD&displaylang=en </li></ul><ul><li>WikiPedia : http://en.wikipedia.org/wiki/Windows_Communication_Foundation </li></ul>Links
    12. 12. Read blog! Follow me! Mail me! @andriybuday http://andriybuday.com/ [email_address]
    13. 13. <ul><li>Ask your questions! </li></ul>
    14. 14. <ul><li>Claims based end-to-end security </li></ul><ul><ul><li>Secure end-to-end message exchanges </li></ul></ul><ul><ul><li>Secure access to resources </li></ul></ul><ul><ul><li>Record resource access requests </li></ul></ul><ul><li>X509, Username/Password, Kerberos, SAML, custom credentials </li></ul><ul><li>Message security </li></ul><ul><ul><li>Confidentiality and integrity </li></ul></ul><ul><ul><li>Transport or message level </li></ul></ul><ul><li>Access to resources </li></ul><ul><ul><li>Authentication and authorization </li></ul></ul>Security
    15. 15. Standard Bindings Binding Interop Security Session TX Duplex BasicHttpBinding BP 1.1 N, T N N n/a WSHttpBinding WS M , T, X N , T, RS N , Yes n/a WSDualHttpBinding WS M RS N , Yes Yes WSFederationBinding Federation M N , RS N , Yes No NetTcpBinding .NET T , M T ,RS N , Yes Yes NetNamedPipeBinding .NET T T , N N , Yes Yes NetPeerTcpBinding Peer T N N Yes NetMsmqBinding .NET T , M, X N N , Yes No MsmqIntegrationBinding MSMQ T N N , Yes n/a
    16. 16. Ways to talk <ul><li>One Way: </li></ul><ul><ul><li>Datagram-style delivery </li></ul></ul><ul><li>Request-Reply </li></ul><ul><ul><li>Immediate Reply on same logical thread </li></ul></ul><ul><li>Duplex </li></ul><ul><ul><li>Reply “later” and on backchannel (callback-style) </li></ul></ul>Client Service One Way Request-Reply Duplex (Dual)

    ×