Skip to main content

Posts

Showing posts with the label S.O.L.I.D: The First 5 Principles of Object-Oriented Design with PHP

S.O.L.I.D: The First 5 Principles of Object-Oriented Design with PHP

  S.O.L.I.D: The First 5 Principles of Object-Oriented Design with PHP What is SOLID? As software developer, we always need to deal with changes in requirements or a new feature in the middle of development or some extension on a feature in the maintenance phase. It is important to write code that’s easy to extend and maintain and make our life less painful. SOLID is a set of rules that guide us on how to achieve that in object-oriented programming. Using SOLID guidelines you can avoid bad design in your code and give a well-structured architecture to your design. Bad design leads to an inflexible and brittle codebase, a simple and small change can result in bugs with bad design. SOLID is an acronym of five sets of principles that was proposed by Robert C Martin aka “Uncle Bob” in the year 2000 to write high cohesive, maintainable and extensible software systems. Following are the five concepts that make up SOLID principles: Single Responsibility principle Open/Closed prin...