Design Patterns – Observer

The Observer is a Behavioral Design Pattern often known as Dependents or the Publish-Subscriber pattern where the subject would be the publisher and observer would be the subscriber. It defines and maintains a dependency between objects. It is used to keep consistency, or where you don’t know who needs to be notified when your Subject Design Patterns – Observer

Design Patterns – Facade

Sometimes our programs become too complex and some objects are being difficult to use and many times these processes for being using an object are repetitive and almost the same. In these cases, we can provide a Facade and with it, we are able to hide unnecessary processes and provide to our users only what Design Patterns – Facade

Design Patterns – Abstract Factory

This Creational Pattern provides an interface to create families of related or dependent objects without specifying their concrete classes. This pattern could be used with other creational patterns, such as Factory Method, or could be implemented also using Prototype Pattern and a concrete factory could also be a singleton. Wow, that’s so much information in Design Patterns – Abstract Factory

Design Patterns – Adapter

This Structural Design Pattern is used to convert an interface of a class to a different form, this allows that some different classes could work together. It ‘s the perfect approach to be used with Third Parties objects. An adapter allows you to translate one interface for use with another. Adapters could be implemented using Design Patterns – Adapter

Debugging MySQL Queries

If you ever work with MySQL databases before, is very probable that sometime was necessary try to discover/understand why or which queries are slow. Searching through the web I’ve found a very interesting post talking about this problem. Well, to be honest this approach is available on MySQL documentation. However, I put here a brief Debugging MySQL Queries

Design Patterns – Singleton

Let’s talk a bit about our first Creational Design Pattern, here is Singleton. This pattern is common used when you want only one instance of an object. Some frameworks such as Laravel have in your Service Container the possibility to register classes/objects as a singleton. It means that will have only one instance for these Design Patterns – Singleton

Design Patterns – Strategy

This Behavioral Design Pattern is really useful and solves one of most common problems in OOP that is “do things decoupled”, is related to the O of Solid Principles – Open to extension but closed for modification. If you programming to an interface doing composition instead of inheritance, you’re probably already using it frequently. This Design Patterns – Strategy

Design Patterns – Configuring the project

Let’s get started Firstly I will create our skeleton to go through patterns. The project will be available at https://github.com/diegosm/designpatterns Ok, after cloning this repository on my machine, lets create some folders and files, the structure should be like the image below: Then we will create our files: composer.json phpcs.xml phpunit.xml .gitignore Now is time Design Patterns – Configuring the project

Design Patterns – What, when, why?

Here is a brief introduction to Design Patterns. Well, design patterns aren’t something new, but is something that won’t be unused and will be still important for a long time. Here I will try to explain what they are when you should use or not and why. What are design patterns? Design Patterns are elegant Design Patterns – What, when, why?

Git Workflow – Mostly used commands list

Hello dears, Here is a list of common Git commands that I use. If you are wanting to learn Git I recommend this tutorial from Atlassian https://www.atlassian.com/git/tutorials/learn-git-with-bitbucket-cloud Starting with Git Mostly basic command, start of everything 🙂 You can also add a remote repository Or you can just start by cloning other repository Git Daily Git Workflow – Mostly used commands list