Friday, May 4, 2012

WCF Basics

WCF Basics and END Points


Windows Communication Foundation (WCF) is a programming model for building service-oriented applications.

Windows Communication Foundation used for building secure and reliable, transacted solutions that integrates across platforms and work with existing applications.
WCF is a combined features of Web Service, Remoting, MSMQ and COM+. 

WCF provides a common platform for all .NET communication.




Advantages of WCF


     1)    WCF is interoperable with other services when compared to .Net Remoting where the client and service have to be in .Net.

     2)    WCF services provide better reliability and security in compared to ASMX web services.

     3)    In WCF, there is no need to make much change in code for implementing the security model and changing the binding. Small changes in the configuration will make your requirements.

     4)    WCF has integrated logging mechanism, changing the configuration file settings will provide this functionality. In other technology developer has to write the code.


 New Feature in WCF 4.5 .

 http://msdn.microsoft.com/en-us/library/dd456789.aspx

 Conceptual view

http://msdn.microsoft.com/en-us/library/ms731082.aspx


Features of WCF

1.     
Service Orientation

2.      Interoperability

3.      Multiple Message Patterns

4.      Service Metadata

5.      Data Contracts

6.      Security

7.      Multiple Transports and Encodings

8.      Reliable and Queued Messages

9.      Durable Messages

10.    Transactions

11.   AJAX and REST Support

12.   Extensibility

 


Workflow Services
Workflow Service explains  how to create and configure workflow services.

Endpoints: Addresses, Bindings, and Contracts
Explainhow to control multiple aspects of your service.

Data Transfer and Serialization
Explain how serialization of data can be tailored for interoperation or future compatibility.

Sessions, Instancing, and Concurrency
Explain the instancing and session modes of WCF and how to select the right mode for your application.

Transports in Windows Communication Foundation
Explain how to configure the transport layer, the lowest level of the channel stack.

Queues and Reliable Sessions
Explain queues, which store messages from a sending application on behalf of a receiving application and later forward these messages to the receiving application.

Transactions
Explains how to created transacted operations that can be rolled back if needed.

Windows Communication Foundation Security
Explain how WCF security helps you to create applications that have confidentiality and integrity. Authentication and authorization are also available, as are auditing features.

Peer-to-Peer Networking
Details how to create peer services and clients.

Metadata
Explainmetadata architecture and formats.

Clients
Explain how to create a variety of clients that access services.

Hosting

Explain hosting. A service can be hosted by another application, or it can be self-hosted.

Interoperability and Integration
Explain how to use WCF to extend your existing logic rather than having to rewrite it if you have a substantial investment in component-based application logic hosted in COM+.

WCF Web HTTP Programming Model
Explainthe WCF Web Programming Model that allows developers to expose WCF service operations to non-SOAP endpoints.

WCF Syndication
Explainsupport to easily expose syndication feeds from a WCF service.

AJAX Integration and JSON Support
Explainsupport for ASP.NET Asynchronous JavaScript and XML (AJAX) and the Javascript Object Notation (JSON) data format to allow WCF services to expose operations to AJAX clients.

WCF Discovery

Explainsupport to enable services to be discoverable at runtime in an interoperable way using the WS-Discovery protocol.

Routing
Explainthe routing service.






Difference between WCF and Web service


Features
Web Service
WCF
Hosting
It can be hosted in IIS
It can be hosted in IIS, windows activation service, Self-hosting, Windows service
Programming
[WebService] attribute has to be added to the class
[ServiceContraact] attribute has to be added to the class
Model
[WebMethod] attribute represents the method exposed to client
[OperationContract] attribute represents the method exposed to client
Operation
One-way, Request- Response are the different operations supported in web service
One-Way, Request-Response, Duplex are different type of operations supported in WCF
XML
System.Xml.serialization name space is used for serialization
System.Runtime.Serialization namespace is used for serialization
Encoding
XML 1.0, MTOM(Message Transmission Optimization Mechanism), DIME, Custom
XML 1.0, MTOM, Binary, Custom
Transports
Can be accessed through HTTP, TCP, Custom
Can be accessed through HTTP, TCP, Named pipes, MSMQ,P2P, Custom
Protocols
Security
Security, Reliable messaging, Transactions

No comments :

Post a Comment