php[architect] logo

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

Data Discipline

August 2020

Yes, on the Internet, everything is a string. However, that doesn’t mean we can ignore the structure and intended uses of the data that our applications work with. This issue focuses on how to ensure your data works with you and not against you. Review how to store it in a database, impose order to your JSON data with JSON-Schema, query it with SQL, choose an appropriate PHP type for your variables, and more.

Querying NoSQL With SQL: HAVING Your JSON Cake and SELECTing It Too!

By Matthew D. Groves

Interested in NoSQL document databases, but discouraged by a lack of a standard query language? Let’s put the SQL back in NoSQL. In this article, let’s explore how a NoSQL document database models data and how SQL can be used to query data without schemas or tables.

JSON Schema Validation With MySQL

By Dave Stokes

Until recently, there were two schools of thought. Use a traditional relational database with normalized data or a structureless NoSQL database. If you could get avoid designing your database schema and managing table definitions, you could iterate faster and change your application quickly. Schema validation can help you keep an accelerated pace, while still safeguarding critical aspects of your JSON documents.

PHP and Database Access

By Erwin Earley

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.

PHP Puzzles: Writing a Dice Roller

By Sherri Wheeler

In our last issue, we looked at a problem from game development—generating random loot with different rarities. We saw multiple solutions, including a common technique used in many games. Our new puzzle asked us to calculate dice rolls for tabletop games.

Education Station: Effective Data Typing

By Chris Tankersley

In our documentation at work, there are a few places where we list things as strings but look suspiciously like Boolean values. This realization sparked a discussion at work around data types, but not the one most developers tend to have. This discussion was not about strict versus dynamic typing, but more about what kind of data should something be.

Sustainable PHP: The Quest

By Edward Barnard

This month, “The Quest,” takes us on a quest to avoid the Big Ball of Mud. We’ll begin by learning what the Big Ball of Mud is. Our quest will discover that Domain-Driven Design (DDD) can be our solution, but the current state of the art does not quite (to the best of my knowledge) “bridge the gap” between pure DDD and our typical framework-based PHP development. Next month, in “Build a Composite,” we’ll explicitly bridge that gap with PHP code using a standard PHP framework.

Security Corner: Usable Security

By Eric Mann

An oft-overlooked aspect of any security practice or policy is its usability. Do the checks and controls added for the sake of security make the system harder for end-users to do their jobs? An unusable system will never be fully implemented and will fail to secure even the simplest of platforms.

The Workshop: PHP Development With Windows Subsystem for Linux

By Joe Ferguson

Does a recent announcement by Microsoft have you wondering how you’ll continue to use Windows for PHP development? Anyone with a compiler and the PHP source code should be able to build a PHP executable for Windows. If the thought of compiling your PHP binary on Windows seems daunting, have no fear! We’re going to install native Ubuntu PHP packages on Windows!

Community Corner: PHP 8 Release Managers: Interview with Sara Golemon and Gabriel Caruso, Part Two

By Eric Van Johnson

In part two, I continue chatting with the PHP 8 Release Managers about PHP Internals, preparing a new release, the evolution of the language, and where it might go in the future.

Interviewing Remotely

By Eli White

Given that (in the USA) COVID-19 appears to be here to stay for quite a while, I know several people who are searching for jobs during this time. It does make the interview process rough, or at least non-traditional. You can’t sit in an office surrounded by people grilling you. If the position is distant from you (perhaps remote itself), you can’t fly in to have a full day of going through the office talking to various people, and then taken out for drinks and dinner to show how the company likes to have fun.

Leave a comment

Use the form below to leave a comment: