Tag: php

  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. Strategy Design Pattern in PHP

    In this post we are going to talk about Strategy Pattern in Object Oriented Programming. What is Strategy Pattern? Strategy Pattern encapsulates algorithms into classes. If you see a lot of conditional statement in order to perform different algorithms then this is exactly what Strategy Design Pattern is for. That's…

    on design pattern php object oriented programming oop cleanc code programming

  3. State Pattern in PHP

    In this post we are going to talk about State Pattern in Object Oriented Programming. What is State Pattern? You must remember that within a class you have some if statements for different states of the class in order to perform different logics? Oh well State Pattern is a pattern…

    on design pattern php object oriented programming oop cleanc code programming

  4. 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

  5. Adaptor Pattern in PHP

    In this post we are going to talk about Adaptor Pattern in Object Oriented Programming. What is Adaptor Pattern? There are shit tons of definition out there if you just google it. So here I provide my really simple definition of what Adaptor Pattern is. Imagine there are two classes…

    on design pattern php oop object oriented programming

  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. Prototype Pattern In PHP

    In this post, we are going to talk about how to use Prototype Pattern in PHP. What is Prototype Pattern and Why? First let's talk about what is Prototype Pattern. Prototype Pattern belongs to Creational Category of Design Pattern which means it deals with the creation of objects. and there…

    on oop php object oriented programming design pattern programming

  8. 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