Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Microsoft C# Professional Projects - Premier Press.pdf
Скачиваний:
177
Добавлен:
24.05.2014
Размер:
14.65 Mб
Скачать

PROJECT CASE STUDY AND DESIGN

Chapter 27

599

 

 

 

 

Similar to Deepthoughts Publications,Black and White Publications is one of the major book providers of Bookers Paradise. Established in 1994, Black and White Publications has grown to be a leading publishing house in the United States.The organization, with its corporate office located in New York, has its branches spread all over the United States. Black and White Publications shares the corporate goal of increasing its yearly profits with Bookers Paradise.Therefore, Black and White Publications wants to collaborate with Bookers Paradise to sell its books online. To do this, the publishing house plans to create a Web service that provides the site of Bookers Paradise with the information about the books published at its publishing house.

Project Requirements

Bookers Paradise wants to launch an online bookstore that contains information about books published by Deepthoughts Publications and Black and White Publications. To display the catalog of books on the Web portal, Deepthoughts Publications and Black and White Publications need to host a Web service that is used to expose the information about the books in the form of a catalog. This information includes the ISBN (International Standard Book Number) number, the title, the author, and so on. To access the information exposed by the Web services, Bookers Paradise needs to host a Web service client.This Web service client is the Web portal launched by Bookers Paradise. The Web service client displays the book catalogs to the visitors on the site. In addition, the Web service client stores the information about its customers.

The function of the Web service that you create is not limited to providing the Web portal with book catalogs. The customers that visit the site of Bookers Paradise can search for information about the books on the site. For example, the customer can search for books on a particular subject, books written by a particular author, or books published by a particular publisher. To provide customers with the required information, Web services need to expose functions to the Web service client. In addition, the Web service can expose functions that provide information about the availability of the book and the editions of the book released by the publisher.

600 Project 5 CREATING A WEB PORTAL FOR A BOOKSTORE

As stated earlier, a Web service is used to integrate information from various organizations.Therefore, a Web service provides the Web service client with information about books. Similarly, the Web service client shares the data of its customers with the publisher. When customers visit the Web portal for Bookers Paradise, they can view information about the books on the site. In addition,they can query for information on books on the site. When the customer views the information about a book and places an order for the book on the site of Bookers Paradise, the Web service client forwards the purchase request to the publisher of the book. In addition, the information about the customer is sent to the publisher.

The publisher then maintains the customer data along with the information about the book that is released. When the book is delivered to the customer, the publisher updates the status of the book in the database maintained by the publisher. The customer can then query the Web site to know the status of the order placed by the customer. I will discuss the structure of the databases maintained by the retailer and the publisher later in this chapter.

To have a clear understanding of the working of the Web portal,I will first list the tasks that need to be performed by the Web portal. In addition, I will discuss how these will be accomplished.

Querying for Information about All Books

As discussed earlier, a user can query for the information about the books published by a publisher. The procedure for querying information is as discussed here:

1.A user visits the Web site of Bookers Paradise. On the Main page, the user chooses to view the information about all the books published by the Deepthoughts Publications and the Black and White Publications publishing houses.

NOTE

The user has the option to view the information about all the books or search for information about the books based on criteria. In the next section, you will learn about the procedure for viewing the information about books based on criteria.

PROJECT CASE STUDY AND DESIGN

Chapter 27

601

 

 

 

 

2.The Web site sends the request to the Web service hosted by the two publishing houses.

3.The Web service processes the request and sends the result of the query back to the Web site. The user can then view the desired information on the Web site.

NOTE

The Web service has certain Web methods that the Web service uses to respond to the queries sent by the Web service client, which is the Web site in this case. You will learn about creating the Web service and the Web methods in the succeeding chapters.

Querying for Information about Books Based on Criteria

A user who visits the site of Bookers Paradise can view information about the selected books published by Deepthoughts Publications and Black and White Publications. The search for information about books in this case is based on criteria. For example, the user can search for information about books based on category, title, or author. The procedure to search for information based on criteria is given as follows:

1.The user visits the Web site of Bookers Paradise and selects the criteria from the list box in the Main page.

2.The Web site requests the Web service to retrieve the required information.

3.The required information is returned to the Web site in the form of records from the database. This information can then be viewed by the user in the Results form.

After the user has viewed and selected a book to purchase, the user can order the book on the site. The following section covers the procedure for ordering a book on the Web site.