Choosing Right Type of WCF Project

Abstract

Before you begin coding, it is very important to understand what type of output and behavior is expected. These questions can be answered by reviewing your Deployment and Testing needs as well. In this article I will talk about the guidelines for choosing the right type of WCF project templates when creating WCF Service(s).

Introduction

Any application's life begins with choosing a Project Template. The right type of Project Template has a big impact on how your application will shape up, the output type and so on.

WCF Services Projects are no different than other applications except being the biggest player in the SOA world.

Various Visual Studio Provided Templates for WCF

the most commonly used type in the industry is either a WCF Service Library or a WCF Service Application, as shown in the image below:

Different Templates for WCF

The difference between the two depends on your Test and Deployment needs.

WCF Service Library

This type of project mainly consists of the three files, IService1.cs, Service1.cs and App.config.

WCF Library

A Service Library project uses the Windows Communication Foundation (WCF) Service Host (WcfSvcHost.exe) that allows you to launch the Visual Studio debugger (F5) and automatically host and launch the WCFTestClient.exe tool to expose the Service Contracts.

WCF Test Client

This type of project template is suitable when you are more focused on building the Service first but hosting and deployment later.

WCF Service Application

This type of project mainly consists of the three files, IService1.cs, Service1svc and Web.config.

WCF Application

The template automatically creates a Web site (to be deployed to a virtual directory) and hosts a service in it. To be specific by default is hosts in IIS Express.

Running WCF Service

These are the two most commonly used types in the industry that developers use to build, test and deploy their SOA applications using WCF.

Other types of WCF Templates mainly are the WCF Syndication Service Library (this template enables you to expose your feed in the RSS or ATOM format as a WCF service) and WCF Workflow Service Application (this templates create WCF services that host a Workflow Service, which is a workflow that can be accessed like a web service) that can be used as your requirements and project demands.


Similar Articles