Tag: solid

  1. Visitor Design Pattern in Java

    In this post we are going to talk about Visitor Pattern in Object Oriented Programming. What is Visitor Pattern? In a simple sentence, Visitor Design Pattern is used when you trying to seperate your algorithm from the object. Why? Sometimes you want to add new features without changing the object…

    on design pattern oop object oriented programming refactor cleanc code programming php solid

  2. Dependency Inversion

    In this post we are going to talk about one of the most important topics for object oriented programming, at least for me it is the most important one. Dependency Inversion Inversion of Control Dependency Injection All of the these is about how to make your code loosely couple. You…

    on object oriented programming design pattern cleanc code programming php solid

  3. Setter and Getter are evil!

    In this post we are going to talk about why getter and setter are bad and how to solve it. What is Getter & Setter? Getter & Setter are how you use to modify fields in your class. Let's have a look at the following example. package com.oop; class…

    on oop solid object oriented programming design pattern programming refactor

  4. Why is Interface so important?

    In this post we are going to talk about what Interface is and why it is so important. What is Interface? Interface is a contract that defines sets of methods that have to be implemented by whatever classes implementing the interface. Why is Interface important? Let's have a look at…

    on oop object oriented programming design pattern programming solid

  5. Lixkov Substitution Principle - How To Solve It

    In this post we are going to talk about how to the code that violates Lixkov Substitution Principle. What is Lixkov Substitution Principle? There are tons of definitions explaining what Lixkov Substitution Principle is. Here I am offering my own explanation which I think is the most stupid - If…

    on object oriented programming oop design pattern programming solid

  6. Factory Pattern

    In this post, we are going to talk about how to use Factory Design Pattern in PHP. What is Factory Pattern and Why? Using Factory design pattern can hide the instantiation logic and defer it to subclasses. Although it might look a bit too much to write at the beginning…

    on oop php object oriented programming design pattern programming refactor solid

  7. Loose Coupling in PHP

    In this post, we are going to talk about what is Loose Coupling in PHP. What is Loose Coupling? Here is a rather great article if you want to understand more about what is Loose Coupling. Have you ever experienced the situation that a change of a class influence the…

    on php oop refactor object oriented programming solid

  8. SOLID - Dependency Inversion Principle

    In this post, we are going to talk about the D from SOLID, which is Dependency Inversion Principle. What is Dependency Inversion Principle. Normally when we create classes for our software, we will start from the lowest level first. For example if I need to create a Dog class, I…

    on solid oop php