Welcome!

Microsoft Cloud Authors: Janakiram MSV, Yeshim Deniz, David H Deans, Andreas Grabner, Stackify Blog

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.


    @ThingsExpo Stories
    DevOps at Cloud Expo – being held October 31 - November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA – announces that its Call for Papers is open. Born out of proven success in agile development, cloud computing, and process automation, DevOps is a macro trend you cannot afford to miss. From showcase success stories from early adopters and web-scale businesses, DevOps is expanding to organizations of all sizes, including the world's largest enterprises – and delivering real r...
    While some developers care passionately about how data centers and clouds are architected, for most, it is only the end result that matters. To the majority of companies, technology exists to solve a business problem, and only delivers value when it is solving that problem. 2017 brings the mainstream adoption of containers for production workloads. In his session at 21st Cloud Expo, Ben McCormack, VP of Operations at Evernote, will discuss how data centers of the future will be managed, how th...
    SYS-CON Events announced today that Massive Networks, that helps your business operate seamlessly with fast, reliable, and secure internet and network solutions, has been named "Exhibitor" of SYS-CON's 21st International Cloud Expo ®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. As a premier telecommunications provider, Massive Networks is headquartered out of Louisville, Colorado. With years of experience under their belt, their team of...
    SYS-CON Events announced today that Mobile Create USA will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Mobile Create USA Inc. is an MVNO-based business model that uses portable communication devices and cellular-based infrastructure in the development, sales, operation and mobile communications systems incorporating GPS capabi...
    SYS-CON Events announced today that MIRAI Inc. will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. MIRAI Inc. are IT consultants from the public sector whose mission is to solve social issues by technology and innovation and to create a meaningful future for people.
    SYS-CON Events announced today that Keisoku Research Consultant Co. will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Keisoku Research Consultant, Co. offers research and consulting in a wide range of civil engineering-related fields from information construction to preservation of cultural properties. For more information, vi...
    SYS-CON Events announced today that Interface Corporation will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Interface Corporation is a company developing, manufacturing and marketing high quality and wide variety of industrial computers and interface modules such as PCIs and PCI express. For more information, visit http://www.i...
    SYS-CON Events announced today that Fusic will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Fusic Co. provides mocks as virtual IoT devices. You can customize mocks, and get any amount of data at any time in your test. For more information, visit https://fusic.co.jp/english/.
    SYS-CON Events announced today that TMC has been named “Media Sponsor” of SYS-CON's 21st International Cloud Expo and Big Data at Cloud Expo, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Global buyers rely on TMC’s content-driven marketplaces to make purchase decisions and navigate markets. Learn how we can help you reach your marketing goals.
    SYS-CON Events announced today that Enroute Lab will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Enroute Lab is an industrial design, research and development company of unmanned robotic vehicle system. For more information, please visit http://elab.co.jp/.
    There is huge complexity in implementing a successful digital business that requires efficient on-premise and cloud back-end infrastructure, IT and Internet of Things (IoT) data, analytics, Machine Learning, Artificial Intelligence (AI) and Digital Applications. In the data center alone, there are physical and virtual infrastructures, multiple operating systems, multiple applications and new and emerging business and technological paradigms such as cloud computing and XaaS. And then there are pe...
    SYS-CON Events announced today that Daiya Industry will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Daiya Industry specializes in orthotic support systems and assistive devices with pneumatic artificial muscles in order to contribute to an extended healthy life expectancy. For more information, please visit https://www.daiyak...
    Real IoT production deployments running at scale are collecting sensor data from hundreds / thousands / millions of devices. The goal is to take business-critical actions on the real-time data and find insights from stored datasets. In his session at @ThingsExpo, John Walicki, Watson IoT Developer Advocate at IBM Cloud, will provide a fast-paced developer journey that follows the IoT sensor data from generation, to edge gateway, to edge analytics, to encryption, to the IBM Bluemix cloud, to Wa...
    In his session at @ThingsExpo, Greg Gorman is the Director, IoT Developer Ecosystem, Watson IoT, will provide a short tutorial on Node-RED, a Node.js-based programming tool for wiring together hardware devices, APIs and online services in new and interesting ways. It provides a browser-based editor that makes it easy to wire together flows using a wide range of nodes in the palette that can be deployed to its runtime in a single-click. There is a large library of contributed nodes that help so...
    With major technology companies and startups seriously embracing Cloud strategies, now is the perfect time to attend 21st Cloud Expo October 31 - November 2, 2017, at the Santa Clara Convention Center, CA, and June 12-14, 2018, at the Javits Center in New York City, NY, and learn what is going on, contribute to the discussions, and ensure that your enterprise is on the right path to Digital Transformation.
    SYS-CON Events announced today that App2Cloud will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct. 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. App2Cloud is an online Platform, specializing in migrating legacy applications to any Cloud Providers (AWS, Azure, Google Cloud).
    Agile has finally jumped the technology shark, expanding outside the software world. Enterprises are now increasingly adopting Agile practices across their organizations in order to successfully navigate the disruptive waters that threaten to drown them. In our quest for establishing change as a core competency in our organizations, this business-centric notion of Agile is an essential component of Agile Digital Transformation. In the years since the publication of the Agile Manifesto, the conn...
    WebRTC is great technology to build your own communication tools. It will be even more exciting experience it with advanced devices, such as a 360 Camera, 360 microphone, and a depth sensor camera. In his session at @ThingsExpo, Masashi Ganeko, a manager at INFOCOM Corporation, will introduce two experimental projects from his team and what they learned from them. "Shotoku Tamago" uses the robot audition software HARK to track speakers in 360 video of a remote party. "Virtual Teleport" uses a mu...
    Internet of @ThingsExpo, taking place October 31 - November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA, is co-located with 21st Cloud Expo and will feature technical sessions from a rock star conference faculty and the leading industry players in the world. The Internet of Things (IoT) is the most profound change in personal and enterprise IT since the creation of the Worldwide Web more than 20 years ago. All major researchers estimate there will be tens of billions devic...
    Mobile device usage has increased exponentially during the past several years, as consumers rely on handhelds for everything from news and weather to banking and purchases. What can we expect in the next few years? The way in which we interact with our devices will fundamentally change, as businesses leverage Artificial Intelligence. We already see this taking shape as businesses leverage AI for cost savings and customer responsiveness. This trend will continue, as AI is used for more sophistica...