Denis Kirevby Denis Kirev

Models: The Bridge Between Concepts and Solutions in Object-Oriented Design

How modeling connects problem concepts to software solutions, why models matter, and how object-oriented principles and UML help build maintainable systems.

3 min read

1.2.1 — Models: The Bridge Between Concepts and Solutions

Before you build software, you need a design — a model that connects the messy real-world problem to a clear, implementable solution. In object-oriented design, models are the bridge between concepts and code.

Why Not Jump Straight to Code?

  • Like building a house, you don't start nailing boards without a blueprint
  • For complex problems, you need to break things down and plan before you build
  • Design is an iterative process that explores both the problem space (what needs solving) and the solution space (how to solve it)

The Role of Modeling

  • Conceptual design: Breaks down the problem into manageable pieces (using CRC cards, object identification, etc.)
  • Technical design: Refines the solution, specifying how objects work and interact so developers can implement them
  • Models help both users and developers discuss and understand the system in common terms

Evolution of Programming Strategies

  • Early approaches: Top Down Programming for data processing, mapping processes to routines
  • Object-Oriented Programming (OOP): Models the world as objects, making it easier to map real-world concepts to code
  • OOP languages and modeling techniques (like UML) make the transition from concept to code smoother

Why Object-Oriented Modeling?

  • The real world is full of objects — so is your problem domain
  • Object-oriented analysis identifies key objects (nouns) in the problem
  • Object-oriented design refines these objects, their attributes, and behaviors
  • Models are refined iteratively as understanding grows

Types of Objects in Models

  • Entity objects: Represent real-world things (e.g., Student, Course)
  • Control objects: Coordinate actions and handle events
  • Boundary objects: Connect your system to external services or users

UML: Visualizing Models

  • Unified Modeling Language (UML) is a standard way to express models visually
  • Structural models (class diagrams) show what objects do and how they relate
  • Like a scale model of a building, UML diagrams help you see relationships and structure before you build

Design Principles and Quality

  • Apply design principles to simplify and clarify objects
  • Break down complexity, look for commonalities, and handle them consistently
  • Continually critique and refine models to ensure they solve the right problem and meet quality goals (reusability, flexibility, maintainability)
  • Models serve as living documentation and can be mapped to skeletal code (especially in languages like Java)

Practical Advice

  • Don't skip modeling — it saves time and pain later
  • Use models to communicate with both technical and non-technical stakeholders
  • Iterate: refine your models as you learn more
  • Use UML or other diagrams to visualize and document your design

How do you use models in your design process? What's the most useful model you've built or seen? Share your experience below.

Last updated: June 9, 2024