SwiftCase

What are S.O.L.I.D principles in programming?

SOLID is an acronym for five object-oriented design principles.

S – Single responsibility principle

O – Open-closed principle

L – Liskov substitution principle

I – Interface segregation principle

D – Dependency Inversion Principle

The intention behind these five principles is to promote flexible, understandable and maintainable code.

The Single Responsibility Principle asserts that a class should have only one responsibility. This single responsibility should be entirely encapsulated by the class.

The Open-Closed Principle specifies that software entities should be open for extension but closed for modification.

The Liskov Substitution Principle asserts that a subtype, of type, property can be replaced by type property without altering the result or behaviour.

p(T) = p(S) => same result/behaviour

Interface segregation defines that interfaces should be small and focused instead of large and lost in functionality. In Object Oriented Programming a class can implement several interfaces so each class should only implement what is relevant to them.

Dependency Inversion determines that entities must depend on abstractions, not on concretions. A high-level module must not depend on a low-level module, and both should depend on abstractions. Following this principle reduces objects coupling.

If you’re interested providing efficient service to customers using a powerful, cloud-based business process management system, get in touch with us today. For a free, no-obligation demonstration.

Comments are closed.