Welcome!

Microsoft Cloud Authors: Pat Romanski, Liz McMillan, Lori MacVittie, Elizabeth White, Yeshim Deniz

Related Topics: Microsoft Cloud

Microsoft Cloud: Article

Unified Modeling Language and Object-Oriented Design

Unified Modeling Language and Object-Oriented Design

When constructing enterprise-level object-oriented applications, it is imperative to incorporate a well-organized, systematic approach to the development of the system. Most software application failures can be traced back to the lack of a unified governing project design among the various participants and owners of the project. It is one thing to build small, self-contained applications working with a team of one, but quite another to build a multitiered, enterprise-level application with a team of many. A good analogy is to compare building a storage shed with constructing a house. You can probably get away with haphazardly constructing a functional shed in the back yard. You cannot, however, successfully construct a house or office building in a similar fashion.

Enterprise-level software projects utilize teams of developers. As a member of a team, you will be asked to convert the design documents into actual implementation code. Furthermore, since modern software design is an iterative process, you will be asked for input on the development and refinement of the design during the coding phase. Just as Detroit has found that it is critical to have empowered assembly line workers who actively contribute to the design and development process of building cars, enterprise architects are dependent on application programmers for input on the refinement and development of the application design. Therefore, a software developer needs to be familiar with the purpose and structure of the various design documents used to manage the development of the application. Furthermore, lead programmers are often asked to sit in on design sessions and develop some of the design documentation. As a result, lead programmers must be comfortable working with tools such as Visio to develop the design documents.

This article is the first in a series that will introduce you to the goals of software design, the Unified Modeling Language design documents commonly used to aid in the design of software applications, and the use of Visio to create the UML design documents introduced.

The Goals of Software Design
Recent analysis of the success of software application projects has painted a bleak picture. The Standish Group conducted a study of 30,000 application projects of various sizes and across various industries. The study revealed that less than 30% of the projects were considered successful. Success is defined as completed on time, on budget, and containing the original feature set commissioned. The study also revealed that historically 25% or more of projects were cancelled before completion. Analysis of the data from the study reveals that the underlying cause of failure is not the complexity of the technology or the skill sets of the programmers involved in the project. The major reason for failure stems from a lack of communication, accountability, and ownership. In other words, a major factor in the failure of application projects is a lack of a governing project management and design methodology.

