php[architect] logo

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

php[architect] — December 2016

Once you dive into testing and start seeing the benefits of having an automated test suite, it’s tempting to go all in and start writing tests as fast as possible. Before you know it, you could end up with a test suite that takes forever to run or requires many updates as features are added or changed. Before you get to that point, take a step back to ensure that you’re getting the most out of your efforts.

Behat: Beyond Browser Automation

Read this article for FREE

Behat is a tool written in PHP to support teams in practicing Behavior-driven Development. In its simplest form, it is a test automation tool which focuses on comprehensibility more than it does on validity. Behat provides you with a simple developer-agnostic language—Gherkin, and then gives you automation capabilities on top of it. Gherkin’s semantic flexibility is both its biggest asset and its biggest flaw. by Konstantin Kudryashov

Strangler Pattern, Part Three: the Rhythm of Test-Driven Development

Test-driven Development (TDD) would seem to be all about the tests. But if you focus on writing the tests, you miss most of the value. In my experience, TDD can take two to three times longer in initial development time. The most-often-stated value comes from the dramatically-reduced debugging time needed with production deployment. However, TDD’s greatest value comes in the future. Software must remain agile, open to change. The Rhythm of TDD, often called “red-green-refactor,” provides that value. Let’s introduce Test-driven Development with a focus on building future value. by Edward Barnard

Abstracting HTTP Clients in PHP

Many PHP applications are designed as server applications which receive a request and return a response to the client. However, PHP is also used to write API clients. This can be CLI tools written in PHP or server applications which need to talk to another system over HTTP. In this article, we’ll look at a library to abstract out the HTTP client used in your code to keep it flexible and future-proof. by David Buchmann

Decoupled Blocks with Drupal 8 and JavaScript Frameworks

The ongoing JavaScript renaissance is changing the web, and it is affecting the PHP development ecosystem in big ways. The days of sprucing up your UX with a few lines of jQuery are largely behind us, and the gaining popularity of fully decoupled architectures may mean PHP teams are only getting half of the build projects. Of course, that’s just part of the story, and the reality is PHP isn’t going anywhere anytime soon. A talented PHP developer looking to build the best possible experience for their users will inevitably end up looking at ways to integrate these two technologies sooner or later. by Matt Davis

Education Station: Let’s Build a Chatbot in PHP

I’m going to celebrate the time Christmas should be; a time of relaxing, when we all have some extra time on our hands. And what, as developers, do we do when we have some time on our hands? We write code. I’m going to step you through a fun project I built a little while ago. A chatbot. That’s right, a chatbot. What could be more fun than something you can, sort of, talk to; something you can ask a question of and receive an answer? by Matthew Setter

Leveling Up: Building Better Bug Reports

One of my favorite quotes about programming comes from Edsger W. Dijkstra. It says, “If debugging is the process of removing bugs, then programming must be the process of putting them in.” It indicates the maxim that as long as there is code, there will be bugs. Of course, we want to minimize the number of bugs in our code. Understanding what the desired behavior of our software is, and how that differs from the actual behavior is the key to understanding what the bug is and how to fix it. by David Stockton

Community Corner: Focus on What We Have in Common

For my U.S. friends, I did not vote the way you did. That statement is true for half of you. If that statement makes you angry, please read this. If you are nodding in agreement with me because you think you know me, please read this. by Cal Evans

Security Corner: Keeping A Secret

With any sufficiently advanced application comes a common piece of functionality—the need for sensitive credential handling. Sometimes, this comes in the form of user-related information (like a user’s password), and other times, it’s more related to sensitive values required by the code itself (like database connection information). Regardless of where this sensitive information comes from, the same absolute rule should be followed: protect it at all costs. by Chris Cornutt

The Year of ???

Once again, as the weather cools in the Northern Hemisphere, we become reflective of the year that has transpired. When looking back at 2016 for the PHP community, however, what do we find? by Eli White

Leave a comment

Use the form below to leave a comment: