Posts marked with “php”

Sustainable PHP: Refactor to Competitive Advantage

by · October 5, 2020

0
 

Technical debt is always, and continuously, a challenge. Needs change. This month we’re looking at an approach for being continually prepared for change—refactoring, with unit tests in place.

 

The Workshop: PHP Development with Homestead in WSL

by ·

0
 

We’ve spent the past two months talking about Windows Subsystem for Linux (WSL) in Windows 10 and how to customize it to serve as a PHP development environment. While functional, our environment lacked a fair bit of polish. In the nearly four years that I’ve been working on and maintaining Laravel Homestead, I’ve spent much […]

 

Education Station: Race Conditions and Dead Locks

by ·

0
 

Despite PHP shifting more and more toward preferring Object-Oriented Programming, at its heart, PHP is a procedural language. All of the code is executed one line at a time, in the order that the parser receives it. To my mind, one of PHP’s strengths is blending a versatile object model along with procedural programming. Web […]

 

PHP Puzzles: Improved Directions

by ·

0
 

In our last issue, we simulated population growth—a component of many popular games. In this article, we look at pruning redundant items from a list of directions.

 

PHP and Database Access

by · September 11, 2020

0
 

In its early days, the Internet was all about sharing static data like images, flat text files, and downloadable binaries. The early Internet’s static nature was useful in for sharing information. In many ways, the ability to tie static web pages to the dynamic content resident in enterprise databases allowed us to build new kinds of applications. This is where, in many respects, PHP shines.

 

Security Corner: Observable Security

by · September 1, 2020

0
 

Among the easiest ways to ensure your website or web application is behaving security is to subject it to objective, third-party security scans. The Mozilla Observatory is one such tool that helps ensure strong security for any system operating on the public Internet. The Observatory automatically scans your website to make sure you correctly configure […]

 

Sustainable PHP: Build A Composite

by ·

0
 

How might we keep the next PHP project from evolving into the dreaded Big Ball of Mud? This month we’ll explore and build a possible foundational structure, a “composite.” Then, having built out this structure, we’ll realize that we might still be over-engineering things a bit—but this structure remains a necessary step along the way.

 

The Workshop: Mail, Ngrok, and Xdebug in WSL

by ·

0
 

Last month we covered Windows Subsystem for Linux and this month we’re continuing the journey by demonstrating how to further work with our WSL distribution using tools such as Mailhog, Xdebug with PhpStorm and Visual Studio Code, and ngrok.

 

Education Station: Autoloading Your Code

by ·

0
 

Broadly speaking, autoloading is a mechanism for the loading code into your program on demand. If you look at a single request in your application, chances are it needs a different set of classes than another request. Where a “Login” action may use a controller, database class, and an authentication layer, a “Logout” action may […]

 

Serializing PHP Objects

by ·

0
 

PHP has many native ways to serialize objects, but not all of them are created equal. PHP 7.4 introduces what is hopefully the “one final way that will work this time.” Even so, the others aren’t going away any time soon.