Writing Better Tests: Riding The Command Bus
Before writing any line of test code we should think of how meaningful this test would be. The best code is the code you never write, you know. So if you ever begin to think of which parts of the application you should cover with tests.
Before writing any line of test code we should think of how meaningful this test would be. The best code is the code you never write, you know. So if you ever begin to think of which parts of the application you should cover with tests.
Application logic done right
Typically small http applications does only have to manage HTTP communication on top of a tiny MVC-Framework. A client performs a request, which is handled by a controller. The controller invoke the model and assigens the result data to a view. The controller converts the view into a response and delivers the response back to the client.
Typically small http applications does only have to manage HTTP communication on top of a tiny MVC-Framework. A client performs a request, which is handled by a controller. The controller invoke the model and assigens the result data to a view. The controller converts the view into a response and delivers the response back to the client.
Refactoring.Guru
Refactoring.Guru is a shiny website where you can find tons of information on refactoring, design patterns, SOLID principles and other smart programming topics.
Refactoring.Guru is a shiny website where you can find tons of information on refactoring, design patterns, SOLID principles and other smart programming topics.
How to Master Your API Workflow with Postman
Building good APIs is hard, and anyone who had the chance to do so can relate to this. A project can easily grow to become a mess. One can keep trying to adopt an approach to make it more enjoyable, like trying a documentation-first workflow, but something always feels clumsy.
Building good APIs is hard, and anyone who had the chance to do so can relate to this. A project can easily grow to become a mess. One can keep trying to adopt an approach to make it more enjoyable, like trying a documentation-first workflow, but something always feels clumsy.
How PHP Frameworks Build Better Enterprise Software
Thereβs an unwritten rule for talking about enterprise software. One must always tiptoe around the topic and weigh oneβs words carefully. Otherwise, the status quo is broken, risking the integrity of the whole idea.
Why has this been the reality of corporate software for so long?
Thereβs an unwritten rule for talking about enterprise software. One must always tiptoe around the topic and weigh oneβs words carefully. Otherwise, the status quo is broken, risking the integrity of the whole idea.
Why has this been the reality of corporate software for so long?
Are Bitwise Operators Still Relevant in Modern PHP?
Many of you probably scratched your heads reading this title. βBitwhat?β
In this article, weβll look at what bitwise operators are, and whether or not their use is still relevant in this modern age of computing.
Many of you probably scratched your heads reading this title. βBitwhat?β
In this article, weβll look at what bitwise operators are, and whether or not their use is still relevant in this modern age of computing.
Slim and Action-Domain-Responder
Iβve had a warm place in my heart for Slim for a long time, and especially so since recognizing the Action-Domain-Responder pattern. In this post, Iβll show how to refactor the Slim tutorial application to ADR.
Iβve had a warm place in my heart for Slim for a long time, and especially so since recognizing the Action-Domain-Responder pattern. In this post, Iβll show how to refactor the Slim tutorial application to ADR.
Clean Code concepts adapted for PHP
Software engineering principles, from Robert C. Martin's book Clean Code, adapted for PHP. This is not a style guide. It's a guide to producing readable, reusable, and refactorable software in PHP.
Not every principle herein has to be strictly followed, and even fewer will be universally agreed upon. These are guidelines and nothing more, but they are ones codified over many years of collective experience by the authors of Clean Code.
Software engineering principles, from Robert C. Martin's book Clean Code, adapted for PHP. This is not a style guide. It's a guide to producing readable, reusable, and refactorable software in PHP.
Not every principle herein has to be strictly followed, and even fewer will be universally agreed upon. These are guidelines and nothing more, but they are ones codified over many years of collective experience by the authors of Clean Code.
Finite-State Machine as a Type System illustrated with a store product
In this article, I would like to talk about how to implement a Finite-State Machine (FSM) with the PHP type system. The example is a store product (in an e-commerce solution for instance), something we are likely to meet once in our lifetime. Our goal is to simply avoid impossible states and transitions.
In this article, I would like to talk about how to implement a Finite-State Machine (FSM) with the PHP type system. The example is a store product (in an e-commerce solution for instance), something we are likely to meet once in our lifetime. Our goal is to simply avoid impossible states and transitions.
Clean code php
Software engineering principles, from Robert C. Martin's book Clean Code, adapted for PHP. This is not a style guide. It's a guide to producing readable, reusable, and refactorable software in PHP.
Not every principle herein has to be strictly followed, and even fewer will be universally agreed upon. These are guidelines and nothing more, but they are ones codified over many years of collective experience by the authors of Clean Code.
Software engineering principles, from Robert C. Martin's book Clean Code, adapted for PHP. This is not a style guide. It's a guide to producing readable, reusable, and refactorable software in PHP.
Not every principle herein has to be strictly followed, and even fewer will be universally agreed upon. These are guidelines and nothing more, but they are ones codified over many years of collective experience by the authors of Clean Code.
The Problem with Time & Timezones - Computerphile
A web app that works out how many seconds ago something happened. How hard can coding that be? Tom Scott explains how time twists and turns like a twisty-turny thing. It's not to be trifled with!
A web app that works out how many seconds ago something happened. How hard can coding that be? Tom Scott explains how time twists and turns like a twisty-turny thing. It's not to be trifled with!
Event Sourcing: What it is and why it's awesome
At the last PHPDublin meetup I was asked "What do you do?" and as usual the answer boiled down to "I design and build event sourced applications". Which leads to the following question. "What is Event Sourcing?".
That's where this article came from, it is my best shot at explaining Event Sourcing and all the benefits it brings.
At the last PHPDublin meetup I was asked "What do you do?" and as usual the answer boiled down to "I design and build event sourced applications". Which leads to the following question. "What is Event Sourcing?".
That's where this article came from, it is my best shot at explaining Event Sourcing and all the benefits it brings.
Rapid Enterprise App Development with Zend Expressive
If youβve ever done a Zend Framework quick start, youβve probably never worked in Zend Framework. The quick start has historically been anything but quick, and itβs easy to lose interest and move on to the next thing.
If youβve ever done a Zend Framework quick start, youβve probably never worked in Zend Framework. The quick start has historically been anything but quick, and itβs easy to lose interest and move on to the next thing.
Generating an Autoloader for a Legacy PHP Codebase
If youβve inherited a legacy code base, you may find it does not use an autoloader and has an idiosyncratic directory and file hierarchy for its Classes, Interfaces or Traits. Worse yet, it might not use name spaces consistently or at all. So you canβt use a PSR-4βor even PSR-0βautoloader with your code.
If youβve inherited a legacy code base, you may find it does not use an autoloader and has an idiosyncratic directory and file hierarchy for its Classes, Interfaces or Traits. Worse yet, it might not use name spaces consistently or at all. So you canβt use a PSR-4βor even PSR-0βautoloader with your code.
HTTPlug, Guzzle & API's
Guzzle has become the de-facto HTTP-client library for PHP. But recently a number of open source projects have been switching to HTTPlug which boasts itself as an HTTP-client abstraction. We chat about the problems HTTPlug aims to solve, the plans for its future and the reasons behind why some library maintainers have chosen to adopt it or not.
Guzzle has become the de-facto HTTP-client library for PHP. But recently a number of open source projects have been switching to HTTPlug which boasts itself as an HTTP-client abstraction. We chat about the problems HTTPlug aims to solve, the plans for its future and the reasons behind why some library maintainers have chosen to adopt it or not.
Closures, Anonymous Classes and an alternative approach to Test Mocking
I have heard people say that you shouldnβt test abstract classes or traits, only the concrete classes that implement or use them. I donβt follow that approach: unit testing is all about testing in isolation from anything that might affect those tests.
I have heard people say that you shouldnβt test abstract classes or traits, only the concrete classes that implement or use them. I donβt follow that approach: unit testing is all about testing in isolation from anything that might affect those tests.
Testing With PhpSpec
PhpSpec is a testing tool based on the concept of emergent design using specification. You may have heard of Behavior Driven Development (BDD), and PhpSpec is a tool to use at the spec level or SpecBDD. We also mentioned PhpSpec in our recent roundup of Laravel Testing Resources, which includes ways you can incorporate PhpSpec into your Laravel workflow if you are interested in trying out SpecBDD.
PhpSpec is a testing tool based on the concept of emergent design using specification. You may have heard of Behavior Driven Development (BDD), and PhpSpec is a tool to use at the spec level or SpecBDD. We also mentioned PhpSpec in our recent roundup of Laravel Testing Resources, which includes ways you can incorporate PhpSpec into your Laravel workflow if you are interested in trying out SpecBDD.
Symfony Console Beyond the Basics β Helpers and Other Tools
Itβs undeniable how useful console commands can be when developing software. Not too long ago we re-introduced the Symfony Console component.
Itβs undeniable how useful console commands can be when developing software. Not too long ago we re-introduced the Symfony Console component.