The business object model
The business object serves as the foundation for the rest of the application. It is
the object-oriented representation of the problem domain, and therefore the
classes that make up the business object model are sometimes called domain
classes . All other layers use the business object model to represent data and per-
form certain business logic functions.
Application designers usually start with the design of the business object
model before anything else. Even if at a very high level, the classes are identified
by deriving them from the nouns in the system. For example, in a bookstore
application, the business object model might include a class called Genre with
instances like Science Fiction , Mystery , and Children's . It might also have a
class called Book with instances such as The Long Walk , The Firm , and Curious
George . As the application grows more advanced, classes represent more abstract
concepts, like InvoiceLineItem .
Business object model classes may contain some logic as well, but they should
never contain any code that accesses any other layer, especially the presentation
and persistence layers. Furthermore, the business object model should never
depend on any other layer. Other layers use the business object model—it's never
the other way around.
A persistence layer like i BATIS will generally use the business object model for
representing data that is stored in the database. The domain classes of the busi-
ness object model will become the parameters and return values of the persis-
tence methods. It is for this reason that these classes are sometimes referred to as
data transfer objects ( DTO s). Although data transfer is not their only purpose, it is a
fair name from the perspective of a persistence framework.
The presentation layer
The presentation layer is responsible for displaying application controls and data
to the end user. It is responsible for the layout and formatting of all information.
The most popular presentation approach in business applications today are web
a web browser.
Web applications have the advantage of cross-platform compatibility, ease of
deployment, and scalability. Amazon.com is a perfect example of a web application
that allows you to buy topics online. This is a good use of a web application, as it
would be impractical to have everyone download an application just to buy topics.