03/4/2007

Shortkey



ShortKey

About ShortKey    ShortKey Uses    Installing    Uninstalling    Prefix Key

Download     Buy Now

 

About ShortKey

ShortKey is a macro utility allowing you to set up replacement text or paragraphs for any given number of user defined keystrokes. ShortKey monitors the keyboard activity on a global nature and anytime a user defined keystroke combination (ShortKey) is typed in, it will be replaced with the replacement text.

      ShortKey is intended for use with programs that allow text input such as a word processor, text editor, email program, etc. It replaces a text string of up to 10 characters with a word, sentence, paragraph or several paragraphs, saving you valuable time by not having to manually type the text. Errors in typing can be eliminated. Simply choose a word or text string and associate it with the replacement text.
 
You may enter virtually an unlimited number of replacement text combinations per file. The replacement text may be up to 32 bit characters in length.
 
To make it work, run the program and go to Shortkey > > Activate menu or right click on icon placed on task bar. Check this menu item and all word and replacement combinations will be active. Once ShortKey is running, it will monitor all keyboard activity. If one of the specified words is used, it will be erased and the replacement text will be keyed in its place.
 
Activation Methods

The Prefix Key method allows you to designate up to two characters that are to be added to the front end of every ShortKey. For example you could assign a prefix of #. You would then type # plus your ShortKey to trigger the replacement text. This makes it unlikely that you would accidentally trigger a ShortKey, since you would not normally be typing # in front of any text

   

ShortKey Uses

Ideas for Using ShortKey
--------------------------------------------------------------------------------

If you do any repetitive typing, then you'll immediately recognize the benefits of ShortKey. Below are just a few of the possible uses for the program.

        Quickly insert Personal Information such as Name, Address, Phone, Fax or Email into documents, forms, email, etc.

        Insert URL's into your browser.

        Customer Support/Service Centers
        Working in a support center, you quickly realize that you receive the same questions over and over. Why keep typing the same information repetitively? Use a ShortKey to do this. Your productivity will increase immediately.

        Boilerplate Text
        Create boilerplate text for professions such as Legal, Medical, Dental, Insurance, Banking or Real Estate. Consolidate all of your standard phrases, terminology, clauses, etc. into a set of ShortKey. A few keys will save a lot of repetitive typing. Software developers will also find this a real time saver for inserting code.

        Medical Transcriptionists will love this program for its flexibility and ease of use.

        Sales Quotes
        Type a ShortKey when a customer requests a price or service quote. Keep templates in ShortKey for quick insertion into a letter, fax or email.

        Automate the entry of order forms, Web contests, etc.

The Possibilities go on...

Installing ShortKey

1. By default the program installs to the C:\Program Files\ShortKey folder. You may select another location during the install process.
2. You will also be asked to place a shortcut to ShortKey during the install process. This shortcut will be placed in the Start | Programs menu. You can select one of your existing Start Menu folders or install to the default ShortKey folder that will be created
3. The installer will also ask you if you want to place ShortKey shortcut on your Desktop.
4. The installer will also ask you if you want to place ShortKey in your StartUp folder. This option will allow ShortKey to automatically start every time you start Windows.
5. When the program is first started, an icon will be placed in the System Tray (next to the clock). Right clicking on the icon will bring up a menu of program options. Left double clicking on the icon will open the ShortKey window so that you can create or edit ShortKey.

  Uninstalling ShortKey

To remove ShortKeys from your computer follow the steps below:

1. Close ShortKey. Right click on an icon will be placed in the System Tray (next to the clock). Click on Exit.
2. From the taskbar, click the Start menu button to open the Start menu.
3. Choose Settings | Control Panel or click on Control Panel in Windows XP to open the Control Panel.
4. Double-click the Add/Remove Programs button. The Add/Remove Programs Properties dialog box opens
5. If necessary, click the Install/Uninstall tab to bring it to the front.
6. Scroll through the list box to locate ShortKey.
7. Highlight ShortKey.
8. Click the Add/Remove button. The Uninstall program starts.
9. Follow the on-screen prompts to remove ShortKeys from your computer.

OR

1. Click on Start | Programs | Shortkey | Uninstall ShortKey.
2. Follow the on-screen prompts to remove ShortKey from your computer

    Prefix Key

1. Run the ShortKey Program.
2. Click on Toos | Shortkeys Prefix | from the main menu.
3. Select # for the Prefix Keys. Click the "OK" button.
4. Click on New button on toolbar.
5. In the box titled "ShortKey" enter the following: test.
6. Tab to the box labeled "Text"
7. Enter the following: The brown cow jumped over the moon
8. Click on the "Save" button.
9. Click on Short Key | Activate from the main menu or Right click on System tray icon and select Activate.
10. Run the Windows "notepad" program (Click on Start, select run option and type in notepad and press the OK button.)
11. Once inside the notepad program, type the following: #test
12. The #test will be erased and replaced with the text: The brown cow jumped over the moon.
   

Product developed by Maulik Patel



Categories: product
posted by Maulik Patel at 10:00 AM | Leave Comment [0] | # Link to this entry
03/4/2007

Microsoft Visual C# 2005 Express Edition



Summary: This article introduces programming with the C# language using the Microsoft Visual C# 2005 Express Edition Integrated Development Environment (IDE). Using various example projects, readers will be exposed to several aspects of the C# programming language and key concepts of the .NET platform. (23 printed pages)

Download the Code.msi file.

Download the Code.msi sample file.

Note      This article assumes you're a hobbyist, student, or programming-minded individual interested in exploring the C# programming language and the .NET platform using Visual C# 2005 Express Edition. No prior exposure to C# is assumed or expected, however, some previous programming experience will be helpful.

Applies to:
     
Microsoft Visual C# 2005 Express Edition

Contents

