php[architect] logo

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

Find the Way With Elasticsearch

July 2019

How are you going to find that? You don’t want to implement a search engine on your own as your content grows or integrate with real-world places and addresses. Instead, leverage the rich feature set of an established solution like ElasticSearch. This month we look at how to integrate it with your PHP application and use it to provide location-based search results.

Elasticsearch—There and Back Again

By Steve Bennett

As developers, we tend to praise the technologies with which we are most familiar. The more in-depth experience we have with a given technology, the stronger the urge to bend that technology’s capabilities to our will. As a seasoned MySQL developer, I recently found myself in this position. Unable to stretch MySQL to the extent needed, I was forced out of my comfort zone into the waiting arms of Elasticsearch.

Add Location Based Searching to Your PHP App With Elasticsearch

By Derek Binkley

Searching based on a user’s location is a feature of many websites and applications. This type of search adds relevancy and value to a website, especially when these results include the distance from a point or within a polygon, and are combined with fast text searches. In this article, we’ll take an in-depth look at how Elasticsearch supports searching based upon latitude and longitude. We’ll look at the different types of location searches and how to integrate these searches into a PHP-based backend API.

Defensive Coding Crash Course

By Mark Niebergall

Ensuring software reliability, resiliency, and recoverability is best achieved by practicing effective defensive coding. Take a crash course in defensive coding with PHP as we cover attack surfaces, input validation, canonicalization, secure type checking, external library vetting, cryptographic agility, exception management, automatic code analysis, peer code reviews, and automated testing. Learn some helpful tips and tricks and review best practices to help defend your project

The Devilbox and Docker

By Gunnard Engebreth

Starting a new project has its highs and lows; setting up your dev environment should not be one of them. Back in the day, a dev could spend a couple of days just getting a *nix environment up and running on a machine and even then, it probably did not mirror the production environment in the least! The advent of virtual machines (VMs) helped. Now, we could use something like Vagrant to manage several environments on one machine. With Docker and the Devilbox, we have a fantastic source for spinning up a development environment rapidly while not skimping out on complete customization.

Education Station: Abstraction—The Silent Killer

By Chris Tankersley

Object-oriented programming is full of suggestions on how to do things. One of the core tenets of object-oriented programming is abstracting “things”—or modeling them—into code via some idea of nouns and verbs.

The Workshop: Run Amazon Linux Locally

By Joe Ferguson

This month we focus on running Amazon Linux on your local development machine via Vagrant. While you could spin up resources in EC2 and go to town, maybe you’re not quite ready to jump into the deep end. Perhaps you want to test your application in a controlled environment to see how it performs on Amazon Linux. Possibly you’re new to AWS and don’t want to burn through all of your free credits. These are all great reasons to spend some time creating your local instance for testing your application.

Internal Apparatus: A Walk Through the Generated Code

By Edward Barnard

The PHP compiler/interpreter reads through our PHP code and produces an intermediate form. PHP’s virtual machine then interprets this intermediate form. PHP’s “generated code” feature allows us to walk through this intermediate form, better understanding exactly what PHP does with the software we write. We’ll begin with a three line example, observing the generated-code changes as we transform our example into a function call and then a static method call. We’ll implement a recursive algorithm to see how the code generator handles the situation.

Security Corner: Defending Against Insider Threats

By Eric Mann

When many people think about security, they naturally think about attacks from external threats and entities. They may originate outside of the application, network, or even organization. What we often fail to realize is the most critical threat is often users already inside your system.

Community Corner: Philosophy and Burnout, Part Three—Guiding Principles

By Margaret Staples

In previous articles, we’ve talked about finding peace with the limitations of our knowledge and avoiding logical traps. Here, as the final piece of this series, we’re going to examine the foundation of any personal philosophy, guiding principles, and how we use them to frame our perspective and make decisions.

finally{}: Semver, PHP and WordPress

By Eli White

Recently there was a big announcement that with WordPress 5.2, that they would be updating the minimum required version of PHP to 5.6. That’s a huge deal, but as can be expected, a vocal minority of the PHP community immediately erupted in anger

Leave a comment

Use the form below to leave a comment: