The Task

The task is to implement a Web service that returns a Recording and all its associated entities (Tracks, Reviews, and so on) when specifying the "id" of the recording. The return type of the service needs to be in a format that is not dependent on the .NET Framework. The Catalog class that we implemented in the previous chapter returns a typedDataSet named RecordingDataSet.Recording, which is specific to the .NET Framework and directly coupled to the database schema. Therefore, we neeh to write some code that takes as input the typed DataSet and transforms it into a data structure that can interoperate with other systems.

A data structure like this is called a data transfer object HI (DTO), which is one aspect of the Web service implementation. Another aspect is the communieation protocol that exists between the provider of the service and the consumer. ASP.NET Web fervices provide the necessary plumbing to implement the communication protocol. The combination of the communication protocol and DTO is a design pattern called service interface. It is very useful to keep the service interface code separate from the rest of the application's functionality because the intent of the code is very different.

0 0

Post a comment