With the data objects in place, we can turn our attention to the substance of the application: the business objects. As you're reading this chapter, you might think that it doesn't really seem to be about business objects. In one sense, this observation is true. Business objects encapsulate your company's business rules and application-specific operations. Once you have designed your components, implementing the methods should be a fairly mechanical coding exercise.
On the other hand, there are some specific issues you should be aware of to ensure that your business objects work well in the MTS environment. Some of these issues, such as using the object context to manage state and using explicitly defined interfaces when possible, have already been discussed in Chapter 8. Others, such as composing functionality, maintaining state across transactions boundaries, propagating errors, and programmatically controlling security are more common to business objects than to data objects—these issues are the focus of this chapter. As we did for data objects, we'll start by looking at the issues and general techniques for handling them. Then we'll look at some example business objects from the Island Hopper classified ads application, demonstrating how these objects can be implemented using Microsoft Visual Basic and Microsoft Visual C++.