- Business object
-
"Business objects" redirects here. For the software company, see Business Objects.
A business object is a type of an intelligible entity being an actor inside the business layer in an n-layered architecture of object-oriented computer programs.
Whereas a program may implement classes, which typically end in objects managing or executing behaviors, a business object usually does nothing itself but holds a set of instance variables or properties, also known as attributes, and associations with other business objects, weaving a map of objects representing the business relationships.
A domain model where business objects do not have behaviour is called an Anemic Domain Model.
Business objects separate state from behavior because they are communicated across the tiers in a multi-tiered system, while the real work of the application is done in the business tier and does not move across the tiers.
For example, a "Principal" would be a business object where its attributes can be "Name", "Second name", "Age", "Area", "Country" and it could hold an 1-n association with its employees (a collection of Employee instances).
Another example would be a concept like "Process" having "Identifier", "Name", "Start date", "End date" and "Kind" attributes and holding an association with the "Employee" (the responsible) that started it.
Finally, although a business object represents an entity, it should not be confused with relational model entities. Sometimes a relational entity could be mapped by a business object but this is not a rule. Take as example a relational entity like "Customer" which has a "Kind" attribute in order to distinguish "Country customers" from "Abroad customers". Because of design needs, maybe this relational entity will end in two business objects: "CountryCustomer" and "AbroadCustomer", since everyone will not hold same associations. First will be holding fiscal associations while second will be associated with taxes and its related duty.
See also
References
- Rockford Lhotka, Visual Basic 6.0 Business Objects, ISBN 1-86100-107-X
- Rockford Lhotka, Expert C# Business Objects, ISBN 1-59059-344-8
- Rockford Lhotka, Expert One-on-One Visual Basic .NET Business Objects, ISBN 1-59059-145-3
- Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides, Design Patterns, ISBN 0-201-63361-2
External links
- A definition of domain model by Martin Fowler
- Anemic Domain Model by Martin Fowler
- A definition of business object by Joseph Reddy
Categories:- Programming constructs
Wikimedia Foundation. 2010.