While there are many viable design methodologies to choose from, successful design methodologies have some common characteristics. They use an empowered team approach to developing software applications and encourage small iterative development cycles. Communication among project participants is carefully monitored and facilitated through a combination of formal and informal documentation. Investing in a sound design methodology will greatly increase the likelihood the project will succeed and accomplish the following:

  • Provide an opportunity to review the current business process and fix any inefficiencies or flaws uncovered
  • Educate customers as to how the software development process occurs and incorporate them as partners in this process
  • Create realistic project scopes and timelines for completion
  • Provide a basis for determining the software testing requirements
  • Reduce the cost of and time required to implement the software solution

    The Unified Modeling Language
    At the root of any design, methodology is a series of formal or informal design documents (models). These documents are a valuable aid used to focus development efforts and to facilitate communication between the various team members. In the early '80s, several software-modeling languages were being developed in an effort to standardize the documents and notations used to model object-oriented software applications. In the mid '90s, the various versions were consolidated into the Unified Modeling Language specification. The specifications were submitted to the Object Management Group (OMG), a nonprofit consortium of leading software industry companies, for approval.

    Since the UML specifications are overseen and governed by the OMG, UML is a nonproprietary open specification. As such, it has been adopted and incorporated into many object-modeling tools on the market today. An added advantage is that UML is agnostic to the language implementation of the model. The same UML design can be converted into a variety of different object-oriented languages, such as Java, C#, VB.NET, or Smalltalk. As a matter of fact, many of the leading design tools also enable forward engineering from the UML model into the class structure of several popular object-oriented languages.

    UML consists of a series of textual/graphical models of the proposed solution. These models are used to define the system scope, components of the system, user interaction with the system, and how the components of the system interact with each other to implement the functionality of the system. Some common documents (models) used in UML are:

  • Use case: A textual/graphical description of how the system will behave from the user's perspective. Users can be humans or other systems.
  • Class diagram: A visual blueprint of the objects that will be used to construct the system.
  • Sequence diagram: A model of the sequence of object interaction as the program executes. Emphasis is placed on the order of the interactions and how they proceed over time.
  • Collaboration diagram: A view of how objects are organized to work together as the program executes. Emphasis is placed on the communications that occur between objects.
  • Activity diagram: A visual representation of the flow of execution of a process or operation.

    Defining System Scope
    The first step in modeling the application is to define the system scope. In order to define the scope of the system, an open dialog must take place between the clients (users of the system), the system designers, and the system programmers. The goal of the dialog is to clearly define and document the business processing the system must perform and establish realistic scope and expectations of the clients. In the past, most of the dialog between the clients of the system and the programmers was conducted indirectly through a system architect. This isolation of the clients from the programmers is ineffective. The role of the architect is not to act as a go-between, but rather as a facilitator in the design process. His or her job is to focus the discussions and ensure that the clients and programmers agree on the project scope. The architect must help to define the core requirements of the system and which requirements will be incorporated into future rollouts.

    The outcome of the scoping dialog is a set of clearly defined statements detailing the functional requirements of the system (collectively referred to as the system requirement specifications or SRS). These statements identify the functionality of the system in terms of how the uses will interact with the system. The technical requirements of the system will be defined later in the design process. The following statements are taken from the SRS of a class registration system being designed for a technical education center.

  • Nonregistered Web users can search the Web site for course information, including course outline, prerequisites, and schedule.
  • New students must complete an online registration form providing their name, address, phone number, e-mail address, and billing information.
  • Students are classified as public or corporate. Corporate students must be affiliated with a preregistered company and include company and contact information.
  • Registered students can reserve a seat in an upcoming class.

    The Use Case Document
    After the system requirements have been defined, the next step is to transform these statements into a series of use case models. A use case model is a visual diagram often accompanied by a textual description that defines how the external entities will interact with the system. The external entities can be either human or other software applications and are referred to as actors. A use case is depicted by an oval in the diagram and a communication line connects the use case with the actors involved. Figure 1 represents a use case for the class registration system introduced previously. Each use case can be mapped to a corresponding statement in the SRS document.

    The textual description of the use case should be succinct and focused on describing the interaction between the actor and the system. It should be emphasized that the internal processing of the system has yet to be developed and should not be included in the use case description. It is often helpful to include any pre and post conditions that need to be identified for the use case. The following textual description is associated with the use case depicted in Figure 1.

    A Web user views the course information lookup page. The Web user enters course search criteria. The search criteria can be course number, type, or keywords used in the course description. After submitting the search request, the user is presented with a list of matching courses and upcoming scheduled dates.

    Preconditions: None.

    Postconditions: Registered students can sign up for a class. Non- registered students can complete a registration form and sign up for a class. If we examine the postconditions of this use case, we can identify another use case. The Class Registration use case describes the process of registering for a class. A precondition for this use case is the View Course Information use case. This type of relationship between two use cases is often referred to as inclusion. The Class Registration use case must use the View Course Information use case. The View Course Information use case can be used independently of the Class Registration use case and is the reason we break these up into two distinct use cases. Figure 2 demonstrates how inclusion is represented in a use case diagram. An arrow points from the dependent use case to the independent use case and is marked with the "uses" keyword.

    Use cases can also be related through extension. A base generic use case is defined that is extended by other use cases. For example, we can define a base Register Student use case. This use case is then extended by more specific use cases such as a Register Public Student use case and a Register Corporate Student use case. The main difference between inclusion and extension is that the extended use case is not used alone. It defines common functionality that will be incorporated into several other use cases. Figure 3 shows a diagram depicting use case extension.

    Using Visio to Construct a Use Case Document
    To help in the process of developing the various UML models, many programmers and architects use a Computer Aided Software Engineering (CASE) tool. Although there are several excellent third-party CASE tools on the market, one of the most popular tools, Visio, is included in the Enterprise Architect version of Visual Studio .NET. Visio allows you to create professional-quality diagrams, generate customizable UML reports, publish UML models as Web pages, and synchronize the UML model with the programming code.

    Before demonstrating the use of Visio, a word of caution is in order. Although I find using a CASE such as Visio very beneficial in the generation of UML models, having a CASE tool is not a requirement for UML modeling. One of the best UML modeling tools available is a whiteboard and a marker. I cannot emphasize strongly enough that most of the value of UML modeling is not in the documents created. The value is in the process. Creating the various documents forces you to systematically think through the issues necessary to successfully design your application. The time you invest in this process will reap huge dividends when you start coding the application.

    Complete the following steps to create a use case diagram using Visio. If you do not have Visio installed, follow along and complete the diagram using paper and pencil.
    1.   Start up Visio. On the File menu, choose New­>Software­>UML Model Diagram.
    2.   Locate the Shapes window on the left side of the screen. This window includes a tab for the common UML diagrams. Select the UML Use Case tab (see Figure 4).
    3.   From the Shapes window click and drag the Actor shape onto the design surface. Right-click the Actor shape on the design surface and choose Properties. You are presented with a UML Actor Properties window. (see Figure 5). Change the name to "Student" and add a description of "registered student". After adding a name and description, click the OK button.
    4.   From the Shapes window click and drag the Use Case shape onto the design surface. Right-click the Use Case shape on the design surface and choose Properties. You are presented with a UML Use Case Properties window. Change the name to "View Course Information" and add the following description:

    A student views the course information lookup page.  The student enters course search criteria.  The search criteria can be course number, type, or keywords used in the course description.  After submitting the search request, the student is presented with a list of matching courses and upcoming scheduled dates.
    After adding a name and description, click the OK button.
    5.   From the Shapes window click and drag the Communicates shape onto the design surface. Attach one end of the Communicates shape to the Actor shape and the other end to the Use Case shape. The line will turn red if it is not attached properly. Right-click the Communicates shape on the design surface and choose Shape Display Options. You are presented with a UML Shape Display Options window. Click on the Suppress First end and Second end checkboxes. When finished, click OK.
    6.   Add another Use Case shape to the design surface. Name the use case "Class Registration" and add the following description:

    After looking up the course information and retrieving a class identification number, the student enters a username and password. The student submits the request and class confirmation information is displayed.

    7.   From the Shapes window click and drag the Uses shape onto the design surface. Attach the tip of the Uses shape arrow to the View Course Information use case and the tail end to the Class Regis- tration use case. The arrow will turn red if it is not attached properly. Figure 6 shows the completed diagram.

    Summary
    This article introduced the Unified Modeling Language and the goals of software design. You have seen how use case diagrams help define the processes necessary to meet the required system functionality and scope and how Visio can aid in the development of use case diagrams. Next time I will focus on developing a UML class diagram. Class diagrams help to model the classes needed to implement the functionality of the application.

  • More Stories By Dan Clark

    Dan is a Microsoft Certified Trainer, Microsoft Certified Solution Developer, and a Microsoft Certified Database Administrator. For the past seven years he has been developing applications and training others how to develop applications using Microsoft technologies. Dan has been developing and training Microsoft's .NET technologies since the early betas. He has recently authored the book "An Introduction to Object-Oriented Programming with Visual Basic .NET," published by Apress.

    Comments (0)

    Share your thoughts on this story.

    Add your comment
    You must be signed in to add a comment. Sign-in | Register

    In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


    IoT & Smart Cities Stories
    The deluge of IoT sensor data collected from connected devices and the powerful AI required to make that data actionable are giving rise to a hybrid ecosystem in which cloud, on-prem and edge processes become interweaved. Attendees will learn how emerging composable infrastructure solutions deliver the adaptive architecture needed to manage this new data reality. Machine learning algorithms can better anticipate data storms and automate resources to support surges, including fully scalable GPU-c...
    Machine learning has taken residence at our cities' cores and now we can finally have "smart cities." Cities are a collection of buildings made to provide the structure and safety necessary for people to function, create and survive. Buildings are a pool of ever-changing performance data from large automated systems such as heating and cooling to the people that live and work within them. Through machine learning, buildings can optimize performance, reduce costs, and improve occupant comfort by ...
    The explosion of new web/cloud/IoT-based applications and the data they generate are transforming our world right before our eyes. In this rush to adopt these new technologies, organizations are often ignoring fundamental questions concerning who owns the data and failing to ask for permission to conduct invasive surveillance of their customers. Organizations that are not transparent about how their systems gather data telemetry without offering shared data ownership risk product rejection, regu...
    René Bostic is the Technical VP of the IBM Cloud Unit in North America. Enjoying her career with IBM during the modern millennial technological era, she is an expert in cloud computing, DevOps and emerging cloud technologies such as Blockchain. Her strengths and core competencies include a proven record of accomplishments in consensus building at all levels to assess, plan, and implement enterprise and cloud computing solutions. René is a member of the Society of Women Engineers (SWE) and a m...
    Poor data quality and analytics drive down business value. In fact, Gartner estimated that the average financial impact of poor data quality on organizations is $9.7 million per year. But bad data is much more than a cost center. By eroding trust in information, analytics and the business decisions based on these, it is a serious impediment to digital transformation.
    Digital Transformation: Preparing Cloud & IoT Security for the Age of Artificial Intelligence. As automation and artificial intelligence (AI) power solution development and delivery, many businesses need to build backend cloud capabilities. Well-poised organizations, marketing smart devices with AI and BlockChain capabilities prepare to refine compliance and regulatory capabilities in 2018. Volumes of health, financial, technical and privacy data, along with tightening compliance requirements by...
    Predicting the future has never been more challenging - not because of the lack of data but because of the flood of ungoverned and risk laden information. Microsoft states that 2.5 exabytes of data are created every day. Expectations and reliance on data are being pushed to the limits, as demands around hybrid options continue to grow.
    Digital Transformation and Disruption, Amazon Style - What You Can Learn. Chris Kocher is a co-founder of Grey Heron, a management and strategic marketing consulting firm. He has 25+ years in both strategic and hands-on operating experience helping executives and investors build revenues and shareholder value. He has consulted with over 130 companies on innovating with new business models, product strategies and monetization. Chris has held management positions at HP and Symantec in addition to ...
    Enterprises have taken advantage of IoT to achieve important revenue and cost advantages. What is less apparent is how incumbent enterprises operating at scale have, following success with IoT, built analytic, operations management and software development capabilities - ranging from autonomous vehicles to manageable robotics installations. They have embraced these capabilities as if they were Silicon Valley startups.
    As IoT continues to increase momentum, so does the associated risk. Secure Device Lifecycle Management (DLM) is ranked as one of the most important technology areas of IoT. Driving this trend is the realization that secure support for IoT devices provides companies the ability to deliver high-quality, reliable, secure offerings faster, create new revenue streams, and reduce support costs, all while building a competitive advantage in their markets. In this session, we will use customer use cases...