Home > Articles > Software Development & Management > UML

This chapter is from the book

This chapter is from the book

What Is a Model?

Good question.

Model:

  1. A miniature representation of an object.

  2. A pattern on which something not yet produced will be based.

  3. A design or type.

  4. One serving as an example to be emulated or imitated.

Modeling:

  1. To construct a plan, esp. after a pattern. [WEBS1]

You are surrounded by models every day. As you get ready for work in the morning, you turn on your television. The morning news presents the local weather map showing how rain will be moving in this weekend. You reach for your vitamins. The cap is imprinted with a diagram showing how to remove the child-proof (or should we say adult-proof) cap.

You complete your morning ritual and jump into your automobile for the always-pleasant commute to the office. You stop to pick up some breakfast. You notice that behind the counter is a laminated poster containing a series of pictures (no words) showing the fast-food staff how to assemble your breakfast sandwich. Then, back on the road you go.

Half way to the office, you hear a traffic report of an accident ahead, so you pull off the road and consult your road atlas for an alternate route. You stay alert for the overhead highway signs with the large arrows indicating the lanes of traffic and which lane turns into the alternate exit you are searching for. You arrive at the office. As you stroll through the lobby, you see the glass-enclosed 3D replica of the new corporate headquarters that is under construction. You make it to your cubicle just in time to attend a morning meeting where a benefits person is showing bar charts of how much your money can earn if you invest it in the company retirement plan.

The weather map (a model or representation of the weather), the child-proof cap (a process model of how to remove the cap), the laminated sandwich instructions (another process model), the road atlas (an abstracted model of the road), the highway sign (a directional model of the highway), the corporate headquarters replica (a physical model of the building and surrounding terrain), and the bar chart (an analytical model) all model various aspects of your world.

A model, in the sense that we will discuss in this book, is a visual way of depicting your business, its rules, the use of your systems, applications, and system architectures, and interactions within your systems. You might have seen this described as "visual modeling," a term made popular by many computer-aided software engineering (CASE) vendors over the past couple of decades. Because models don't necessarily have to be visual (they can be textual or mathematical, for example, as we saw earlier), visual modeling has come to describe exactly what it implies: models that are visual in nature, using specific graphical representations.

In the remainder of this chapter, you will learn about the value of modeling, specifically when designing software and applications. First, you will learn why models should be built and then who should be building those models. We also introduce the different types of UML models that you can build.

Why Should I Build Models?

One of the most frequent objections to the UML we have heard isn't about the UML itself; it's that some people believe that there is no value in modeling. One theme you will pick up throughout this book is that modeling for modeling's sake is of little value, but when you do it for the right reasons, modeling is quite valuable. Modeling helps you to communicate designs, quickly clarify complex problems and scenarios, and ensure that your designs come closer to reality prior to implementation. This can save you and your organization a lot of time and money, and it enables teams of people (be they teams of 2 or 2,000) to work together more effectively and ensure that they are working toward the same common goals.

Think of it this way. Would you build a house without a plan? You might not build a small-scale version of the house first, but you (or your architect and builder) certainly would have design sketches, architecture drawings, and engineering assessments in hand prior to starting construction.

From the Real World—Houses Are Similar to Software

Before embarking on my software development career, I spent several years building houses. During that time, I learned that when you use a good model (design), the house will stand through time and different weather conditions and will be amicable to changes that might be needed later, such as adding a window. If you don't use a good model but instead use a design you have in your mind, there is a good chance your final product won't be what you intended.

Designing software brings similar challenges. You need to ensure that the designs and plans are eventually realized and realized correctly so that they last architecturally through time, and you must also ensure that if you do need to make changes, they too can endure over time. Also, you need to understand what changes will break your design. When you add a window to a house, for instance, you need to know where the pipes and wires are and what types of support exist to handle the load. Likewise, when you add a component to a system, you need to make sure the system won't come crashing down as a result.

Lessons Learned

  1. Design so that you can accommodate unplanned changes.

  2. Create a well-documented design so that others who are new to the design can still work with it.

  3. Have a visual model of an architecture to help you determine implications of change.

Watch Out

Do not model for modeling's sake. Make your models actionable so that users understand why you created the models and what you expect should result from them in the future.

Also, be warned! Watch out for "analysis paralysis." This occurs when you spend too much time analyzing a problem and don't get to the point where you are being productive.

When you focus on making your analysis or modeling actionable, you set a plan as to what you want to achieve from your analysis. You also adopt a mindset to approach modeling without rushing, making it of value, and then moving on to the next thing—be it another model, a change to the business or business process, or something else such as writing code.

Another reason you should model is simply to understand your business and its processes. You model your business processes not only to understand what the business does and how it functions but also so that you can identify how changes will affect the business. Modeling the business helps you to identify strengths and weaknesses, identify areas that need to be changed or optimized, and in some cases, simulate different business process options.

Why Should I Model with the UML?

When we explain why people should model with the UML, we like to draw a parallel to the field of electrical engineering. Electrical engineers draw a schematic for an electrical device in a standard way (see Figure 1-2), using a common visualization so that no matter where you are in the world, the schematic is always interpreted in the same way. Anyone who is trained in reading such a diagram can easily understand the circuit design and how the device will function. Even those who might not be experts but who understand the symbols can still understand what part belongs where and how they are connected.

Figure 1.2Figure 1-2 An electrical schematic.

