Tag: design pattern

  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. Composite Design Pattern in Java

    In this post we are going to talk about another structural design pattern - Composite Design Pattern. What the heck is Composite Design Pattern? Here are some definition that I think is really helpful, at least for me, to understand what Composite Design Pattern is. link link link Highly recommend…

    on design pattern java object oriented programming oop cleanc code programming refactor

  6. Remove Optional Argument for Clean Code

    In this blog we are going to talk about how to remove optional arguments to make your code cleaner, using overloading. What's overloading? Here is a good explanation for overloading. So basically some programming languages allow you to create methods with the same name, but different arguments and depends on…

    on c# oop object oriented programming design pattern cleanc code

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

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