php[architect] logo

Want to check out an issue? Sign up to receive a special offer.

Trimming One’s Sails

August 2021

This month, we look at how to use Algebras from functional programming in PHP, offload tasks to Laravel Horizon, and techniques for writing code you can quickly adapt to any change.If you’re looking for the right person to add to your team or digging through a pile of documents to find the right match, we have articles that have you covered. This issue covers working with ElasticSearch, mentoring and teaching new developers, Decorators, Rocky Linux, Password entropy and strength, and more.

Using Algebras in PHP

By Lochemem Bruno Michael

Algebras are commonplace in Functional Programming, paradigm incrementally gaining mainstream appeal in PHP. They offer a means of enforcing referential transparency in codebases rife with a plethora of side-effects endemic to real-world programs that typically feature some combination of I/O interactions and error handling.

Boosting User Perceived Performance with Laravel Horizon

By Scott Keck-Warren

Work queues allow us to perform slow or error-prone tasks outside of the current user’s request to improve their experience with our site. Instead of doing everything during a user’s request, we can offload expensive tasks like resizing images, sending emails, and generating PDFs. In this article, you’ll learn how we can use Laravel Horizon to speed up the response time for our applications.

Education Station: Attributing Code

By Chris Tankersley

One of the most requested features in PHP for a very long time was a concept known as Annotations. Annotations allow developers to add additional context and, most importantly, functionality to code without using a procedural approach. Many articles like to say it “adds metadata” to code, but I do not think that tells the whole story.

The Workshop: Testing with Pest Framework

By Joe Ferguson

Pest is a PHP testing framework focused on simplicity and brings a powerful expectations API to PHP. Pest is influenced by Jest, a JavaScript testing framework. Pest was created by Nuno Maduro originally via Sponsorware license and ultimately was published under the MIT open source license. You can think of Pest ha an alternative to other testing frameworks, such as Codeception, which can coexist with your existing PHPUnit tests.

Design Patterns by Moonlight: How I Do Interfaces

By Edward Barnard

How do the building blocks come together to form a whole? Most resources on Design Patterns look at each pattern in isolation, allowing you to focus on the pattern and its uses without being distracted by side issues. What’s missing, I have found, are examples of fitting those patterns into a working system. This month we’ll look at a feature involving the validation of user input. We’ll be using the PHP interface in quite a few different ways as we build out that feature.

PHP Puzzles: Generations of Life

In this installment, we continue looking at Conway’s Game of Life and our exploration of cellular automata. Now that we can calculate how one cell in our grid changes from one generation to the next, we can extend that to see how an arbitrarily sized grid changes from one cell to the next.

Security Corner: Multifactor Authentication

By Eric Mann

A modern security best practice is to both implement and require a form of authentication beyond a simple password. This practice is known as “multifactor” authentication, as users will have a primary factor—their password—and a secondary factor to successfully authenticate to an application. Proper implementation of a multifactor authentication scheme keeps your application and its users safe and secure by making it more difficult for attackers to get past your authentication.

Community Corner: An Interview with Taylor Otwell

By Eric Van Johnson

This month, we talk with the person behind the Laravel Framework, Taylor Otwell, who he is, and where he is taking Laravel moving forward. Laravel recently turned ten years old, and what a remarkable ten years it has been. Laravel has inspired its own industry with business, training, services, blogs, and podcasts built around and for the Laravel Framework.

finally{}: Stepping Through

By Beth Tucker Long

Sometimes you need something tried and true, and sometimes you need to escape the daily grind and try something new.

Leave a comment

Use the form below to leave a comment: