Archive for the ‘Patterns and Practices’ Category

How Laravel Facades Work and How to Use Them Elsewhere

Posted on: No Comments
The Facade pattern is a software design pattern which is often used in object oriented programming. A facade is, in fact, a class wrapping a complex library to provide a simpler and more readable interface to it. The Facade pattern can also be used to ...

Managing Cronjobs with Laravel

Posted on: No Comments
There are times when your application needs to run administrative tasks periodically on the server. Whether you want to send out emails to your users or clean up the database tables at the end of the day, you will need a task scheduling mechanism to ta...

Flyweight Design Pattern and Immutability: A Perfect Match

Posted on: No Comments
The flyweight pattern is a relatively unknown design pattern in PHP. The fundamental principle behind the flyweight pattern is that memory can be saved by remembering objects after they have been created. Then, if the same objects need to be used again...

Can PuliPHP Re-Revolutionize PHP Package Development?

Posted on: No Comments
Puli is a new toolkit built on top of Composer that helps to manage and exchange resources like configuration files, images, CSS files, translation catalogs, and others. These are, you’ll agree, often difficult to maintain and share across projects. ...

Build a Superfast PHP Server in Minutes with Icicle

Posted on: No Comments
Event-based programming is a strange topic for PHP developers. In a language as procedural; events are little more than function calls. Nothing happens between events, and all meaningful code is still blocking. Languages like JavaScript show us what PH...

An Introduction into Event Loops in PHP

Posted on: No Comments
PHP developers are always waiting for something. Sometimes we’re waiting for requests to remote services. Sometimes we’re waiting for databases to return rows from a complex query. Wouldn’t it be great if we could do other things during all that ...

From Request to Response: A Journey into Drupal 8 Internals

Posted on: No Comments
In the first article on Drupal 8 module development we looked a bit at the routing aspect of this process. We’ve seen that creating pages with paths is now a matter of declaring routes that match up with controllers. The latter, as we’ve seen, can ...

BDD in Laravel: Getting Started with Behat and PhpSpec

Posted on: No Comments
Getting Started with BDD in Laravel Introduction BDD is a complicated subject for many developers, and getting started with it the right way often does not come easy - especially when needing to implement it into existing frameworks. This tutorial aims...