Tuesday, August 10, 2010

What are the main components of WCF ?

Dev Palmistry

What are the main components of WCF ?

The main components of WCF are

1. Service class
2. Hosting environment
3. End point

What was the code name for WCF ?

Dev Palmistry

What was the code name for WCF ?

The code name of WCF was Indigo .

WCF is a unification of .NET framework communication technologies which unites the following technologies:-

NET remoting
MSMQ
Web services
COM+

What are various ways of hosting WCF Services ?

What are various ways of hosting WCF Services?

There are three major ways of hosting a WCF services

• Self-hosting the service in his own application domain. This we have already covered in the first section. The service comes in to existence when you create the object of Service Host class and the service closes when you call the Close of the Service Host class.

• Host in application domain or process provided by IIS Server.

• Host in Application domain and process provided by WAS (Windows Activation Service) Server.

What is the difference WCF and Web services ?

What is the difference WCF and Web services ?

Web services can only be invoked by HTTP (traditional webservice with .asmx). While WCF Service or a WCF component can be invoked by any protocol (like http, tcp etc.) and any transport type.

Second web services are not flexible. However, WCF Services are flexible. If you make a new version of the service then you need to just expose a new end. Therefore, services are agile and which is a very practical approach looking at the current business trends.

We develop WCF as contracts, interface, operations, and data contracts. As the developer we are more focused on the business logic services and need not worry about channel stack. WCF is a unified programming API for any kind of services so we create the service and use configuration information to set up the communication mechanism like HTTP/TCP/MSMQ etc

What is three major points in WCF ?

What is three major points in WCF ?

We Should remember ABC.

Address --- Specifies the location of the service which will be like http://Myserver/MyService.Clients will use this location to communicate with our service.

Binding --- Specifies how the two paries will communicate in term of transport and encoding and protocols

Contract --- Specifies the interface between client and the server.It's a simple interface with some attribute.

What are the various ways of hosting a WCF service ?

What are the various ways of hosting a WCF service ?

Self hosting the service in his own application domain. This we have already covered in the first section. The service comes in to existence when you create the object of ServiceHost class and the service closes when you call the Close of the ServiceHost class.
Host in application domain or process provided by IIS Server.
Host in Application domain and process provided by WAS (Windows Activation Service) Server.

Difference between WCF and Web services ?

Difference between WCF and Web services ?

Web Services

1.It Can be accessed only over HTTP
2.It works in stateless environment

WCF

WCF is flexible because its services can be hosted in different types of applications. The following lists several common scenarios for hosting WCF services:
IIS
WAS
Self-hosting
Managed Windows Service

What is WCF ?

What is WCF?

Answer :

Windows Communication Foundation (WCF) is an SDK for developing and deploying services on Windows. WCF provides a runtime environment for services, enabling you to expose CLR types as services, and to consume other services as CLR types.

WCF is part of .NET 3.0 and requires .NET 2.0, so it can only run on systems that support it.



WCF is Microsoft’s unified programming model for building service-oriented applications with managed code. It extends the .NET Framework to enable developers to build secure and reliable transacted Web services that integrate across platforms and interoperate with existing investments.




WCF ---Windows communication foundation is a feature in .NET 3.5 framework.

As we have the webservice in the earlier versions, we have in addition WCF in 3.5.

The main advantage with WCF is
1) you can create one service that can be binded with multiple protocols, like HTTP, TCP,SecureHTTP.

so if you want to connect with HTTP you can use the endpoint http, and so on.

Here we have the concept 'ABC'
that is Address, Binding and Contract.
Here we create more than one endpoint with different bindings.
And you can use one of the binding well suited for your application.
For windows you can TCP, and for web based you can use HTTP or secure HTTP.






Windows Communication Foundation (WCF) is a framework for building service-oriented applications. Using WCF, you can send data as asynchronous messages from one service endpoint to another. A service endpoint can be part of a continuously available service hosted by IIS, or it can be a service hosted in an application. An endpoint can be a client of a service that requests data from a service endpoint. The messages can be as simple as a single character or word sent as XML, or as complex as a stream of binary data. A few sample scenarios include:

* A secure service to process business transactions.

* A service that supplies current data to others, such as a traffic report or other monitoring service.

* A chat service that allows two people to communicate or exchange data in real time.

* A dashboard application that polls one or more services for data and presents it in a logical presentation.

* Exposing a workflow implemented using Windows Workflow Foundation as a WCF service.

* A Silverlight application to poll a service for the latest data feeds.

While creating such applications was possible prior to the existence of WCF, WCF makes the development of endpoints easier than ever. In summary, WCF is designed to offer a manageable approach to creating Web services and Web service clients.

Wednesday, June 30, 2010