Posts For Tag: SOLID
Does Static Factory Violate Open/Closed Principle?
25 Jan 2018
Consider an application that provides some statistics reports. Reports are present in different formats: JSON for API, HTML for viewing in a browser and pdf for printing on the paper. It has StatisticsController that receives a required format from the...
READ MOREOpen/Closed Principle
27 Mar 2017
Software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification. Let’s decrypt this description a bit. Open means that it should be simple to change the behaviour of a particular entity. Closed means chaging behavior...
READ MOREThe Decision Between Inheritance And Composition
08 Jan 2017
There are two fundamental ways to establish relationships between class in object-oriented design: inheritance and composition. First of all, let’s determine that there is no better or worse principle in object-oriented design. But there is an appropriate design for the...
READ MOREPraying to SRP God
30 Oct 2016
According to DDD, we should write our code in that way, that it matches the language of the business. So it can be really readable. For example, an Order. We have orders, and we can pay them. So, the easiest...
READ MOREThree Rules to Respect Liskov Substitution Principle
02 May 2016
Program to an Interface, not implementation Let’s refresh a classic definition: objects in a program should be replaceable with instances of their subtypes without altering the correctness of the program. In the world of PHP it often means programming to...
READ MORERECENT POSTS
- Myths About Asynchronous PHP: It Is Not Truly Asynchronous
- DriftPHP: Quick Start
- ReactPHP Internals: Event Loop Timers
- Interview with Marc Morera: About DriftPHP
- Introducing PHP-Watcher
- Live Reloading PHP Applications With Nodemon
- Building a RESTful API Using ReactPHP: JWT Authentication
- Building a RESTful API Using ReactPHP: Basic Authentication
- Building a RESTful API Using ReactPHP and MySQL
- How To Speed Up The Code Review
- Managing Concurrency: From Promises to Coroutines
- Fast Web Scraping With ReactPHP: Download All Images From a Website
- PHP Roundtable 76: Concurrency, Generators & Coroutines - Oh My!
- Fast Web Scraping With ReactPHP. Part 3: Using Proxy
- Sending Email Asynchronously With ReactPHP Child Processes
- Fast Web Scraping With ReactPHP. Part 2: Throttling Requests
- Using Router With ReactPHP Http Component
- Working With FileSystem In ReactPHP
- Amp Promises: From Generators To Coroutines
- Fast Web Scraping With ReactPHP