Template comparison:
This is a new template in VS 2008, but it compares roughly to the new web site WCF Service template if you use file-based web sites. I describe the details and differences below.
Impact to Learning WCF labs:
I don't recommend you use this template for the labs. I instruct you to use the new web site, file-based, WCF Service template where appropriate. This template will confuse you with the labs, and frankly, I don't think this template is very useful.
Summary of the new WCF Service Application template in VS 2008:
There is a new template for WCF services in VS 2008, the WCF Service Application. This new template produces similar results to the file-based web site using the WCF Service template (see my earlier post). The main difference is in the organization of the project files, whish is less ASP.NET and more assembly style. For this reason, I don't think it is valuable. For one, I never put my service code in the host project so the organization of service files outside of the .svc endpoint becomes irrelevant. Furthermore if I am hosting in a web site, I would rather use the familiar ASP.NET project layout than learn a new structure...I think this will confuse developers. I recommend you don't use this template and if you are hosting in IIS or want to use file-based because IIS is not on the machine...use the web site templates.
Having said that, I will still describe the template here.
You start by creating a project using the WCF Service Application template shown here:
And the generated project files include a samples service contract, service, .svc endpoint and web.config with appropriate <system.serviceModel> settings.
A few things to note about this include:
To modify the .svc code you have to view the .svc in markup by right-clicking on the View Markup context menu (yet another strange thing about this template...with web site templates you just double-click the .svc file and it opens):
Then you can modify the code from this:
<%@ ServiceHost Language="C#" Debug="true" Service="WCFServiceApp.Service1" CodeBehind="Service1.svc.cs" %>
To something like this (assuming you reference the HelloIndigo assembly, which has a HelloIndigoService type in it):
<%@ ServiceHost Service="HelloIndigo.HelloIndigoService" %>
Subscribe to dasBlonde RSS feed updates: Powered by FeedBurner
Designed by NUKEATION STUDIOS