Other walks of life have similar languages or notations that are specific to their disciplines. The field of music, for instance, has a standard notation (see Figure 1-3). This was a critical development in the musical field. Before this notation was developed, the only way a composer could correctly and consistently teach musicians how to play his music was in person (a conundrum that closely parallels the software industry before the development of the UML).

Figure 1.3Figure 1-3 Musical notation.

Similarly, mathematics has its own specific notation (see Figure 1-4). In fact, the language of mathematics is often cited as the one common language that all advanced civilizations understand.

Figure 1.4Figure 1-4 Mathematical notation.

The same is true for the UML. It provides a common "language" to bring together business analysts, software developers, architects, testers, database designers, and the many other professionals who are involved in software design and development so that they can understand the business, its requirements, and how the software and architectures will be created. Although a cellist might not understand how to play the trumpet, she will understand what notes a trumpeter plays and when because she understands musical notation. Similarly, a business analyst who knows the UML can understand what a programmer is creating using the UML because the UML is a common language. With the ongoing need to think globally when building software, the ability provided by the UML to communicate globally becomes very important.

From the Real World—Not Lost in Translation

We were recently working with a large financial institution. They began to outsource much of their software development for a specific project. In an effort to keep costs low, they chose a well-respected international systems integrator to run the job, but they also wanted to maintain control of the system that was being built, so they kept their own architects on the project. Because the company developed the system in this way, rather than doing everything themselves, senior management had the comfort of knowing that the project would fulfill the specified requirements while staying within budget and time constraints

The financial institution had the people who understood their business. They had the domain expertise and the contacts within the business to gather and verify the requirements as needed. Their initial concerns centered on the ability to transfer information between the different organizations and across international borders. That information had to be well understood and couldn't be allowed to slow down the process. Understanding this prior to the request for proposal, the financial institution included that the contractor must use a UML-based modeling tool and follow specific quality processes as part of their contract. They found quickly that having a common language to interpret requirements and architectures enabled them to understand each other without having to translate designs and desires.

Lessons Learned

  1. Having a common way to understand what needs to be built helped this team of different organizations, languages, and countries communicate effectively to successfully deliver an application that was on time and, more importantly, that met the requirements of their end users.

What Can I Model with the UML?

The UML enables you to model many different facets of your business, from the actual business and its processes to IT functions such as database design, application architectures, hardware designs, and much more. Designing software and systems is a complicated task requiring the coordinated efforts of different groups performing various functions: capturing the needs of the business and systems, bringing software components together, constructing databases, assembling hardware to support the systems, and so on.

You can use the different types of UML diagrams (summarized later in this chapter) to create various types of models. Figure 1-5 lists these models and their usage. The models are composed of different diagram types, model elements, and linkages between model elements that enable you to trace between them so that you can understand how they relate. Different people in the organization use these models to describe different information. As we continue throughout this book, we will elaborate on these models, their use, and the roles of the people who will be using these models.

Figure 1.5Figure 1-5 Model types and usage.

Who Should Build Models?

Not everyone should be involved in building models, but that doesn't mean everyone can't take advantage of the models that are built. In software design and development, you should start with models that help you understand the business and end with models designed to test your applications (and repeat this process with each software iteration thereafter). A model should be a living item that continues to be updated as the business and system are updated. The model should provide understanding, communication, and direction. If it isn't updated throughout the entire software development process, it can become stale and useless, so it's imperative that your organization has a process for dealing with models and with overall model development that includes who should be creating, updating, and maintaining the models over time.

Your organization also needs to take advantage of its staff as well as external resources. An organization typically has many domain experts, often in a business analyst-type role. These people would be building and designing business models of what is in place today (as is) and where the organization is heading (as desired). These experts often must build application models at the architectural level. As such, they must understand how what you are building will interact with itself (components within itself) and with other systems inside the organization. Architects also might take on this role as well.

As an application developer, writing code is what you like to do. But writing code without designing how it will interact can be dangerous to the integrity of the system, and that is why developers should also model the code before they write it. If they are using certain tools that enable code generation from the models developed, you can automate the creation of the boring code development tasks and get down to doing the fun development work of implementing business- and technology-specific code.

As a tester, you might not get involved directly in model building, but as you will learn later in this book, understanding the models can be quite useful when you have to create your tests. If testers are following an Extreme Programming (XP) style of software development process, they might also get involved in creating the models. XP proclaims that development requirements come from test cases that are created prior to the start of coding. That approach is a bit different from other processes in which test cases are created from requirements and aren't considered the requirements. This means that when testers follow an XP process, they also are really designing the requirements and thus modeling them (textually), which ensures a better understanding by everyone else involved in the development process.

From the Real World—Flying Toward Success

A large airline company I worked with had a great way of deciding who would model and how to avoid the issue of too many people modeling. The company created teams of people from different parts of the business, including information technology (IT). You might have heard the term of "two in a box," referring to putting two people with different skills together so that they can team up and leverage each other's strengths. This company put more than two people together, but they got similar results. They teamed up to design first-level models (called domain models), in which they defined different elements such as the many different types of agents involved within the airline industry and how they interacted with the different parts of the business. More than 10 different types of agents were in their organization, including travel, ticket, gate, etc. By coming together as a team, they leveraged the different types of expertise available and ensured that all constituents involved in the process agreed to both the terminology and how each agent was involved in the business process. As the book continues, we will examine other successes seen in this organization.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020