<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Presentations_DevelopingSmartClientAppsForEnterprise_Default2" Title="Developing Smart Client Applications for the Enterprise" %>

Developing Smart Client Applications for the Enterprise

Session 1: Building and Deploying Smart Clients with Visual Studio 2005

Abstract

In this session you will learn a practical and best practices approach to building and deploying Smart Clients in the Enterprise. Maybe you’ve heard of Smart Clients and maybe you haven’t. Or maybe you are an Asp.Net developer who has come to realize you spend 5% of your time writing logic for your web application, and the remaining 95% of your time trying to make it function like a Smart Client. Whatever the case is, the fact remains that we use Smart Clients everyday and they are here to stay. In this session we’ll cover what exactly is a Smart Client and how they are built using Visual Studio 2005. Once we learn how to build them, we’ll cover how to deploy these applications as simple as a web application throughout the Enterprise.

Downloads

About SortaEnterpriseDesktop Solution

The download SortaEnterpriseDesktop.zip contains the start of a smart client application. It is labeled as "Sorta" because it does not use web services and instead connects directly to the local database AdventureWorks. The application is not broken up into a tiered architecture either. SortaEnterpriseDesktop is used to showcase some of the new controls in Winforms 2.0 and how to layout a 3 panel application with WinForms in .Net 2.0. It is ClickOnce ready and has custom APIs for ClickOnce deployment.

Opening Screen


Help Desk


Embedded Web Site


Start of Contacts Module

Features of SortaEnterpriseDesktop:

  1. Outlook look and feel.
  2. Click on the Contacts TreeNode and it will pull in all of the contacts from the Contacts table from a local AdventureWorks database.
  3. Once Contacts are loaded you can filter the contacts client side by Name and Prefix.
  4. The "Help Desk" button in the lower navigation panel when clicked removes the Main navigation and replaces it with the Help Desk application navigation as well as displays the Help Desk main dashboard in the right panel. This is used to show case the concepts of how to make your Smart Client modular.
  5. Clicking on MSN in the lower navigation takes you to the MSN home page. This shows off the power of being able to embed existing web sites into your application and provide your end users with quick accessibility.
  6. The application is pre-configured for ClickOnce deployment and is setup for ClickOnce automatic updates using the System.Deployment namespace. If you deploy the application via ClickOnce, launch it and the re-deploy the application via ClickOnce, it will automatically update itself.

Session 2: Building Enterprise Smart Clients using a Services Oriented Architecture

Abstract

This session picks up where session 1 leaves off.  It covers more detailed information which will show you how to architect an enterprise smart client application called Enterprise Desktop.  In this session we will explore how to architect Smart Client applications using web services and a SOA architecture and how to overcome some of the challenges such as changing business rules and validation without having to redeploy our application.  We'll also take a look at several application blocks of Enterprise Library and how they can be used in the application to save you time.  And finally we will look at a lot of best practices and patterns for separating business and data logic.

Downloads

Prerequisites

About EnterpriseDesktop Solution

The EnterpriseDesktop solution picks up where "SortaEnterpriseDesktop" leaves off and reworks the architecture for an N-Tiered approach as well as makes the application modular. The EnterpriseDesktop solution expands on the concept of displaying contacts in the UI by moving the logic into a contact module.  All source relative to Contacts is now located in one folder called Contacts.  Explore the directory structure and naming conventions of the projects.  The contacts module has the following projects as part of its structure:

1. Web Service - Provides methods for retrieving contacts and saving a contact
2. Business Layer - Has the rules that surround a Contact.
3. Data Layer - Data access layer using a strong typed DataSet which is used to save and retrieve contacts.
4. Translator - Used to bridge between the BusinessLayer and the DataLayer.
5. Proxy - This class holds the reference to the contact web service.
6. WinForm - Provides the user interface for the contacts in EnterpriseDesktop.

Additional projects were added which deal with Common APIs as discussed in the slide deck along with Enterprise Library has been added to the contact webservice as well as the UI. Enterprise Library can be found in a folder called ThirdPartyAssemblies. The complete runtime and full versions are located here so you can explore EntLib using the console located in the folder called Full. There is a sample web service method called GetTableData() in the contacts web service which uses three EntLib blocks within the one call. It is a good example of how EntLib is combined and used. In addition there is a Documentation web site which holds documentation for EnterpriseDesktop. Click the Help->Contents in the top menu to launch.

Contacts Module



Saving Contacts

Features of EnterpriseDesktop

  1. Same base features as "SortaEnterpriseDesktop"
  2. Contact data is retrieved through web service instead of database.
  3. Create New Contact
    1.  Validates First and Last Name in real time using same logic used in web service.
    2. Validates Email Address but doesn't account for the Email Address as being required. When you try to save the form the business rules in the web service require Email Address. It is a good show and tell of how rules may be different but the web service rules supreme over the UI.
  4. All web service calls are Asynchronous.
  5. Contact web service handles business rule validation.
  6. When saving a contact the UI updates itself according to which rules were broken on which control.
  7. Enterprise Library Caching Block Example - located in the contact screen.