What Is Visual C# 2005 Express Edition?
High Level Features of Visual C# 2005 Express
Visual C# 2005 Express Projects
Assemblies, Namespaces, and Types
Theory into Practice: Using External Types
Handing Exceptions with C# Express
Handing the Exception Programmatically
Creating a C# Class Library Project
Building a Windows Forms Application
Go Forth and Code: Visual C# 2005 Express Starter Kits
Summary

What Is Visual C# 2005 Express Edition?

A .NET application can be created using a variety of approaches. Die-hard developers are free to take the commando approach and build .NET programs using a no-frills text editor (such as notepad.exe) and the C# command line compiler (csc.exe). While the .NET Software Development Kit (SDK) is freely downloadable from Microsoft (www.microsoft.com/net), this approach will surely result in hand cramps, due to the lack of code generation utilities (wizards), graphical debuggers, and IntelliSense functionality in the SDK .

To help lessen the burden of building software at the command line, many .NET developers make use of visual tools such as Microsoft's full-featured IDE, Visual Studio .NET 2003 (http://msdn.microsoft.com/vstudio). While this product is very powerful, the Enterprise Edition may be cost prohibitive for the .NET hobbyist and/or college student . To be honest, unless you are a professional software engineer, the magnitude of options provided by Visual Studio .NET 2003 typically complicates, rather than facilitates, the learning process.

Somewhere between notepad.exe and Visual Studio .NET 2003 sits Microsoft's newest IDE, Visual C# 2005 Express Edition. At the time of this writing, the beta version of Visual C# 2005 Express Edition is offered free of charge through a Web download (http://msdn.microsoft.com/express). Given the relatively small size, Visual C# 2005 Express can be easily acquired even using a 56K modem connection.

Visual C# 2005 Express is actually one of several members in the Express family. Specifically, Microsoft provides the following Express Edition products:

  • Visual Web Developer 2005 Express: A lightweight tool for building dynamic Web sites and XML Web services using ASP.NET.
  • Visual Basic 2005 Express: A streamlined programming tool ideal for beginning programmers to learn how to build Windows applications.
  • Visual C# 2005 Express, Visual C++ 2005 Express, and Visual J# 2005 Express: Targeted programming tools for students and enthusiasts who wish to learn the fundamentals of computer science.
  • SQL Server 2005 Express: An entry-level database management system geared towards hobbyists, enthusiasts, and students developers.

In a nutshell, the Express Edition product lineup is an ideal entry point for hobbyist, students, and newcomers to the .NET platform. If this sounds like you, download and install Visual C# 2005 Express and read on.

High Level Features of Visual C# 2005 Express

Visual C# 2005 Express offers many of the key features you would expect to find in a .NET development environment, for example:

  • An ANSI compliant C# 2.0 compiler
  • A full-featured integrated debugger
  • Advanced IntelliSense capabilities
  • Design time support for Windows Forms development
  • Support for local database access
  • Extremely simple access to XML Web services

It is also important to understand what Visual C# 2005 Express does not bring to the table. Specifically, Visual C# 2005 Express doesn't directly support:

  • ASP.NET Web applications
  • Construction of XML Web services
  • Mobile application development (cell phones, PDAs, Windows CE devices)
  • Remote database connection tools

Within the pages that follow, you will be provided with an introduction of C# and the .NET platform using Visual C# 2005 Express. Please be aware however that this article is not intended to be a comprehensive tutorial on the C# programming language, the .NET platform, or the Visual C# 2005 Express IDE. The conclusion of this article provides additional links to .NET Web sites to further your learning process.

Visual C# 2005 Express Projects

A Visual C# 2005 Express project is composed of any number of C# source code files (which take a *.cs file extension), supporting content files (XML documents, application icons, images, and so forth) and referenced assemblies (defined later in this article). Rather than forcing us to create the same boilerplate code for a specific type of project (Windows Forms application, Console application, and so forth), Visual C# 2005 Express provides a number of core project types, described in the following table.

Visual C# 2005 Express Project Type Definition
Windows Application Creates a new Windows Forms project.

This type of project is used to create desktop application such as Microsoft Word.

Class Library This project is used to create a reusable code library (packaged as *.dll files), which can be used across your .NET applications.
Console Application This project creates a Console based application.

These applications are very useful when learning a new programming language such as C#, as you do not need to concern yourself with the construction of graphical user interfaces (GUIs).

Empty Project This option generates a project with no initial C# code files. This can be helpful when you wish to import existing files into a new project using the Project | Add Existing Item menu item.

To begin investigating C#, we will create a brand new Console application named MyCSharpExpressApp. The File | New | Project menu selection activates the new project dialog as shown in Figure 1.

Figure 1. Creating a new Console Application project

At this point, you may wish to save using the File | Save All menu selection. From the resulting dialog box, specify a location of your choosing, as shown in Figure 2.

Figure 2. Saving the current project

Note      This first Console application will not provide much functionality, but will serve as a vehicle to examine some fundamental concepts. We will build a complete (and more interesting) application later in this article.

Assemblies, Namespaces, and Types

Before we get too far along in this first example, it is important to come to grips with some key terms of the .NET programming trade. In my years of teaching software professionals, I can say with complete certainty that the distinction between an assembly, namespace, and type consistently confuses new .NET developers. Let's try to prevent this from happening to you.

When you build a project you are actually creating a .NET assembly. Formally speaking, an assembly is a physical file (which typically take a *.exe or *.dll file extension) that you can directly view on your hard drive using the Windows Explorer.

The Visual C# 2005 Express Solution Explorer window displays a subfolder named References, which lists the set of assemblies used by the current project. While different projects tend to reference a unique set of assemblies, Figure 3 shows the assemblies for the current Console Application.

Figure 3. Referenced assemblies for a Console Application project

As you are building more elaborate .NET applications, you will often need to use assemblies beyond the set included by a particular project. To do so, C# Express provides the Add Reference dialog box, which can be activated using the Project | Add Reference dialog box. You have no need to add additional assemblies at this point. Figure 4 shows the dialog box in question.

