By Alexandra Maratkanova (asmaratkanova@edu.hse.ru)


Let's begin by answering the question: what is maintainability? According to the IEEE Standard Glossary of Software Engineering Terminology, maintainability is “The ease with which a software system or component can be modified to correct faults, improve performance or other attributes, or adapt to a changed environment.” [1]. To put it simply, maintainability refers to how easily software can be maintained and changed. Such quality is the most vital in long-term projects and projects following Agile Methodology [2].

To improve the maintainability, various techniques are employed. The purpose of this essay is to provide an answer to the question: “Does OOD [3] improve maintainability?”

Object-Oriented Design (OOD) is the process of creating a software system or application utilizing an object-oriented paradigm [3]. OOD is a practical implementation of the Object-Oriented Programming [4] paradigm and its three principles: Encapsulation, Inheritance, and Polymorphism. Encapsulation consists of hiding internal data and implementation details of the component from other application components and providing a set of methods to interact with [5]. Inheritance means creating a general class, which will define characteristics and behavior for some cluster of linked objects [5]. The polymorphism principle allows to call of an overridden method via a variable of a parent class and thus provokes a behavior that corresponds to the subclass [5].

The object-oriented design process includes two main stages [4]:

  1. System design. The stage in which the system is analyzed and the system proposed architecture is created. The emphasis is on the system's objects rather than the system's processes.
  2. Object design. The goal of this stage is to recognize the classes and their relationships, such as the data structure for each attribute and the algorithms for the operations.

When we talk about Object-Oriented Design (OOD) in practice, we usually refer to a set of principles that guide the design and development of software systems such as SOLID, GRASP, KISS, etc., or design patterns like Gang Of Four patterns. Let's look deeper into them.

SOLID is a composition of the first five object-oriented design(OOD) principles [6].

S - Single Responsibility Principle (SRP): This principle states that a class should have only one reason to change.

O - Open/Closed Principle (OCP): The OCP encourages the design of classes that are open for extension but closed for modification.

L - Liskov Substitution Principle (LSP): The LSP states that objects of a superclass should be replaceable with objects of its subclasses without affecting the correctness of the program.

I - Interface Segregation Principle (ISP): The ISP encourages the definition of fine-grained interfaces that are tailored to the needs of the clients that use them.

D - Dependency Inversion Principle (DIP): The DIP states that high-level modules should not depend on low-level modules; both should depend on abstractions.

The SOLID principles lead to code that is easier to understand, promotes modularity, reduces coupling between components, and enhances reusability.


GRASP stands for General Responsibility Assignment Software Patterns [7]. Just like SOLID, GRASP contains a set of 9 principals. The most popular of which are Creator, Controller, and Information Expert.

The Creator pattern assigns the responsibility of creating new instances of objects to a class that contains the necessary information and knowledge.

The Controller pattern assigns the responsibility of coordinating and controlling the flow of actions within a system to a specific class or set of classes.

The Information Expert pattern assigns a responsibility to a class that possesses the most relevant information and expertise to fulfill that responsibility.


Principles like KISS, DRY, etc. unlike SOLID and GRASP represent phrases that encapsulate the meaning of the principle. For example, DRY stands for “Don't repeat yourself”

The other part of OOD is patterns. Patterns represent best practice, proven solutions, and lessons learned, that aid in evolving software engineering into a mature engineering discipline [8]. Patterns are separated into three groups:

  • Creational (one that creates objects)
  • Structural (one that determents class composition)
  • Behavioral (one that determents behavior)

Gang Of Four Patterns are the most widespread patterns in the software engineering community. Such as the Factory Method(pattern provides an interface for creating objects, but delegates the responsibility of instantiation to subclasses) and the Observer(pattern defines a one-to-many relationship between objects).

Outside of GoF patterns, the most popular one is the MVC aka Model-View-Controller. MVC is the pattern that separates an application into three interconnected components: the model (data and business logic), the view (user interface), and the controller (handles user input and orchestrates communication between the model and view).

Does OOD Help?

There is no doubt, that rules and principles proposed by OOD principles and patterns represent the best practice in software engineering. Applying principles of OOD during development will improve the maintainability of the product by promoting abstraction and modularity. Another benefit of using OOD that is rarely mentioned is that OOD is widely known in the software engineering community thus minimizing the amount of project-specific knowledge. But as with any tool, OOD shows its best when used appropriately and understands when it may not be the best fit for every situation.

References

  1. IEEE Std 610.12-1990, IEEE Standard Glossary of Software Engineering Terminology ISBN 1-55937-067-X
  2. Manifesto for Agile Software Development. Accessed online: 20 Desember 2023.
  3. Sushant Kumar. Object-oriented Design (OOD). Scaler. Accessed online: 20 Desember 2023.
  4. “Dr. Alan Kay on the Meaning of “Object-Oriented Programming”. 2003.
  5. Main principles of OOP. Epam University Programs. Accessed online: 22 Desember 2023.
  6. Mian Muhammad Asif Akhtar. S.O.L.I.D: The First 5 Principles of OOD. Medium. Accessed online: 23 Desember 2023.
  7. Patrick Karsh. GRASP Principles: Object-Oriented Design Patterns. Medium. Accessed online: 23 Desember 2023.
  8. Aleksandra Tešanovic´. What is a pattern?