Introduction to UML: Importance of modeling, principles of modeling, object oriented modeling, conceptual model of the UML, architecture, software development life cycle; Classes, relationships, common mechanisms and diagrams.
What is the UML?
- ―The Unified Modeling Language is a family of graphical notations, backed by a single metamodel, that help in describing and designing software systems, particularly software systems built using the object-oriented style.
- UML first appeared in 1997
- UML is standardized. Its content is controlled by the Object Management Group (OMG), a consortium of companies.
• Unified
– UML combined the best from object-oriented software modeling methodologies that were in existence during the early 1990‘s.
– Grady Booch, James Rumbaugh, and Ivor Jacobson are the primary contributors to UML.
• Modeling
– Used to present a simplified view of reality in order to facilitate the design and implementation of object-oriented software systems.
– All creative disciplines use some form of modeling as part of the creative process.
– UML is a language for documenting design
– Provides a record of what has been built.
– Useful for bringing new programmers up to speed.
• Language
– UML is primarily a graphical language that follows a precise syntax.
– UML 2 is the most recent version
– UML is standardized. Its content is controlled by the Object Management Group (OMG), a consortium of companies.
Why We Model
The importance of modeling
Four principles of modeling
Object-oriented modeling
The Importance of Modeling
• A successful software organization is one that consistently deploys quality software that meets the needs of its users.
• An organization that can develop such software in a timely and predictable fashion, with an efficient and effective use of resources, both human and material, is one that has a sustainable business
What, then, is a model? Simply put,
- A model is a simplification of reality.
- A model provides the blueprints of a system.
- A good model includes those elements that have broad effect and omits those minor elements that are not relevant to the given level of abstraction.
Why do we model? There is one fundamental reason.
We build models so that we can better understand the system we are developing.
Through modeling, we achieve four aims
- Models help us to visualize a system as it is or as we want it to be.
- Models permit us to specify the structure or behavior of a system.
- Models give us a template that guides us in constructing a system.
- Models document the decisions we have made.
Modeling is not just for big systems. Even the software equivalent of a dog house can benefit from some modeling. We build models of complex systems because we cannot comprehend such a system in its entirety.
Principles of Modeling
Four principles of modeling:
- The choice of what models to create has a profound influence on how a problem is attacked and how a solution is shaped.
- Every model may be expressed at different levels of precision.
- The best models are connected to reality.
- No single model is sufficient. Every nontrivial system is best approached through a small set of nearly independent models.
Object Oriented Modeling
Two Approaches:
- Traditional Approach
- Objected-Oriented Approach
- TRADITIONAL APPROACH
- Collection of programs or functions.
- A system that is designed for performing certain actions.
- Algorithms + Data Structures = Programs.
An Overview of the UML
The UML is a language for
- Visualizing
- Specifying
- Constructing
- Documenting
The UML Is a Language for Documenting
A healthy software organization produces all sorts of artifacts in addition to raw executable code. These artifacts include (but are not limited to)
- Requirements
- Architecture
- Design
- Source code
- Project plans
- Tests
- Prototypes
- Releases
Where Can the UML Be Used?
The UML is intended primarily for software-intensive systems. It has been used effectively for such domains as
- Enterprise information systems
- Banking and financial services
- Telecommunications
- Transportation
- Defense/aerospace
- Retail
- Medical electronics
- Scientific
- Distributed Web-based services
A Conceptual Model of the UML
• A conceptual model needs to be formed by an individual to understand UML.
• UML contains three types of building blocks: things, relationships, and diagrams.
• Things
– Structural things
• Classes, interfaces, collaborations, use cases, components, and nodes.
– Behavioral things
• Messages and states.
– Grouping things
• Packages
– Annotational things
• Notes
• Relationships: Dependency, Association, Generalization and Realization.
• Diagrams: class, object, use case, sequence, collaboration, statechart, activity, component and deployment.
Building Blocks of the UML:
The vocabulary of the UML encompasses three kinds of building blocks:
- Things
- Relationships
- Diagrams
Things in the UML
There are four kinds of things in the UML:
- Structural things
- Behavioral things
- Grouping things
- Annotational things
Structural Things
- Structural things are the nouns of UML models. These are the mostly static parts of a model, representing elements that are either conceptual or physical. In all, there are seven kinds of structural things.
- Classes
- Interface
- Cases
- Active Classes
- Components
- Nodes
- Collaborations