OOP, Design Patterns…???

Hmm, ok, maybe I have jumped straight to the point but did not explain what is this series about…

What is OOP?

OOP stands for “Object-Oriented Programming”. In simple words, it is a programming paradigm which uses the idea of objects to represent data and methods to manipulate that data. This idea lets software engineers write code which represents the real-world objects, the data they contain and their relations with other objects via corresponding code structures. If you have already written some code using Dart or any other OOP programming language (C#, C++, Java just to name a few), probably you saw and used classes, defined properties and/or methods inside of those classes, created class instances and operated with them, specified relations between different objects/classes — that’s nothing less than Object-Oriented programming!

What is OOP Design Pattern?

OOP design pattern is a typical solution to a common problem in software design. In the GoF book, the purpose of a design pattern is described like this:

A design pattern names, abstracts, and identifies the key aspects of a common design structure that make it useful for creating a reusable object-oriented design.

A software design pattern is not about solving specific UI/UX problems (as it could look from the first sight by noticing the word design), it is more about the code structure which is like a blueprint to solve a particular object-oriented design problem, issue in your code. By applying these patterns, you can speed up the development process, write code which is more flexible, reusable. However, the most difficult part of these patterns is to understand the main idea behind them, to identify places in your code where these patterns could be applied and which problems could be resolved. But that’s what this series is all about — to introduce and provide the basics of several design patterns to help you choose the right one for your specific problem.