This lecture is an introduction to Windows Communication Foundation (WCF). We discuss WCF concepts and present
a few examples.
Readings and Activities for the Week:
- Read throught MSDN Getting Started with WCF Tutorial
- Read WCF Tutorial - tutorialspoint.com
- Look over Project #3 Statement.
Glossary of Terms
-
Windows Communication Foundation (WCF):
A communication framework that:- Is used to establish communication channels between processes, machines in a network, and across the internet.
- Supports Remote Procedure Calls and Message-passing.
- Provides a pluggable framework architecture with a lot of options.
- Can be hosted in a Windows process, as a Windows O.S. service, and in Internet Information Server (IIS).
- Runs only on Windows, but can, for some protocalls, communicate with other platfroms.
-
EndPoint:
A specification of both machine address and service, via ip addresses and port numbers. -
Service:
Processing that exposes an EndPoint to external clients. -
Contracts:
Interfaces that declare:- Service methods
- Data structure
- Message structure
- The Syllabus describes topics to be covered, reading material for you to digest as part of each lecture, and due dates for assigned projects.
-
Projects:
Introductory discussion of Sample Project #3. Sample Project #3, Sample Project #4 Project #3, Project #4 -
Windows Communication Foundation Presentation:
-
Tutuorials and Background:
-
Code examples:
Most of these examples are self-hosted services, e.g., run in a Windows process.You have to run Visual Studio as administrator to run these examples. If you don't run as administrator all the examples will abort with confusing error messages. To run "as administrator" use Windows search for Visual Studio. It will return Visual Studio app. Right-click and select run as administrator.Note that there is only one WCF project wizard, in Visual Studio 2015, that builds a service hosted in IIS. That doesn't do anything very interesting. Since your projects will use self-hosted services, I suggest you start with one of the examples below instead of using the wizard. By-the-way, you can take a project, like one of these, and export it as a template. That will then be available from the project selections. Hand Crafted WCF Services - BasicHttp, Hand Crafted WCF Services - WSHttp
Builds services without using the WCF wizard. Both declarative and programmatic construction of channels are illustrated. Self-Hosted Strings Service
Demonstrate service sending strings by value, reference, and receiving out string. Self Hosted File Service
Illustrates how to send files in chunks using a WCF service. Timed File Streaming Service
Illustrates how to use streaming (inherently chunks) for both text and binary files. WCF Message Passing Communication
Show how to build a simple, effective message-passing system using WCF data contract. WCF Peer-To-Peer Communication
This example uses both WCF and WPF to build a chat like facility. -
EXtensible Markup Language
XML Presentation, ppt
You may need to use XML in the bodies of some of your messages to convey structured information. -
Preparation for Synchronous Discussion:
- Go to one of the tutorials, listed above, and look up service instancing. Be prepared to discuss how you would use remote object instancing in Project #3.
-
Lecture Take-aways:
The most important things we discussed are:- WCF Presentation, pptx
-
Examples:
Hand Crafted WCF Services - BasicHttp, Hand Crafted WCF Services - WSHttp
Builds services without using the WCF wizard.
Both declarative and programmatic construction of channels are illustrated. Self-Hosted Strings Service
Demonstrate service sending strings by value, reference, and receiving out string.