Figure 4. The C# Express Add Reference Dialog box

An assembly contains a set of namespaces. Simply put, a namespace is nothing more than a collection of types that are semantically related. Understand that it is very common for a single assembly to contain multiple namespaces. For example, the mscorlib.dll assembly contains namespaces for file input and output (System.IO), collection types (System.Collections), general purpose utility types (System), and so on.

Note      Every .NET application automatically references mscorlib.dll, therefore you will never need to manually reference this core library.

A namespace in turn defines any number of types. As of .NET 2.0, there are five kinds of types that are briefly (the key word being briefly) described in the following table.

.NET Type Meaning in Life
Class A class is a blueprint for an object. Like the blueprints to a house, a class can be used to create objects. Just like houses, the properties of each individual object can be totally different (blue vs red houses), but the blueprint will never change.
Interface Interfaces define a set of common methods a class or interface may support. Interfaces allow you to define a set of members a class or structure must support.
Structure Simply put, structures are lightweight class types. This type of type is ideal when modeling mathematical, geometric, or other fairly atomic data. Structures lack the object-oriented features of classes, such as inheritance.
Enumeration Enumerations (or simply enums) are a named collection of name/value pairs. Enums allow you to define known values for use in your program.
Delegate Delegates boil down to type safe function pointers. These types are the foundation of the .NET event architecture. Regardless of if you are handling a Button's Click event or handing a post back to an ASP.NET Web page, delegates are the underlying plumbing.

When a C# project needs to make use of types within a given assembly, the first step is to reference the *.dll using the Add Reference dialog as shown in Figure 4. The second step is to add a using directive at the top of the file to specify the namespace you wish to access. In reality, the C# using directive is nothing more a shorthand for specifying lengthy namespaces in your code, allowing us to use just File in our code in place of the full name System.IO.File. To illustrate, assume the following code:

using System 

namespace SomeProgram
{
class Program
{
static void Main(string[] args)
{
// Create an ArrayList and Hashtable
// (the hard way).
System.Collections.ArrayList a =
new System.Collections.ArrayList()
System.Collections.Hashtable h =
new System.Collections.Hashtable()
}
}
}

Here, we are creating an ArrayList and Hashtable type, both of which are within the System.Collections namespace. Rather than prefixing the namespace to the type directly, you can save yourself some typing with the following using directive:

using System 
using System.Collections // Add this!

namespace SomeProgram
{
class Program
{
static void Main(string[] args)
{
// Create an ArrayList and Hashtable
// (the easy way).
ArrayList a = new ArrayList()
Hashtable h = new Hashtable()
}
}
}

As you may suspect, your major goal as a .NET programmer is to become acquainted with the assemblies, namespaces, and types that you have at your disposal. Thankfully, C# Express provides an integrated object browser utility that can be activated from the View | Other Windows | Object Browser menu item. Using this tool, you can view the namespaces and types within each referenced assembly, as shown in Figure 5.

Figure 5. The C# Express Object Browser

Theory into Practice: Using External Types

Now let's add some code to the MyCSharpExpressApp project. When you are building an application that needs to interact with the local file system, you need to use the System.IO namespace. By way of an example, update your file's using directives and enter the following code within your Main() method:

#region Using directives
using System
using System.Collections.Generic
using System.Text
using System.IO // Need this for IO types!
#endregion

namespace MyCSharpExpressApp
{
class Program
{
static void Main(string[] args)
{
// Open a file named myInfo.txt
// located on the root C:\ drive.
string myFileContents
myFileContents = File.ReadAll(@"C:\myInfo.txt")

// Now print it to the console.
Console.WriteLine(myFileContents)
Console.ReadLine()
}
}
}

This application makes use of the File.ReadAll() method to open the specified file and return the contents as a string. In this case, the contents of a file named myInfo.txt is displayed directly to the console. Assume this file has been created with notepad.exe and that it contains a single line of text, as shown in Figure 6.

Figure 6. The myInfo.txt file

Save this file directly in your C drive and run the application using the Debug | Start Without Debugging menu option. If all is well, you should see the output as shown in Figure 7.

Figure 7. Your first C# Express application

Note      If this example does not work as expected, keep reading. The next section examines how to debug runtime exceptions using Visual C# 2005 Express.

Now assume you wish to display this information within a Windows Forms message box, rather than the console. To do so you will need to:

  • Reference the System.Windows.Forms.dll assembly.
  • Specify that you are 'using' the System.Windows.Forms namespace.
  • Pass the string returned from File.ReadAll() to the MessageBox.Show() method.

First, reference System.Windows.Forms.dll using the Add References dialog box shwon in Figure 8.

Figure 8. Referencing the System.Windows.Forms.dll assembly

Next, update your code as so:

#region Using directives
using System
using System.Collections.Generic
using System.Text
using System.IO // Need this for IO types!
using System.Windows.Forms // Need this for MessageBox!
#endregion

namespace MyCSharpExpressApp
{
class Program
{
static void Main(string[] args)
{
// Open a file named myInfo.txt
// located on the root C:\ drive.
string myFileContents
myFileContents = File.ReadAll(@"C:\myInfo.txt")

// This time, place in a message box.
MessageBox.Show(myFileContents)
Console.ReadLine()
}
}
}

Once you run your application again, you will find the contents of your file displayed within a Windows Forms message box like Figure 9.

Figure 9. Interacting with the MessageBox class type

Handing Exceptions with C# Express

The current example has made the rather large assumption that a file named myInfo.txt does indeed exist on the root C drive. If this is not the case, you will receive a runtime error (more formally termed, a runtime exception). Visual C# 2005 Express can help you diagnose such errors. To illustrate, delete (or rename) the myInfo.txt file and debug your program using the Debug | Start menu selection. As you can see from Figure 10, you are provided with numerous details regarding the current exception, as well as suggestions for correcting the issue.

Figure 10. Debugging exceptions using Visual C# 2005 Express

To fix the current problem, rename your text file to myInfo.txt.

Handing the Exception Programmatically

Given that the presence of an external file is not discovered until your application is running, C# programmers make use of a technique termed structured exception handling. As you will see, structured exception handing involves the use of a small number of C# keywords (most importantly try and catch).

When you are calling methods (such as the File.ReadAll() method) that may return a runtime exception, wrap the statements within a try scope. If an exception is triggered, the error is passed to a related catch scope, where you can handle the problem gracefully. If each statement in the try scope executes without error, the catch block is skipped completely. To test this out firsthand, update your current code as so:

namespace MyCSharpExpressApp
{
class Program
{
static void Main(string[] args)
{
// Attempt to open a file named myInfo.txt
// located on the root C:\ drive.
string myFileContents
try
{
myFileContents = File.ReadAll(@"C:\myInfo.txt")
MessageBox.Show(myFileContents)
}
catch(FileNotFoundException ex)
{
Console.WriteLine("Error: {0}",
ex.Message)
}
Console.ReadLine()
}
}
}

Here, we are making use of the Message property of the FileNotFoundException class to format our error message in the case that the file is missing, as shown in Figure 11.

Figure 11. Programmatically handling the FileNotFoundException

So much for this initial example application. Now that you have a better understand of the basics, let's create a more complex (and interesting) C# application.

Creating a C# Class Library Project

Our next goal is to build a .NET class library named ManagerSpeakLib.dll. Begin by closing the current MyCSharpExpressApp project (using File | Close Project) and create a new Class Library project named ManagerSpeakLib, as shown in Figure 12. Notice that you are given the option of 'discarding' the MyCSharpExpressApp project if you haven't saved it previously, allowing you to create quick test projects without cluttering your system with unnecessary code.

Figure 12. Creating a new Class Library project

The role of this class (which we'll rename to ManagerSpeak) is to return a randomly generated phrase that mocks the chatter often found in the corporate world. Update the ManagerSpeak class with a method named StateTheProblem():

#region Using directives
using System
using System.Collections.Generic
using System.Text
#endregion

namespace ManagerSpeakLib
{
public class ManagerSpeak
{
public ManagerSpeak(){}

// This method returns a randomly selected problem.
public string StateTheProblem()
{
string[] possibleProblem = {
"I think we really need to leverage...",
"We can emerge as a dominant force if we optimize...",
"To achieve an effective use of synergy we need to consider..."}
Random r = new Random()
return possibleProblem[r.Next(3)]
}
}
}

Here we are making use of the System.Random class to return one of the three statements in the local string array. The Next() method is used to obtain a random number, which in this case is between 0 and 2 (for a total of three possiblilties: 0, 1, 2).

Of course, every problem needs a solution. Therefore, add another method to the ManagerSpeak class named GetSolution():

public class ManagerSpeak
{
...
// This method returns a randomly selected solution.
public string GetSolution()
{
// String arrays with 10 segments each.
string[] list1 = { "integrated",
"individualized", "cooperative", "flexible", "authentic",
"functional", "responsive", "alternative", "performance",
"cognitive"}

string[] list2 = { "behavioral",
"relevant", "criteria", "prescriptive", "perceptual",
"facilitated", "modular", "diagnostic", "structured",
"situational"}

string[] list3 = { "strategies",
"methodologies", "assessments", "analysis", "learning",
"interaction", "objectives", "concepts", "recoveries",
"management"}

// Make use of a System.Random type to
// obtain a random string from each array.
Random r = new Random()
int a = r.Next(10)
int b = r.Next(10)
int c = r.Next(10)

// Now create and return the statement.
string newMsg = list1[a] + " " + list2[b] + " " + list3[c]
return newMsg
}
}

At this point, save your entire project (in a folder of your choice) using the File | Save All menu command. Compile your new code library by activating the Build menu. At this point, you should find your new code library located under the Bin\Release subdirectory shown in Figure 13.

Figure 13. The ManagerSpeakLib.dll class library

As you may know, *.dll assemblies cannot be directly executed by double-clicking on them from the Windows Explorer. Rather, they are loaded by the runtime when another application requests them. Given this, our next step is to build an application that uses ManagerSpeakLib.dll.

Building a Windows Forms Application

The application to make use of ManagerSpeakLib.dll will be a new Windows Forms project named ManagerSpeakClient (Figure 14).

Figure 14. Building a Windows Forms application

Once the project has loaded, you will notice that a visual Form designer is opened automatically, as shown in Figure 15.

Figure 15. The Visual C# 2005 Express Form designer

Visual C# 2005 Express supplies numerous tools that make the process of building graphical user interfaces (GUIs) a snap (all of which are accessible from the View menu). For example the Toolbox dialogue shown in Figure 16 displays numerous Windows Forms components that can be used to build your form's user interface.

Figure 16. The Windows Forms Toolbox

On a related note, the Properties window shown in Figure 17 allows you to configure the currently selected widget (Form, Button, and so on) at design time.

Figure 17. The Properties window

Using these tools, create a simple user interface that consists of a Button and Label as shown in Figure 18. Note that I set the Text property (using the Properties window) of the Label, Form, and Button to fitting descriptions.

Figure 18. The Manager Client Form

Next we need to reference ManagerSpeakLib.dll using the Add References dialog (again, activated using the Project | Add Reference menu item). Be aware that when you wish to reference your own custom *.dlls, you will need to select the Browse tab and manually navigate to the location of the code library you wish to use, as shown in Figure 19.

Figure 19. Referencing your ManagerSpeakLib.dll assembly

To complete our Windows Forms application, double click on the Button using the Form designer. This will automatically handle the Click event for the button type and generate the following code:

private void button1_Click(object sender, EventArgs e)
{

}

At this point you are free to add the code to manipulate the ManagerSpeak class. Here is the complete code update (notice the C# using directive for ManagerSpeakLib).

#region Using directives
using System
using System.Collections.Generic
using System.ComponentModel
using System.Data
using System.Drawing
using System.Windows.Forms
using ManagerSpeakLib // Need this!
#endregion

namespace ManagerSpeakClient
{
partial class Form1 : Form
{
public Form1()
{
InitializeComponent()
}

private void button1_Click(object sender, EventArgs e)
{
// Make a manager.
ManagerSpeak m = new ManagerSpeak()

// Get the problem.
string currentProblem = m.StateTheProblem()

// Get the solution.
string solution = m.GetSolution()

// Show the details!
MessageBox.Show(string.Format("{0}\n{1}",
currentProblem , solution))
}
}
}

Now run your Windows Forms application and click the Button. You will find a randomly generated problem/solution, shown in Figure 20, in the very distinct (and generally annoying) dialect of 'manger-speak'.

Figure 20. Behold, manager-speak!

This wraps up our Windows Forms application. Fell free to save this project on your machine using the File | Save All menu option.

Go Forth and Code: Visual C# 2005 Express Starter Kits

At this point you have created three different C# Express projects (a Console program, a Class Library, and a Windows Forms Application). While this introductory article did not cover all aspects of the C# language (or the full functionality of Visual C# 2005 Express), I do hope you are in a good position for further exploration.

To wrap up this article, I leave you with the topic of starter kits. Simply put, a starter kit is a complete C# application that intends to illustrate numerous programming concepts. Moreover, starter kits provide full documentation, code walkthroughs, and suggestions for extending the out-of-the-box functionality. One default starter kit is the Screen Saver Starter Kit, which can be selected from the New Project dialog box shown in Figure 21. You can launch the kit using the File | New | Project... menu selection.

Figure 21. Selecting the Screen Saver starter kit

Once you have selected the Screen Saver project and clicked the OK button, the starter kit's documentation file (ScreenSaverStarterKit.htm), shown in Figure 22, is loaded by the IDE. Here you can learn about the basic composition of the project at hand.

Figure 22. Reading up on the Screen Saver starter kit

As you can see, this starter kit provides details of each code file, as well as a step-by-step walkthrough of the project's design. You can run the application by pressing the F5 key. If you are connected to the Internet, you will be able to view RSS (Really Simple Syndication) feeds presented on top of a rotating set of background images.

Summary

Visual C# 2005 Express is an ideal entry point for newcomers to the .NET platform. As you have seen in this article, the IDE provides a set of project types, a graphical debugger, and numerous Windows Forms designers. While this article did not offer a complete tour of the IDE, you are hopefully more comfortable navigating around your active projects.

The bulk of this article was spent introducing some core terms in the .NET universe. Recall that assemblies are binary files that contain any number of namespaces. A namespace in turn defines any number of types (classes, interfaces,

Click Here


Categories: product
posted by Maulik Patel at 10:00 AM | Leave Comment [0] | # Link to this entry
02/7/2007

Build Interoperable Systems with .NET 3.0 Technology



An insurance-industry scenario is used to demonstrate interoperability capabilities of the Microsoft platform.

Mike Walker

Microsoft Corporation

December 2006

Applies to:
      Microsoft .NET Framework 3.0

Summary: This white paper will use an insurance-industry scenario to demonstrate interoperability capabilities of the Microsoft platform. Using protocol-level standards alone is not enough capturing the business side of the messaging transactions is key to making interoperability work for your business. This is true across all industries, not just insurance. (15 printed pages)

Contents

Introduction
Insurance-Industry Forces
Business Terms Used in This Document
Life-Insurance Policy Scenario
Architecture Overview
The Insurance Agent Policy System
The Insurance Carrier Systems
What Is the Value?
Conclusion
Resources

Introduction

The purpose of this white-paper series is to provide guidance around integration challenges.

Through this white paper, we will use an insurance-industry scenario to demonstrate interoperability capabilities of the Microsoft platform. Through maturity of many enterprises, we live in a world where there is more than one stack of technology. These platform stacks range from legacy mainframe-based COBOL or FORTRAN types of applications to the more modern solutions based on .NET, Mobile Systems, or Java— and everything in the middle. As a result, as enterprises have iterated through technologies and technology trends, there has been more than a few bandages applied to the various technologies.

Insurance Interop Series

This white paper will serve as a guide for architects who are facing integration challenges in the insurance industry. We will show you how to use Microsoft integration technologies to integrate disparate systems in your enterprise. Additionally, this document will provide pragmatic design guidance for building interoperable solutions using open standards such as WS-*. Additional documents in this series will include the following:

Architecture Overview to Building Interoperable Insurance Systems

Securing Insurance Solutions

Scaling and Operational Management

Deploying Enterprise Solutions

Developing Composite Applications

Technologies that will be covered include:

  1. BizTalk 2006. The integration technology for this solution. The solution also uses the BizTalk business rules and workflow orchestration.
  2. Windows Communication Foundation (WCF). The programming model to develop Web service messages and manage protocol-level communication by using the WS-* protocols.
  3. Windows Workflow Foundation (WF). To create compelling workflows using smart-client technologies.
  4. SQL Server 2006. The repository for all of the application and customer data.
  5. Windows Server 2003. The server platform.

This scenario will give us a glimpse into the business process. Like many businesses, each insurance company has its own unique way of handling its process. However, there are some similarities that these businesses share at the platform level. The purpose here is to demonstrate that there is a way to leverage these common platform services to build Service-Oriented Architectures (SOA) giving an organization more agility with the processes that differentiate their specific business.

Insurance-Industry Forces

In the insurance industry, there are many technologies at play, ranging from mainframe to UNIX to Windows. With this wide range of platform technologies, it is increasingly difficult to manage and operate while trying to be agile in an ever-changing financial market. For years, organizations have been building and buying technologies to meet these needs. Interoperability has become a necessary evil after the solution has been built and/or implemented. This has left us with point-to-point integrations that address very specific problems only at the application or system level, but not at the business-function level.

Figure 1. The result of point-to-point integrations

If care is not taken, point-to-point integrations over many years result in:

  • IT portfolio management becoming unmanageable, given the duplication of systems, multiple variations of integrations, management of dependencies of applications, and so forth.
  • Increased cost of IT systems, dramatically rising because of the number of custom integrations.
  • Loss of agility, because development of systems is slowed significantly as a result of increased code complexity, limited reusability, and lack of standardization in the enterprise.

So, what does this mean to many insurance carriers? It means that interoperability is at critical importance— not only as an efficiency issue, but also as a competitive differentiator. In these days of modern competition, companies must increase the return on investment (ROI) of their IT systems by streamlining the processes and becoming more agile to stay competitive.

Our goal is to address the industry challenges with a set of enterprise-ready technologies on the Microsoft platform. We use the following principles in the examples:

  • Enterprise-class solution
  • Standard communications:
    • Use WS-* standards
    • ACORD messages
  • Ensuring interoperability with existing solutions

Business Terms Used in This Document

ACORD— ACORD (www.acord.org) is a nonprofit association whose mission is to facilitate the development and use of standards for the insurance, reinsurance, and related financial-services industries.

Order system— Creates requests for external data, transmits them to the appropriate third-party data provider, manages responses received, and matches responses to the appropriate original requestor.

Third-party service provider— An external system to fulfill an underwriting requirements request (for example, a credit-rating system).

Underwriting process— Implementation of the business process for assessing and processing a new business.

Broker system— Possible smart-client front-end system for order entry and progress monitoring used by an insurance broker. Other front-end systems are also possible, such as a Web portal to brokers, or a Web UI for self-service order entry by customers.

Life-Insurance Policy Scenario

The customer, Robert, wants to purchase a platinum-level 1 million dollar life-insurance policy. The broker, Tom, enters Robert's policy application using his smart-client application. The policy is sent to the Order system, where it is processed and routed to the appropriate systems to begin the underwriting process. While in the Order system, third-party services are kicked off. For this scenario, we will use a Paramed, a third-party service that verifies insurers' health insurance and medical records.

The built-in business logic can also generate requests to third parties if a certain condition is met. This could be the broker or another partner of the insurance company.

Figure 2. Business process used for our scenario

Architecture Overview

This section will walk through the high-level logical architecture used in the scenario. The details around specific aspects such as security, messages, development, and deployment will be provided in other papers in this series.

To ensure applicability with real-world challenges, we derived a set of high-level requirements.

Requirements

The following requirements are for an enterprise-class solution:

  • Must interoperate with existing, commercial off-the-shelf applications. As discussed earlier, many organizations purchase and customize software. It is critical to address this.
  • The integration technology must be Web services. Many forms of communication, such as binary communication, are proprietary. Until the emergence of Web services, there was no standardized way to communicate messages. Web services provide a way to communicate across heterogeneous platforms.
  • WS-* standards must be used. Web services using SOAP and WSDL have been industry integration standard for years. However, these traditional Web services lack the robustness needed for messaging. The WS-* standards provide these necessary features without the usage of binary communication.
  • Long-running workflow. Management of long-running orchestrations has been difficult, especially when that workflow spawns many smaller external workflows, in which case reconciliation and transaction management can become complex.

We use BizTalk as the message hub for this solution, given its rich capabilities and the strong need this insurance solution has for tying multiple systems together and managing multiple external workflows.

Figure 3. Using message-bus technology

Shown in Figure 3 is an enterprise view of BizTalk as an enterprise service bus (ESB). Remember that it is not a requirement that this is used as an ESB. This white paper refers to this layer as just a message layer, so that you can incorporate it into your solution in either case.

The rationale for using BizTalk is that it provides a centralized platform for the following capabilities:

  • Business-process management— Centralizing reusable business process not only lends to service orientation, but also provides a mechanism for organizations to augment existing or purchased commercial off-the-shelf– based (COTS-based) applications without the complexity of modifying them.
  • Workflow orchestration— Management of multiple workflows can be simplified through this platform. Instead of coding or reconciling each workflow, solutions can be managed as they should. We do this by creating one workflow to manage the business process from the beginning to the end that is able to orchestrate multiple internal system workflows.
  • Rich adapter support— Jump-starting development is critical to organizations. BizTalk has a wide range of adapters to support your integration needs. In the insurance space, there is an ACORD adapter that can jump-start your integrations. In conjunction with the ACORD adapter, the Web Services Adapter and File-Based Adapters are available for BizTalk.
  • Message routing and transformation— Message routing can be very complex when the messages must be transformed so that other systems understand the message. BizTalk can provide a platform to reduce the complexity and still align with open standards.

The Insurance Agent Policy System

Currently, the technology trends in the insurance industry vary from portals, thick clients, 3270 mainframe terminal-emulation screens, and smart clients. Given the diverse number of applications and vendors in this space, we choose a smart-client user interface (UI) to provide the optimal experience for the agent for the following reasons:

  • Offline and online modes
  • No dependencies on network connectivity
  • Rich user experience with much greater functionality

A disconnected model for agents makes sense in many situations, as brokers can often be mobile or have limited connectivity to network resources. However, because we will be using Web services as the core of our messaging strategy when architecting this solution, the manner in which the end broker submits policies should be trivial.

For the client-side architecture, we used Windows Forms as the user interface, which provides the user interface needed for the agents. There will be several controls, such as data grids, text boxes, and command buttons. A data grid on the Windows form will serve as the window into the policy pipeline for the broker. We use Web services to update this data grid to ensure real-time updates.

Because this is a smart client, returning data can be cached for offline viewing and updating. This provides significant benefits to the brokers. In addition to the data, a small layer of business logic would reside on the client application. The majority of the application logic will reside on the insurance company side. The rationale here is that we will have light rules to drive UI functionality.

Figure 4. Client logical architecture

To make the calls from the client to the messaging tier, we will use Windows Communication Foundation (WCF). WCF will send SOAP 1.2 Web services messages using the ACORD messaging schemas. The WCF layer will provide a unified development model for our developers when coding communications. From the protocol perspective, we will use a series of WS-* standards. However, this is not enough to ensure interoperability. Usage of the ACORD industry standards is key, too. We should be able to interoperate seamlessly between " homegrown" applications, COTS applications, and third-party services.

Messaging Architecture

The use of Web services enables this broad variety of channels to leverage a common Web service that receives new business applications into the underwriting process in the form of an ACORD 103 message that includes a policy number that has been assigned, and that will be used for tracking/correlation purposes throughout this demonstration. This ACORD 103 New Business Submission message will be based on a SOAP Message Transmission Optimization Mechanism (MTOM/XOP) attachment containing the binary representation of Robert's signature to authorize release of medical information, as required by HIPAA. It is absolutely critical that the ACORD standards are incorporated in our messaging. This will ensure portability of the architecture.

It is also essential that communications are secure and reliable. To achieve, this we will use WS-Secure Conversation (WS-SC) for personal information that might pass through an undetermined number of intermediaries. We also use WS-SC for high-volume, frequent requests (such as credit checks) that will be required for all new policy applications. We use WS-Security for less frequent requests, such as an Attending Physician's Statement (APS), where the overhead of session establishment is not justified by the request volume. We also use TLS/SSL (also known as HTTPS) in rare cases where a service is directly processing requests without any intermediate routing.

For messaging where tracking reception is important, such as ensuring receipt of a new policy to claim a commission, we use WS- Reliable Messaging (WS-RM). We also use WS RM for data requests that are expensive to process (typically involving human workflow, such as APS queries). This ensures that requests are only delivered once, and avoids expensive duplicate requests.

For long-running messages, we use WS-Secure Conversation (WS-SC) (See Resources.)

Figure 5. Client message-exchange patterns

Transaction Business processes WS-* protocols Architecture decision
Submission of new policy (103 Request) Broker-client

Underwriting process

WS-Security (WS-S)

WS-Reliable Messaging (WS-RM)

WS-S used for personal information that might pass through an undetermined number of intermediaries.

WS-RM used to track message receipt.

Because of infrequent transactions, no need for session-oriented security mechanisms, such as WS-Secure Conversation.

Status queries (122 Request/Response) Broker-client

Underwriting process

Fulfillment process

WS-Secure Conversation (WS-SC) Noncritical and individual request or response messages that can be retried easily, but still contain personal information.
Underwriting requirement order request (121)

Underwriting requirement order response (1122)

Underwriting process

Fulfillment process

WS-Secure Conversation (WS-SC) or WS-Security (WSS) or Transport-level security (TLS/SSL)

WS-Reliable Messaging (WS-RM)

These messages contain personal information.

WS-SC will be used for high-volume, frequent requests (such as credit checks).

Use WS-Security for less frequent requests, where the overhead of session establishment is not justified by the request volume.

Use TLS/SSL where a service is directly processing requests without any intermediate routing.

Use WS RM for data requests that are expensive to process.

Table 1: Business-process messaging design decision matrix

You might ask yourself, after making a submission: Why is the status returned in a separate transaction? Well, the reasons are twofold. Firstly, it is important for this to be asynchronous, and the ACORD standard does not allow an implementation without separating the status from the submission. Secondly, the Broker will be getting status returns periodically through the course of the application process by querying the Status Service.

The Insurance Carrier Systems

When architecting the server side of the solution, there were particular aspects and assumptions considered:

  • This architecture accounts for fragmented systems.
  • Functional areas are self-contained and need to be managed.
  • Operating systems and development environments differ.

As a result, there are a significant number of point-to-point integrations with very specific applications, thus causing proprietary implementations. In this solution, the faç ade layer will be created around these existing applications.

Figure 6. Insurance message bus

Here, you can see how we are using the enterprise service bus (ESB) as a message bus. This layer will serve as the centralized messaging layer that will manage our internal and external messages. Management and orchestration are key benefits of this architecture.

An infrastructure like this can bring order to the chaos of disparate point-to-point integrations by putting intelligent, long-running orchestrations and policies around transactions in one layer instead of many. It would be common to have several distinct COTS-based applications in upwards of five or six systems to accomplish an end-to-end transaction. We are reducing these systems significantly by consolidating the redundant functions, such as workflow and messaging, leaving infrastructure-level functionality where it belongs and keeping the business logic in applicable applications.

It is important to remember that this message bus is a logical representation. The implementation view can look very different. For example, the message bus could be several BizTalk servers, or there could be servers in different DMZ environments to manage both internal and external communications.

Click here for larger image

Figure 7. Workflow designer (Click on the picture for a larger image)

The next tier down, which is where specific business functions are performed, contains two different legacy systems wrapped with an interface: the Order system and the Fulfillment system. The reason that we are keeping these as separate systems instead of consolidating them is that, the majority of the time, these would be two separate COTS-based systems.

A Status system was added for the following reasons:

  • To provide a centralized way to report status to the agents.
  • To reduce the number of interfaces and control logic needed to query multiple systems.
  • It fits nicely with the orchestration capabilities of our ESB for our long-running workflow.

The Ordering system and the Fulfillment system have been converted into course-grained services. By doing so, we have removed the dependencies of independent implementations. All communication that occurs to these systems now goes through our message hub. The exposed Web service endpoints that are managed from the message bus can then be managed with orchestration technologies built in BizTalk.

Figure 8. End-to-end message-exchange pattern

Now that these applications are exposed as Web services, any technology that can accept Web services XML can integrate with these applications. This removes the tight coupling of other technology protocols that would limit interoperability. For example, you could just as easily use existing Java-based systems, if those were your legacy systems.

SQL Server is used here to store application data in the database layer. Because the core focus of this paper is integration and composite applications, we will not highlight this.

The third-party services referenced are external services that are called by the Fulfillment service. These services have varying protocol needs. However, this paper will show how WS-* standards can provide increased functionality for your services. It is important to note that many of the real-world insurance third-party services only support XML-based communications, not the more advanced SOAP-based Web services. The messaging-architecture sections that follow will have more on the third-party services.

Insurance Carrier Messaging Architecture

This section walks through a basic life policy that is processed by the insurance carrier. Based on the information Robert supplied, the business rules/heuristic logic defined in the underwriting process decides that an Attending Physician Statement APS (that is, a physical) is also required.

Because another provider must fulfill this request, the Order system builds an ACORD XML TransType 121 General Requirements Order Request transaction (TXLifeRequest) and transmits it to a secondary external ordering system for Robert's physician (the APS system). This message also contains the MTOM/XOP attachment of Robert's signature that was originally carried on the ACORD 103 New Business Submission, authorizing his physician to release his medical information to the insurance company.

At some point, Robert's physician will process the APS order by verifying that Robert's signature matches the one he has on file, and then examining Robert's medical history, filling in the necessary information required on the APS report.

After the physician has completed the APS report, an 1122 General Requirements Status/Results Transmittal message is generated and transmitted back to the endpoint reference specified in the WS-Addressing ReplyTo specified in the previous ACORD 121 request. This message will also be delivered reliably using WS-Reliable Messaging.

The rest of the business process runs, including any automated-actuary decision. However, in this case, because there is an APS and possibly some additional information that cannot be processed automatically, the case is flagged for an underwriter's review and approval.

Figure 9. Underwriting process message-exchange pattern

Fulfillment Service

In the insurance industry, a fulfillment system or service is very different from the process of fulfillment:

  • Fulfillment system: A system or service that receives a request and fulfills it. Think of a fulfillment service as an integration component for gathering data. In this scenario, the fulfillment system is responsible for pulling the various reports from third-party providers.
  • Fulfillment process: The process in which a policy is issued by the insurance carrier.

You might ask why we kept the fulfillment service. For this scenario, we are assuming that systems such as these are purchased as black-box solutions. This is not to say that you could not remove these layers and incorporate them into a message bus, instead.

Choosing a messaging pattern is not as clear-cut as choosing one set of standards. When designing this part of the solution, we had to take a step back and look at the business and legacy aspects of each individual transaction.

Some transactions, such as receiving a credit report, were easier decisions. However, other transactions, such as pulling an APS report, required the ability to contain attachments.

Here are some aspects to consider when designing you messaging:

  • Understand the business process. It is critical to understand how the business uses these messages (for example, securing data). If the data being sent is not sensitive, you do not need to take extensive security precautions for the message.
  • Understand how the transactions are consumed from the service providers. This can be both internal and external. Many times, when relying on service providers, there are technical limitations. These can range from standards support to hours of operation.
  • Give proper attention to security. This is often overlooked. Protocol-level security, such as SSL/TLS, often is sufficient, but not always. Make sure you evaluate the sensitivity of the data and review the message paths to determine how many endpoints there are before the ultimate consumer.
  • Be realistic and pragmatic. When designing these services, do not go overboard trying to use every standard. Do not force a standard into a message, if it does not belong. This will only introduce unneeded complexity.

Figure 10. Fulfillment system message-exchange pattern

What Is the Value?

We talked quite a bit about the Microsoft platform and development technologies by walking through the scenario. We also highlighted architecture decisions. But what we did not do is highlight the features of these Microsoft technologies.

The following are the core benefits using Microsoft technologies in the insurance industry:

  • Business-process automation— Business processes are complex and specific to each carrier. With the orchestration tools provided in BizTalk, orchestrations can be developed by business analysts, removing the developer from this process and enabling the business.
  • Reduction of integration code— With the custom adapters in BizTalk and the unified programming model of WCF, the code required to integrate systems is drastically reduced.
  • Alignment with standards— WCF and BizTalk are based on Open XML standards out of the box. No more custom coding to incorporate Web services standards.
  • Productivity— With an integrated Visual Studio IDE and .NET 3.0 technologies, both the tools and the development language provide substantial productivity gains over other languages.

Conclusion

As demonstrated in this white paper, using protocol-level standards alone is not enough capturing the business side of the messaging transactions is key to making interoperability work for your business. This is true across all industries, not just insurance.

We have Web services standards, but that is not enough. There is still a level of due diligence that is required to make the optimal technology decisions for your organization. With this specific reference implementation, we go through a real-world scenario and determine the optimum messaging with this scenario's business forces. This can serve as a guide to help you choose message-exchange patterns in your enterprise. With all architectures, there are trade-offs when choosing specific standards. It is important to understand these trade-offs and be willing to take on the resulting implications.

Microsoft is committed to making the job of architecting and developing service-oriented solutions easier for its customers. And we show here that Microsoft has removed many of the industry barriers and complexities that daunt customers today. These range from providing thought leadership in the industry standards to automating and building out-of-the box Web services support.



Categories: product
posted by Maulik Patel at 10:00 AM | Leave Comment [0] | # Link to this entry

About Me

Maulik Patel
View my complete profile

Friends

Paryank Kansara
woody
Administrator
Nirav Sheth

Links

Know about 14 Gaam
Download Shortkey
Orthotics Management system

Categories

Uncategorized
product
FAQ ASP.NET-C#.NET
Written Test Questions C#.net,asp.net
ASP.NET Interview Questions
General
Short Descriptive Que-Ans
Quiz
C# Interview Questions
New Features ASP.NET C#.NET
Share Points
ASP
ASP.NET
Localization

Archives

April, 2007
August, 2007
December, 2007
February, 2007
February, 2008
January, 2008
July, 2007
June, 2007
June, 2008
March, 2007
November, 2007
October, 2007

RSS Feed