Tag: design pattern

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

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

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

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

  5. Test Driven Development with Nodejs and Mocha

    In this post we are going to use TDD to create a simple component using Nodejs & Mocha. This post assumes you have the basic knowledge of Nodejs and JavaScript. What is TDD? TDD, Test Drive Development has been introduced from Extreme Programming, has been used widely by a lot…

    on unit test moca design pattern Node nodejs

  6. Write Better OOP Code in PHP

    I happened to read one post that I found to be so useful to me and I want to share some opinions of the article. You can find the link here. It is about how to write a maintainable code in an object oriented way that can embrace changes. Why…

    on php object oriented programming oop design pattern refactor

  7. Refactoring Conditional Expressions

    In this post we are going to talk about how to refactor your Conditional Expressions in PHP. What is Conditional Expressions? Just like the above diagram that Conditional Expressions performs different computations or actions depending on whether a programmer-specified boolean condition evaluates to true or false. <?php $a = 1;…

    on php object oriented programming oop design pattern refactor

  8. PHP Design Patterns - Singleton Pattern

    This is one of the posts from PHP Design Patterns series. In this post we are going to talk about Singleton Pattern for PHP. What is Singleton Pattern? According to Wikipedia that In software engineering, the singleton pattern is a design pattern that restricts the instantiation of a class to…

    on php design pattern object oriented programming