A web-based chat application can be a very useful component to your online presence. It is a great way for customers and support representatives to communicate and achieve instantaneous results. Questions can be answered within seconds, whereas e-mail and phone calls have delays that seem to drag the online experience to a grueling halt. Customers can simply type their question along with their order number into the browser window and receive the status of their order almost instantly from the customer support representative on the other side of the world. In other cases, chat applications allow companies to provide cost-effective support regardless of the language barriers that may normally exist between the two people communicating. Certainly, chat applica- tions have had a tremendous impact on the way information is exchanged over the Web. For these reasons and more, many businesses add chat pages to their sites so they can provide instant access to their helpful customer support services. But this simple web site addition can end up becoming a larger effort than it initially appears. What’s the big deal, you ask? It’s just a little chat page! How hard can it be? Well, numerous ways exist to implement a chat application for an organization, and tons of implications may follow. For example, a chat application could require customizations, such as the following:
❑ The capability to store chat messages within a database for reporting purposes.
❑ A provision to logically group the chat rooms for special needs that web users may find
helpful.
❑ A way to identify common chat words and phrases that users are chatting about, which
may lead to finding commonalities in the user community that provide insight to their interest or concerns.
❑ A way to change the server name and settings of the chat system, allowing for mainte- nance to server configurations or infrastructure.
❑ A means by which to share chat messages coming in to the web site among many cus- tomer support personnel.
❑ Automated chat responses for commonly asked questions. These may include detecting a series of words or phrases that combine to form phrases that can be catalogued, and responses can be sent back in a form of artificial dialogue that might help people find what they are looking for.
Considering the possibilities, you must take a broad approach to implementing a chat section of a web site for any sort of successful online presence. The basic technology infrastructure needs to focus on the chat mechanisms specifically, because they are the crux of the application and seem to be the differentia- tor between applications on the market. That is, some chat applications are slower than others, and some are limited to being executed at the desktop level.
The time and energy it takes to create such an application, and the reusable nature of the application itself, make it a perfect candidate to include in this Instant Results book, which provides the basic foun- dational templates for implementing similar solutions on your own.
The essential features of the Wrox Chat Server include the following:
❑ The capability to enter only your e-mail address and be able to start chatting immediately, with- out waiting for any sort of applet or heavy application to load.
❑ The display of each chat room is grouped by category, allowing for an organized approach to the available chat categories within your application.
❑ The display of each chat room is accompanied by a number of current chat room members, allowing web browsers to see which chat rooms are currently being accessed.
❑ The use of asynchronous callbacks, a new feature in ASP.NET 2.0, which allow for easy imple- mentation of Ajax methods and technologies (providing behind-the-scenes xmlHttpposts with JavaScript and responding to the posts via events on the server, all without refreshing the page).
❑ The capability to specify the number of hours for which each chat session maintains its messages on the server.
❑ The capability to change the look and feel the entire web site by simply modifying one entry in a configuration file.
These features comprise the bulk of this Wrox Chat Server application — it is fairly straightforward in its use of generalized chat application concepts, but actually implements some very exciting and compli- cated technologies. So get ready to learn about a few of the greatest web-based features with the all-new ASP.NET 2.0 release!
This chapter analyzes the various components that make up the web site, including the specific controls that ship with the ASP.NET 2.0 development environments. These controls include the following:
❑ Menucontrol
❑ SiteMapDataSourcecontrol
❑ Themes
❑ Master Pages
❑ Callbacks
The section, “Wrox Chat Server Design,” digs into the physical design of the project in great detail. This includes the core pieces of technology and outlines the file structure of the site. It also looks at the vari- ous classes involved, the members of each class, and walks you through the database tables and their relationships.
The section titled “Code and Code Explanation” focuses on the design of each class, exposing their methods and properties.
The final section, “Setting up the Project,” reviews how to load up the Wrox Chat Server in a develop- ment environment, and how to customize it to meet your needs.