|
|
As with any successful project, we must first determine the requirements. Unidentified requirements tend to surface as issues in a project as it progresses, so in a real world setting it is crucial to be as thorough as possible in gathering the requirements. This will provide direction in your design and will also verify that there is business justification for the project. Fortunately we won't get bogged down in extensive analysis for these examples. I will simply present a list of requirements that meet a fairly realistic scenario and offers up enough challenges that we can encounter, and therefore overcome.
Our primary requirement is to expose an existing room reservation system as a Web service. This legacy system is called the Hotel Reservation System (HRS) and was only ever intended to be a private reservation system for the hotel's reservation agents. HRS has a couple of COM interfaces that expose all of your functionality required, and the service workflow will utilize these interfaces to execute the necessary processes.
Note | To follow along with this chapter, you can download this "legacy system" in the form of a COM object from http://www.architectingwebservices.com/hrsws/hrs. |
The service workflow breaks down into two main components: availability and reservation. The availability service takes an assortment of criteria to find an appropriate hotel and room match for the user. The reservation allows the user to reserve the room type for the dates requested with a valid credit card. The availability service must be utilized prior to reserving a room in the given session. This requirement will keep users from attempting to reserve rooms from one day to the next when they may no longer be available.
For the availability request, we need to collect some criteria to find a proper match. Those criteria should include the following:
Check-in date*
Check-out date*
Number of adults*
Number of children*
(City and state) or landmark*
Coupon code
Price preference
Bed size preference
Smoking preference
Requested hotel amenities
The criteria denoted by an asterisk represent the information required to perform the hotel search. The requested hotel amenities criteria must allow for future expandability. This means that it must be an open-ended field. Initially, the options will consist of the following amenities:
Concierge
Workout facilities
Pool
Restaurant
24-hour room service
High-speed Internet access
You will need to provide some additional information about the hotels themselves. These will be mostly marketing-driven verbiage and images such as the following:
Picture of hotel
Picture of lobby or meeting rooms
Picture of pool or workout facilities
Picture of room A
Picture of room B
Paragraph (50 to 100 words) describing hotel
For the bookings service, we need to collect information about the room to be booked as well as the user. The current reservation system provides its own identifiers for available rooms, so you simply need to utilize its information. We then need to include all of the user's pertinent data. We end up with the following data to collect for the booking service:
Hotel ID*
Room type*
Check-in date*
Check-out date*
Number of adults*
Number of children*
First name*
Last name*
Home address*
Home phone number*
Credit card number*
Credit card expiration date*
Card issuer*
Name on credit card*
Coupon code
Billing address
Again, the required fields are noted with an asterisk. The address information should consist of the usual two address lines, city, state, and Zip code. Also, if the billing address is left null, the home address is assumed as the billing address.
The hotel chain is also considering an incentive plan for their Web service for consumers, based on the reservations that are booked and used through the service. This means that we need to authenticate consumers and track their users' activities when a reservation is made.
For the purposes of this exercise, we will not address availability and scalability expectations. These are typically going to be very important requirements in real life, however, not to be overlooked or ignored.
|
|