C C T B H P N

Lecture #12 - Windows Communication Foundation

More Examples

Web Resourses:

Content:

This lecture continues the discussion of Windows Communication Foundation (WCF). We present more examples.
  1. The Syllabus describes topics to be covered, reading material for you to digest before coming to class, and due dates for the assigned projects.
  2. Projects:

    Project #2, Project #3, Project #4, Project2HelpF2018, Project3HelpF2018, Project4HelpF2018 Instructors Solution for Project #2

    Help for Message-Passing Communication

    Blog: message-passing communication, This blog entry and Communication Channel diagram show a very good way to build communication infrastructure. C++ Comm with File Transfer, C++ Comm class diagram, docx
    This is a quite complete implementation of a message-passing channel using C++. It's here to show you how to do important operations without building the WCF channel for you. Simple prototype for Message-Passing Communication - CommPrototype
    Demonstrates passing messages and getting replies for two clients and one server. Illustrates server returning replies to the concurrent client that sent the message. Does not implement file transfer (see next example). Prototype WCF Message-Passing Communication channel - CsMessagePassingComm, Class Diagram, Activity Diagram,
    Implements asynchronous message passing and file transfer using the WCF Framework. This is very close to what you will need for Project #4. Prototype WPF GUI for Pluggable Repository
    This is a WPF GUI demo, developed to test ideas for a Pluggable Repository I built for CSE681-OnLine. We will look at this when we get to WPF. Remote Pluggable Repository
    This is a quite complete Pluggable Repository with versioning, checkin and checkout, browsing, and file synchronization. It's linked here because it uses the CsMessagePassingComm channel.
  3. Midterm Exam

    You may find Topics for Midterm, doc, and materials to study for midterm doc will help you prepare for midterm examination.
  4. Windows Communication Foundation Presentation:

  5. Tutuorials and Background:

  6. Fawcett examples:

    Note: These examples do not need the setup described in the last lecture. Most of them self-host in windows applications. The few that do use IIS each supply their own web application.
    Most of the examples here are simple demos and have very little error handling. To show you how to add error handling I've taken one of the examples, BasicService - Programmatic, with no error handling, and added that in BasicService - Programmatic Version 2, with exception handling for each of the service methods. See comments in the handout. You will find that enhanced demo in the folder here. The following two demonstrations provide you with most of the technical details you will need to successfully use WCF.
    Hand Crafted WCF Services - BasicHttp, class diagrams, vsdx
    Builds services without using the WCF wizard.
    Both declarative and programmatic construction of channels are illustrated.

    Hand Crafted WCF Services - WSHttp
    Same as BasicHttp except protocol uses Secure Sockets Layer.
    The following diagram and demo focus on how WCF works.
    Service Object Lifetimes - Instancing
    Diagram illustrates management of remote object lifetimes on Server.
    Self-Hosted Strings Service
    Demonstrate service sending strings by value, reference, and receiving out string.
    WCF Wizard-based Service
    This project shows you what the C# WCF wizard generates. It's significantly easier to start from one of my projects.
    The next four demonstrations show techniques for building communication channels. Some of the techniques I used to build CsMessagePassingComm, below.
    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) of binary files. WCF Message Passing Communication, class diagram, vsd
    Show how to build a simple, effective message-passing system using WCF data contract. WCF Peer-To-Peer Communication, class diagram, vsd
    This example uses both WCF and WPF to build a chat like facility.
    Simple prototype for Message-Passing Communication - CommPrototype
    Demonstrates passing messages and getting replies for two clients and one server. Illustrates server returning replies to the concurrent client that sent the message. Does not implement file transfer (see next example). Prototype WCF Message-Passing Communication channel - CsMessagePassingComm
    Implements asynchronous message passing and file transfer using the WCF Framework. This is very close to what you will need for Project #4.
  7. Microsoft Examples with some small edits:

    Note: All but the first of these examples won't run until you have completed the setup described below. That's because most of them host in Internet Information Server (IIS). Microsoft is using only one web application to run any of them and the setup is required for that application switching to work work in IIS. The same is true for all the Microsoft samples (see below).
    WCF Self Host Service
    Microsoft's calculator service, used in many of the MS WCF Samples
    WCF Instances
    Show how to use each of the three server activation models using Microsoft Calculator service.
    WCF Message Concurrency
    Explore effects of message concurrency using Microsoft Calculator service.
    WCF Message Passing
    Illustrate use of message contract with Microsoft Calculator service.