12.1. Trouble-Ticketing System
Many information technology groups use some kind of Web-based trouble-ticket system to support their users. These applications allow users to report problems; they also allow support personnel to respond and manage the issue's life cycle. In this use case, we'll be building a small-scale trouble ticketing system. This system works, but it doesn't have all the features you might need in a true production system. This sample application will be fully reliant on AJAX communications, setting it on the far right of the reliance scale.
The trouble-ticketing system has two main components:
A similar component design can be used in an application that uses AJAX as an enhancement tool. If AJAX components are designed to provide generic user-interface components, they can be used in other projects, but you'll generally still want to make customized versions of them. These versions would do specific tasks, such as providing AJAX logins or searching for users. In this project, the components are application specific; this specificity helps lower their complexity and makes it easier to understand them. It also makes their development faster; many times, I find it useful to wait until after I have done two or three specific implementations of a component before I make a generalized one. This lets you learn about the problem space, and it makes it easier to build a truly reusable component instead of one that works only in cases that match its original use.
To understand the code of our trouble ticket system, we must first look at the tasks it must perform:
A system that has this level of functionality provides a relatively basic trouble-ticket system, and it offers us more then enough functionality to understand the process of building a fully AJAX-powered application.