.NET 3.0 End to End Example (WPF + WF + WCF + CardSpace = Jolly good fun)
Just before the Chrissy break, I ran through (at the Victoria .NET DevSIG) the first incarnation of my .NET 3.0 "End to End" demo that I have been wanting to build for some time.
While this ended up being a fair bit more then a simple Hello World example, it did turn out to be a pretty simple starting point for what will one day hopefully be my über demo for all things app-plat.
The Bits
I have posted the first (i.e. buggy, unstable, etc. etc.
) version of the code here.
To get this to work, you will also need to:
- Download and install the sample AdventureWorks database from here.
- Change the connection string constant at the top of the ProductsDB class
public class ProductsDB : IProductsDB
{
const string connectionString = "server=
(local);database=AdventureWorks;Integrated
Security=true";
...
}
- Copy the sample Adventure works images to the Images directory under the WPFClient project.
The Overview
This is my original concept "design"
A brief explanation of the above:
-
1. The user interacts with a WPF application (which also hosts a WindowsForms contrtol).
-
2. The WPF application hosts a Windows Workflow Foundation workflow.
-
3. The WPF application also calls a third WCF service directly using CardSpace security (
GetProductDetails) and the
WSFederationHttpBinding.
-
4. The WCF services are hosted in a console application and wrap AdventureWorks legacy business and data tier components.
-
5. Data is sourced from the AdventureWorks sample database.
This manifests into the AdventureWorks Solution that has 5 projects:
-
AWComponents: Contains the "legacy" Adventure works business / data tier components (originally from the AdventureWorks sample) that are converted into WCF Data Contracts (in ProductsObjects.cs) Service and Operation Contracts (in IProductsDB.cs).
-
SvcHost: Console application that hosts the WCF services.
-
TestClient: The original simple Windows Forms test client / harness.
-
WorkflowLibrary1: Windows Workflow Foundation project.
-
WPFClient: The "new" WPF Client.
-
You will notice the styling is very similar to the samples that come with the current version of
Expression Blend - That's because I "
lifted" some of the sexy XAML from these samples :-)
Enjoy !!! - Over the next few days I will pull out some of the more interesting integration bits / issues and blog about them.