Tag: cleanc code

  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. Command/Query Segregation in PHP

    This is gonna be a short post regarding the command query segregation in object oriented programming. What is Command/Query Segregation? It means that a method is either a command performing an action, or a query that returns data, but not both. Being purely action-performing methods, commands always have a…

    on php object oriented programming oop cqrs refactor cleanc code