|
|
Summary
In this chapter, we have had a quick orientation of the Visio environment, and seen some of the software diagrams that it provides - Visio has many, many other diagrams, but we'll only be focusing on a subset of those here, and in
We
We then moved on to look at some of the common software diagrams to get a better idea of what Visio can offer the developer, and also to provide an opportunity to become more comfortable with environment. We didn't, however, look at the UML model diagrams - we will begin our exploration of these diagrams in the
|
||||||||||||||||||||||||||||||||||
|
|
Chapter 3: Diagramming Business Objects
Overview
The UML without business objects is like the Tour de France without bicycles. Without business objects, class diagrams, collaboration diagrams, sequence diagrams, and state chart diagrams hold little meaning. It's not until you begin designing and using business objects that you see a real need for the UML or modeling tools such as Visio or Rational XDE. However, once you begin using business objects, you'll be firing up your UML modeling tool on a daily basis to conceive, design, and understand the object model of your applications, which usually produces more flexible, extensible, and
Although much has been written about the benefits of business objects, many companies continue to create monolithic applications. A monolithic application is a piece of software with the
In this chapter, we are first going to learn what business objects are and why you should use them. If you are going to climb the business object learning curve, you should have compelling reasons to do so. Although business objects can be one of the more difficult concepts for developers to grasp, once you "get it" and begin using business objects in your applications, you'll never go back again. In this chapter we will also cover:
|
||||||||||||||||||||||||||||||||||
|
|
What is a Business Object?
A business object is an object usually representing a real-world person, place, or thing. Business objects allow you to represent both the attributes and behavior of these entities. For example, if you are creating a point-of-sale
Object Modeling Compared to Data ModelingIf you're familiar with data modeling, this concept of modeling entities shouldn't be too foreign. As shown in the following image, when you model data, you often create data tables representing attributes of real-world entities. Using the point-of-sale invoicing application as an example, you may have customer, invoice, payment, and inventory tables that represent real-world entities.
During data modeling, you design tables with fields that represent the properties or attributes of real-world entities. For example, a customer table may have fields for a customer's
However, modeling the attributes of a real-world entity is only half the story. Entities also have
behavior
that can be
Modeling Attributes and Behavior
Business objects model the
attributes
of real-world entities because they encapsulate an entity's data. As shown in the following image, all data manipulation in your application should take place via business objects. This image shows a
You can add data manipulation
Business objects model the
behavior
of real-world entities because you can add methods to them representing real-world actions. For example, you can create a
PutOnCreditHold
method for a
Customer
business object that
Building Monolithic Applications
As mentioned earlier, the alternative to using business objects is creating monolithic applications. Many software applications are still created this way today. Sometimes the reason that they are created this way is that developers believe it's easier - and on some levels, it is! In other cases, upper management may not be willing to make an investment in analysis and design. Regardless of the reason, monolithic applications are extremely
Building Component-Based Applications
There are many benefits from building component-based applications with business objects, which we'll cover in the
|
||||||||||||||||||||||||||||||||||