SOLID Architecture

SOLID Architecture

Architecture, Do we all understand the same thing?

People refer to architecture everywhere: posts, in articles and all other publications. And we take this word for granted, I did. We all seem to understand what it is. Are we all understanding the same thing? Ideas floating around concerning why and how you design an architecture and who does it.

First off,

Software architecture can be said to be the fundamental structure of a software system and the discipline of creating such structures and systems.

A layman will look at the above definition and then think of weird patterns, designs

how-why.gif or even charts which is not the goal of the process!

Software as a solution

The major reason for the creation of Software has been for problem solving.

Therefore, If you have the solution to a Software issue at work, you have the Architecture.

Then,

Architecture is the technical solution to a problem .

However, a solution can't be given if the problem isn't known . To proffer a solution in Architecture the Design Principles and Patterns must be followed. ;)

SOLID, A design Principle?

Imagine an Interview where you're asked if the SOLID principles part of software architecture and why, If you never had a profound answer to this, here's the time to get an answer.

SOLID principles are principles of Class design, they're Mnemonic Acronyms of Object Oriented Programs (OOP) coined from the writings of Robert .C. Martin in the early 2000s.

They've been around for a while and withstood the test of time. It was more of a way to think about the quality of OOPs and people basically look at it as Standards or guidelines to keep in mind while writing Object Oriented (OO) codes.

In OOPs, Identifying classes and objects and deciding how they should be used can be complex , depending on the given business problem.

Its also not uncommon for beginners to apply these principles in wrong or unintended ways. For example, Creating a class with properties and methods that shouldn't even be part of it or using Inheritance Hierarchies in the wrong way.

Wouldn't it be cool if you knew some guidelines to put in mind when designing a class?

Drum rolls

image.png

The SOLID Principles

  • S - Single Responsibility Principle (SRP)

  • O - Open Closed Principle (OCP)

  • L - Liskov Substitution Principle (LSP)

  • I - Interface Segregation Principle (ISP)

  • D - Dependency Inversion Principle (DIP)

We would be going through practical approaches to each of these Principles in the next publication .

PS : In this series, I'll be using C# and a bit of Asp.net for my code examples