posts - 52, comments - 14, trackbacks - 438748

Cached @ 1/5/2009 9:36:52 AM

Control ASP.skins_anothereon001_controls_blogstats_ascx

My Links

News

Archives

Post Categories

Blogs

Cached @ 1/5/2009 9:36:52 AM

Control ASP.skins_anothereon001_controls_singlecolumn_ascx

VSLive! Day Two - WCF for .ASMX and Remoting Developers

Presenter: Richard Hale Shaw

To understand why WCF was developed, first take a look at the existing technologies in the .NET framework:
Remoting
Remoting was one of the earliest parts of the .NET framework that was developed.  While extremely powerful, the APIs themselves do not conform to a lot of the common trends established in other parts of the framework.  It is rumored that Remoting was not initially intended for release with the .NET framework.

ASMX
Web services were a huge part of the hype involved in the initial release of the .NET framework.  There are a number of limitations with the implementation regarding the areas of performance, security, and transaction support.

WCF is built on top of Remoting but is designed to be more easily consumable and usable in applications.  The WCF technology itself is built upon an extensible framework that is the underpinning of WCF.  The fact that WCF was implemented within the extensible framework demonstrates the flexibility of the platform and gives evidence of its inherent extensibility.

Abstraction of Distribution
WCF abstracts the locality of distributed components via the channels and bindings architecture that it implements.  The developer need not be concerned whether an object exists in a different app domain in the same memory space, in the same app domain in a different memory space, on a different intranet machine, or on a different machine somewhere on the internet.  These details are abstracted out to the level of application configuration.  This greatly simplifies the life of the developer and reduces the cost of technology and deployment shifts that occur midway through the development cycle.

Main Types in a WCF Service
Service Contracts
Services contracts are types to which the ServiceContract attribute is applied.  The contracts contain the methods that the service provides.

Services
Classes that implement one or more service contracts are called services.

Hosts
Programs that instantiate services are known as hosts, most typically the host will be IIS.

Proxies
Proxies are classes that clients will use to communicate with a service.  Proxies derive from ClientBase<TChannel> where TChannel is the type of an interface contract.

Clients
Clients are consumers of services.

Data Contracts
Data contracts lay out the data that will be marshalled back and forth.  They are marked with the DataContract attribute.  A best practice is to decorate each of the properties within the data contract class with the DataMember attribute.  Data contracts use a different serializer than ASMX; the DataContractSerializer.

Fault Contracts
Faults contracts define the behavior when a WCF service encounters faults.

.NET 3.0 & 3.5 Deployment Misconceptions
The .NET framework version 3.0 release was really a mis-named release.  It uses the same CLR and runtime as the 2.0 version of the framework.  More accurately, the .NET framework version 3.0 release was WinFx which is simply the WCF, WPF, and WWF components.  The same misconception can exist with the 3.5 release, which contains the System.Linq, and System.Core libraries among some others.  This means that projects using the .NET framework version 2.0 can install and use version 3.0 and version 3.5 of the .NET framework without affecting the existing code.

Bindings
Bindings within WCF are a configurable part of the service that is being developed.  By changing the binding configuration, a WCF service can be exposed in a variety of different ways.  By choosing the correct binding, a WCF service can be exposed to look like an ASMX web service such that an ASMX client could use the service without knowing that WCF was powering the service from behind the curtain.  The same WCF service can be exposed in different ways simultaneously, such that the same ASMX client could use the service without awareness of WCF, while a newer client can take advantage of a more secure, feature-rich binding by accessing the WCF service on a different endpoint.  WCF ships with a wide variety of pre-defined bindings that are ready to use.

Print | posted on Wednesday, October 17, 2007 5:04 PM | Filed Under [ Software ]

Feedback

Gravatar

# web domain name

When you are surfing for domain name search articles and web pages, be certain to use every one of the resources available.
10/31/2007 8:43 AM | web domain name
Gravatar

# uewdtynx

uewdtynx
2/16/2008 5:48 PM | uewdtynx
Gravatar

# Bouncing boobs.

Big boobs. Free galleries big boobs. Boobs. Bouncy boobs.
6/20/2008 9:09 PM | Boobs.
Gravatar

# Incest porn.

Incest forums incest. Incest taboo rape photo. Incest taboo. Mother son incest pictures. Incest. Free incest pictures. Lesbian incest.
6/22/2008 2:06 PM | Lesbian incest.
Comments have been closed on this topic.

Powered by: