Developing .NET Web Services with XML

In this chapter we have set out to develop a real-world Web Service application, namely a service that delivers jokes to the Internet community. We started out by gathering requirements, such that we want to know our users, that our users should be able to submit their own jokes and rate other user s jokes, and that there should be an administrative module in place to manage both users and jokes.
Our choice of developing this application as a Web Service was reinforced by the fact that Web Services make our application universally accessible, even for users behind corporate firewalls, and that Web Services give us support for non-English languages for free because they are based on XML and Unicode.
We started out our design by using a visual modeling tool in order to get a clear road map for our back-end and middle tier application architecture. We designed the various components of our application in such a way that we had a clear separation between a thin Web Service front end layer, and implementation classes where the business logic of our application sits. We abstracted access to the Microsoft SQL Server database by providing for wrapper methods for the SQL stored procedures and by creating a separate data access class. We also designed a security and error handling mechanism, and we made the first steps in implementing an application logging system based on interaction with the machine Event Log.
Once we had the database schema and the middle tier...