Membership
Main Menu
Forum Boards
Stats
- 20 tutorials
- 74,669 members
- 732,724 forum posts
- 13 blog posts
Tutorials
OO PHP Part 3: UML, Classes and Relations
Views: 36403
1. Introduction
1.1 What are class diagrams?
Class diagrams are representations of entities and their relations. These entities most commonly represent a class or interface like they exist in your code, but can also refer to an entity in a more abstract sense, even a type of data.
These are all static entities. A class diagram doesn’t reflect the state an entity is in. A class diagram featuring object instances is commonly referred to as an Object Diagram.
1.2 Class Diagrams: OOA versus OOD
At this stage, I don’t want to get too much into the details of either Object Orientated Analysis or Object Orientated Design, but, I will give a brief insight into how these concepts relate to Class Diagrams.
Three perspectives have been defined to look at Class Diagrams:
- Conceptual Perspective
- Specification Perspective
- Implementation perspective
The conceptual perspective is used to gain insight into the needed functions and properties in a system. These are not necessarily the actual properties of the eventual system. The entities in the diagrams are conceptual; they may or may not represent the eventual entities in the system. This perspective is used for analysis (OOA), and is commonly the next step after a basic Requirement Analysis.
The (rarely used) specification perspective presents a solution, a design (OOD), but doesn’t yet commit to a specific language implementation.
The implementation perspective gets into the nitty gritty details of the design, accounting for language specifics. This design can eventually be translated into a code skeleton (many UML editors offer a code generation feature).
In practice you may find diagrams that have properties of more than one perspective.
