What Is a Business Object?
This question may sound a little too simplistic for a book on Struts. However, the term "business object” has many connotations, and some developers use it when they really mean something else. A business object (BO) is simply a software abstraction of a real-world entity. It represents a person, place, thing, or concept from the business domain. So, concepts such as items, orders, and customers are all business objects from the Storefront business domain.
Business objects consist of state and behavior. The
OrderBO
, for example,
is aware of information relating to a single customer purchase order,
including price, tax, and order status. An OrderBO
also should know who the customer is and be able to provide this
information. Having both state and behavior is an important criterion
for a class to be considered a business object.
Let’s examine a few other business object
characteristics.
Requirements for Business Objects
For a class to be considered a business object, several conditions should be met:
Consists of state and behavior
Represents a person, place, thing, or concept from the business domain
Is reusable
Business objects also can be grouped into different classifications. Generally, there are three types:
Entity business object
Process business object
Event business object
Probably the most familiar, an entity BO represents a person, place, thing, or concept. These usually are extracted straight from the business domain by considering the nouns in ...
Get Programming Jakarta Struts now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.