CSE681 - Software Modeling & Analysis

Lecture #15 - 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:

  3. DemoCreateServicePr4_2011
  4. Midterm Exam

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

  6. Tutuorials and Background:

  7. Microsoft Examples with some small edits:

    Note: These examples won't run until you have completed the setup described in the previous lecture page. 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 Previuos lecture page).

    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.

  8. 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.

    Service Object Lifetimes - Instancing

    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.

    WCF Wizard-based Service
    This project shows you what the C# WCF wizard generates. It's probably easier to start from one of my projects.
    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) of 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.

  9. Lecture Take-aways:

    The most important things we discussed are: