Toolbox

Live Chat, Code Conversion, Multiple Monitors, and More

Scott Mitchell

Contents

Add Live Help to Your Microsoft ASP.NET Web Site
Quickly Convert between Visual Basic and C# Code
Manage Multiple Desktop Monitors
Have Fun Learning Design Patterns

Add Live Help to Your Microsoft ASP.NET Web Site

I was recently visiting a hiking supply Web site searching for a particular piece of equipment. After searching in vain for several minutes, I noticed a link to chat with a sales associate. Clicking it opened a new window, allowing me to chat with a gentleman named Chad. I explained what I was looking for and, just a few moments later, got a link to the item. Such live chat functionality is becoming increasingly common on the Internet. Chat is a more responsive customer service mechanism than e-mail and more cost-effective than telephone support.

Most live chat systems are sold as a service. You add a bit of HTML to your site to display the "Live Chat" link, and your customer service operators go to the service provider's site and wait to assist visitors. The advantage of this approach is that there's nothing to install or maintain on your site. However, such models are usually priced on the volume of customers or the number of concurrent operators, which means the price of your live chat will grow right along with your business!

If you want more control over the chat system's implementation and pricing, check out .netLIVEHELP Version 2.0 by Corporate Web Solutions. Unlike service-based systems, .netLIVEHELP ships as a series of Microsoft® ASP.NET 2.0 Web pages and Web services, along with a desktop application for operators. There's a flat, one-time price per Web site, regardless of the number of customers or operators. Plugging .netLIVEHELP into your site is relatively straightforward: you simply create a virtual directory pointing to the folder containing the ASP.NET files and Web services. Adding a "Live Chat" button to a page is as easy as adding one line of HTML.

When a customer initiates a chat session, the software routes the conversation to the operator with the lightest call load. The contents of the conversation are logged, as are metrics such as the customer's browser, IP address, and the Web pages visited on the site.

I was impressed with the .netLIVEHELP's operator and administrator interfaces. The operator signs on through a desktop application containing a system tray icon that flashes when a customer has been routed there. Clicking the system tray icon opens the chat window, which includes features like spell checking and text formatting. Operators can perform chats with multiple customers simultaneously and can also track visiting customers' current and past chats as well as the pages they've visited. And it is possible to integrate data from external applications, so that, for example, an operator can view the customer's shopping cart.

Administrators can perform the same functions as an operator, but can also view statistics. The statistics can be summarized across the whole company for a given date range or inspected on an operator-by-operator basis. The statistics include metrics like the total number of past and ongoing chats, average chat time, and average waiting time.

Price: $395 per Web site license.

dotnetlivehelp.com

Live Chat Enables More Responsive Customer Service

Live Chat Enables More Responsive Customer Service  (Click the image for a larger view)

Quickly Convert between Visual Basic and C# Code

Since all Microsoft .NET Framework applications share a common type system and runtime regardless of the programming language used, the differences between .NET programming languages are only skin deep. This language parity lessens the learning curve for developers and enables seamless integration of .NET components whether or not they were created in the same language. While popular .NET programming languages like Visual Basic® and C# are equivalent in the eyes of the .NET runtime, they are not necessarily so in the eyes of developers, who may be adept in one language but not in the other. Such a language barrier can prove limiting when inheriting code or a legacy application at work or when studying code snippets in books or on the Web that are not in your language of choice.

The optimal solution is to become fluent in both Visual Basic and C#, but that's not always possible. The next-best option is to use an automated code converter like Tangible Software Solution's Instant C# version 2.8 or Instant VB version 2.0. Instant C# quickly converts Visual Basic code to C#, while Instant VB converts C# to Visual Basic. Both products can convert a snippet of code, an ASP.NET page, all the code within a specified folder, or an entire Visual Studio project.

While Visual Basic and C# compile into equivalent intermediate language, there is "syntactic sugar" unique to each language. Instant C# and Instant VB include options that let you specify how to handle these differences when converting. For example, when converting Visual Basic code to C# code, Instant C# allows you to indicate whether to convert Visual Basic functions—InStr, Mid, StrComp, and so on—to .NET Framework equivalents or whether to leave them as is and import the Microsoft.VisualBasic namespace. Likewise, you can also indicate whether to convert the Visual Basic vbCrLf keyword to System.Environment.NewLine or "\r\n" in the resulting C# code. And the code formatting options allow you to dictate whether to include braces for single-line block statements and, if so, whether the opening brace should appear on its own line.

The most powerful configuration options are the post-conversion replacement settings. You can specify an unlimited number of regular expression patterns and corresponding replacement text and Instant C# and Instant VB will apply these substitutions to the converted code.

Despite the underlying similarities between Visual Basic and C#, there are slight but profound differences that make a 100 percent accurate conversion impossible. The good news is that Instant C# and Instant VB have a successful conversion rate—over 99.9 percent—on code samples provided by Microsoft.

Price: $179 for Instant C# or Instant VB.

tangiblesoftwaresolutions.com

Manage Multiple Desktop Monitors

One of the most cost-effective ways to improve a developer's productivity is to give him another monitor. Developers often face tasks that involve simultaneously processing information from two windows: a running application and the debugger window is a classic example. Having two (or more) monitors at your workstation is priceless when working on such tasks since it allows you to have both windows on-screen at once without the need for incessant Alt+Tabbing.

While Windows® has long supported multiple monitors, the Windows Shell has never really been adapted to handle more than one screen. The main drawback is that only one monitor can contain the taskbar and thus it houses the icons for all of the apps on all of the monitors. As a result, the taskbar becomes cluttered and searching for a particular application can be frustrating as there's no visual relationship between an application's taskbar icon and the monitor it resides on.

Fortunately, there are third-party window management tools designed to work specifically in multiple-monitor environments. One such tool is UltraMon version 2.7.1 by Realtime Soft. The UltraMon Smart Taskbar extends the taskbar across all screens and locates application icons in the appropriate taskbar. UltraMon also adds two buttons next to each window's Minimize, Maximize, and Close buttons: Maximize to desktop and Move window. The Maximize to desktop maximizes the window to stretch across all of the monitors; with a single click, Move window sends the window to a different monitor.

Other features include the ability to stretch wallpaper across all monitors and to launch a screen saver that spans all monitors. UltraMon also provides an API that can be accessed through the Windows Script Host.

UltraMon is an affordable, lightweight program that greatly enhances the multiple-monitor experience. If you regularly use two or more monitors, you owe it to yourself to give UltraMon a try—you won't be disappointed.

Price: $39.95.

realtimesoft.com/ultramon

The UltraMan Smart Taskbar Extends the Taskbar across All Screens

The UltraMan Smart Taskbar Extends the Taskbar across All Screens  (Click the image for a larger view)

Have Fun Learning Design Patterns

At any bookstore, you'll find rows of books on design patterns. Design patterns are general, high-level solutions used by software architects to solve common software design problems. The problem is that most books on design patterns stodgily enumerate key patterns, dryly explaining when and how each is to be used.

A notable exception is Head First Design Patterns by Eric and Elisabeth Freeman (O'Reilly, 2004), which covers all of the essential design patterns in an entertaining manner. It dispenses with pages of boring text and replaces it with humor-filled lists, questions and answer sections, a variety of diagrams, and heavily annotated code snippets. Gone too are the canonical examples. Instead of using employee or product-related examples, Head First Design Patterns illustrates how and when to use a particular design patterns through silly applications involving pizza, ducks, chocolate, and gumball machines.

Despite the book's somewhat cartoonish layout, it is full of useful information. Head First Design Patterns introduces and describes design patterns from the perspective of a common problem all system architects have faced at one time or another: how to add new functionality to an existing object hierarchy. It presents a duck simulator application as an example and steps through the concerns and challenges. It then delves into the strategy pattern and how to implement it to address this challenge. Later chapters cover other essential patterns: the decorator, the observer, the factory, the singleton, the iterator, the adapter, and more.

When designing software, the same sorts of challenges arise again and again. Design patterns provide architects with a repeatable, proven way to tackle these problems. Head First Design Patterns makes it fun and easy to learn some of the most useful patterns and how to apply them.

Price: $44.95.

oreilly.com

Send your questions and comments for Scott to toolsmm@microsoft.com.

Scott Mitchell, author of numerous books and founder of 4GuysFromRolla.com, is an MVP who has been working with Microsoft Web technologies since 1998. Scott is an independent consultant, trainer, and writer. Reach him at Mitchell@4guysfromrolla.com or via his blog at ScottOnWriting.NET.