Chapter 6: Exploring the Business Object Pattern


Overview

The previous three chapters worked through the base patterns at the heart of Web Services:

  • The Service-Oriented Architecture pattern forms the architectural pattern of Web Services.

  • The Architecture Adapter pattern showed the mechanism for translating Web Service interactions into underlying service implementations .

  • The Service Directory pattern showed the mechanism for retrieving metadata about a Web Service, and that metadata resides in the Universal Description, Discovery, and Integration (UDDI) directory typically used with Web Services.

Because Web Services are the integration technology of choice for the P.T. Monday Coffee Company application, it is critical that you understand these base Web Service patterns to some level of detail. With this knowledge, you become more effective at creating your Web Services and even designing your service implementations.

Starting with this chapter, you will look at traditional object-oriented structures and how they translate into the Web Service environment. For the next four chapters, you will increase the complexity and responsibilities of the structures that you represent to external users. This chapter starts with a relatively simple concept of a business object; by the end of Chapter 9, "Exploring the Asynchronous Business Process Pattern," you will be dealing with the basics of business processes and the orchestration of the underlying business objects and business activities to fulfill a business task.

Business objects typically embody a business concept from the real world, such as a customer, a company, an order, or a product. Business objects are natural constructs in an object-oriented world. The power of inheritance, whether by interface or implementation, can play a large role in modeling business concepts. For example, products that a company sells all have certain characteristics, such as a Stock Keeping Unit (SKU) unique identifier, a weight, and some inventory information. Products also have extended information, such as the roast of a particular bean and the roasting date. In this sense, products are good candidates for object-oriented techniques. Web Services are not an object-oriented architecture; instead, they exhibit a component structure, which is less complex on the outside than a business object. The paradigm shift from an object-oriented paradigm to aWeb Service paradigm makes the business object, business object collections, business processes, and asynchronous business processes worth examining. These patterns can teach you a great deal about the interactions between the Web Service environment and Java service implementations. Further, the P.T. Monday Coffee Company surfaces several business objects through Web Services, typically through a business object collection.

This chapter looks at stand-alone business objects and how they translate into the Web Service paradigm as an exercise to understand the patterns in Java that most effectively translate into Web Services and custom types. Although you will use this pattern infrequently in a live application, it does give you valuable , repeatable practices for more common patterns, such as business object collection and business process.




Web Service Patterns
Web Services Patterns: Java Edition
ISBN: 1590590848
EAN: 2147483647
Year: 2003
Pages: 190

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net