One Last Slice

Ken Marks wraps up his series on working with a Raspberry Pi. Ken has done such a fantastic job taking us through his process of using a Raspberry Pi and writing code on that Pi in a real-life scenario at home. In this final installment, Ken establishes a workflow for sending an accelerometer text message using SendMail.

Also, this month, Joe Clermont contributed his article, “*Learning How to Learn.*” In an industry where there is a real need to always learn, Joe shares some techniques to help us with continual learning using technics such as learning by doing and learning by sharing.

In Chris Tankersly’s column Education Station he discusses “*Continuous Code,”* where he discusses continuous code, automated testing, continuous integration, and continuous delivery. PSR Pickup’s Frank Wallen shares an article on “*PSR-3 Logging Interface*” and talks about different log levels and messages. In Eric Mann’s Security Corner, we learn about “*Classifying Ransomware*” and the differences between them.

May brings a new recurring column by Marian Pop focused on the Laravel Framework and Ecosystem. This month he introduces us to “*Pest Control*” and discusses the PEST testing package. Edward Bernard’s DDD Alley gets hands-on with “*Get Organized and Get Started*” and shares his thoughts on some of the steps to getting a project set up with code first and implementing a strategic domain-driven design.

Oscar Merida adds some “*Controlled Randomness*” in this month’s PHP Puzzles. It’s fun for the whole family, provided your entire family are passionate developers. Lastly, in finally{}, Beth Tucker-Long talks about “*Survival of the Fiendish*” and shares her experience of trying to address a simple problem that grows more complex around every turn. That would be an example of a bad problem to have.

Subscribe today at https://www.phparch.com/magazine/subscribe/
Twitter: @phparch
Facebook: https://www.facebook.com/phparch
LinkedIn: https://www.linkedin.com/company/php-architect
Youtube: https://www.youtube.com/phparch

The post One Last Slice appeared first on php[architect].


Testing The Core

This month, John and Eric introduce the new Drupal Dab column by Nicola Pignatelli which will be focused on the Drupal CMS system. They also discuss the How to Hack you Home with a Raspberry Pi series is going.

Chris Tankersley takes us down the path of licenses with some thoughts on choosing one for our project in his article Which License to Choose? He discusses the pros and cons of several open-source licenses and explains the benefits and drawbacks. In Security Corner, Eric Mann discusses Operational Security. He touches on what happens when disaster strikes, learning from mistakes, best practices, and the ongoing quest for security. Next to time, one of the more frustrating areas to code is money, and in this month’s PHP Puzzles Making Some Change, Oscar Merida goes over the challenge of making change. He also shows some solutions to last month’s challenge on the best ways to make change.
We’ve all heard the excuses for not having tests, tests are “confusing”, “difficult”, “takes too long to write”, or are just “complicated.” There’s also a saying, “any tests are better than no test.” In this month, The Workshop, Joe Ferguson goes over one of the easiest ways to get some basic tests in your project with his article Accept Testing with Codeception. I have personally been a huge fan of Edward Barnard’s new DDD Alley column. This month he continues the series with When the New Requirements Arrive, where he talks about what you do when new requirements for a codebase are introduced and how to handle them. He touches on the solid principle, bloated classes, test boundaries, and more. Frank Wallen continues his new column, PSR Pickup, where he moves on to PSR 12 Extended Coding Style Standard and discusses what this PSR is and why you might want to use it in your projects.

The post Testing The Core appeared first on php[architect].


World Backup Day

Scott Keck-Warren has a contribution in honor of this month’s World Backup Date, Backups For Beginners. Follow along for some inspiration in making sure you have a complete backup system. Ken Marks continues his series, How to Hack Your Home with a Raspberry Pi, with an article showing how to actually hook up your accelerometer to your Pi and start storing the data into a database on the Raspberry Pi.

Our columnists also drive home the point of strengthening our weaknesses. In Understanding Supply Chain Security, Eric Mann will have you realizing that even our code has a supply chain and that its security is crucial to our success. Joe Ferguson’s, Queues With Horizon will help us make our application more robust by offloading some processing to give our application the appearance of higher performance. Chris Tankersly brings us into the Education Station with Software History is Licensing. Oscar Merida helps us strengthen our abilities while testing out a fun PHP Puzzle, Finding Prime Factors. Edward Barnard continues in the DDD Alley with Better Late Than Never, where he talks about his own theories around testing. Our newest column by Frank Wallen, PSR Pickup, will start to teach us about the PHP PSR’s starting with PSR 0 and 1. And finally{}, brought to you by Beth Tucker Long is a great piece on burnout titled I Just Can’t.

The post World Backup Day appeared first on php[architect].


Parallelize Your Code

This month’s release touches on some examples that keep PHP and its community strong, relevant, and a fun language to code.

Ken Marks continues his series on using PHP and a Rasberry Pi in a real-world example with Raspberry Pi Part 2 – Installing the LAMP Stack on your Pi. As developers, we live a life where we are constantly learning, and Derek Binkley helps with this by contributing an article called Teaching Through Code Review. We have a bonus third feature article this month in which Gabriel Zerbib introduces us to a documentation concept with his contribution Introduction to Diagram-as-Code.

In Eric Mann’s Security Corner, he talks about how to expand your knowledge with Getting Started with Cybersecurity. Joe Ferguson takes time out of his busy schedule to show us some benefits to using PHP-FPM, such as running multiple versions of PHP in his The Workshop section article Configuring PHP-FPM and Apache. In Community Corner, Eric Van Johnson sits down and gets to know our second rookie release manager in his Interview with PHP 8.1 Release Manager Ben Ramsey. Edward Barnard continues his new DDD Alley series with this month’s installment of When You Know the Pattern. Oscar Merida helps us exercise our learning muscle with this month’s PHP Puzzles, Finding Integer Factors. In this month’s Education Station, Chris Tankersly gives his take on the elusive async development with PHP in his article Async is a Lie. Wrapping up this month’s release is Beth Tucker Long finally{}, Everything Which Way But Loose.

The post Parallelize Your Code appeared first on php[architect].


Domain-Driven Resolutions

As 2021 fades from our memories, we hope that a few of you received fantastic geeky gifts during the holidays. Hopefully, some of those geeky gifts included Raspberry Pis. Over the next few months, we will build a project with one and hopefully inspire you to create something useful for yourself.

This is also a great time to establish some resolutions to aid in your coding career. What do you want to accomplish this year? Continuing education is always a great goal and something that we here at PHP Architect strive to provide. We ourselves are constantly learning how we can improve our process and one of our New Year’s Resolutions is to be more prompt in our monthly delivery. We’re aware this will take another few months, but it is our goal.

Now I want to take a moment to ask you for a favor. Have you ever wanted to be a “published writer”? Maybe you still need a New Years Resolution. We’ll help you keep it 😉 As a magazine for our community, we rely on community members to write articles for us. And better yet, we pay for your content to be published. So take a moment and ask yourself a few questions. “Have I learned anything new recently that helped me?” “Do I want to learn a new skill to share with other people? Sometimes having an article deadline will help you focus and learn that skill. Honestly, this point has helped me write all of my articles and conference talks. If you are interested, please send an email to write@phparch.com with your ideas, and we will help you turn your idea into a publishable article.

This month’s issue gets started with “Introducing FilterIterators” by Mauro Chojrin. This feature article will get you looking at your projects in a whole new way. Our second feature is the first in a series called “How to Hack your Home with a Raspberry Pi” by Kenneth Marks. I’ve always been fascinated by the Raspberry Pi but have always been intimidated by them. Ken is opening my eyes, and now I want to use them everywhere.

Our columnists have been hard at work too. Joe Ferguson’s, The Workshop, is giving younger developers a course on “Apache and PHP – Back to Basics.” Every developer should have more of an understanding of what happens even before their PHP code fires up and starts handling a request. In Education Station, Chris Tankersly is talking about “Background Queues” to improve performance for our applications. Eric Mann brings us “The Terrifying Scale of a Security Bug” in this month’s Security Corner. If you’re out on the hunt for a job, make sure you understand the basics of the “Infamous Fizz Buzz” in this month’s PHP Puzzles by Oscar Merida. Then Eric Van Johnson does a great interview with Patrick Allaert, one of your PHP 8.1 Release Managers.

And finally{}, Beth Tucker-Long talks “Experts or Out-of-touch?” where she shares some of her past with PHP Internals.

As always, thank you for subscribing to PHP Architect. We have big plans for 2022, and we hope you do too.

The post Domain-Driven Resolutions appeared first on php[architect].


The Zen Of Mindful Programming

In this issue, Doug Dobrzynski helps us focus while programming with his article, Mindful Programming. While this article isn’t PHP specific, if you take time to digest what he’s talking about, I think you will find that all of us could benefit from using daily mindful techniques. In his article, Lessons Learned from Building a WebSocket Server, Torsten Dittmann shows us some of the considerations that had to be made when adding a real-time component to their API. And a bonus feature article from Ed Barnard will help us write better database interactions with Designing For MySQL Transaction Failures.

Our columns continue to offer great content as well. In our Security Corner, Eric Mann brings us Vulnerable and Outdated Components, which made me run and check my servers right away. Chris Tankersly talks about Why We Argue About PHP Upgrades and Changes in Education Station. Community Corner brings more information on some of this year’s turbulent transition of PHP Internals with The PHP Foundation. Joe Ferguson goes into The Workshop and shows us a possible way to speed up Laravel applications with Octane & RoadRunner. Ed Barnard also continues his Here Be Dragons column with Solution Space, where he wants to help us have fun in our craft of programming. Oscar Merida brings another excellent PHP Puzzle where we try to find our Break-Even Point. And finally{}, Beth Tucker-Long rounds out this issue with a follow-up to last month’s Roll With It titled Still Rolling.

The post The Zen Of Mindful Programming appeared first on php[architect].


The Art of Data

This month, we dive into Libsodium, discuss gatekeeping, learn more about data access, and why even something that might be considered a “small bug” can cause massive damage.

I’m not sure how many people read these Editorials. It’s even been explained to me that this isn’t an “Editorial.” Ha, the joke’s on them; I’m not an editor, sooooo yeah. I always enjoyed reading what Oscar had to say about the articles in the month’s issues and seeing what little nuggets of knowledge he shared.

I am not sure if I have any actual words of wisdom to share, but that’s never stopped me from talking before, so I don’t see why that would change now. We’ve been talking a lot about change lately, but the reality is, “change” is what our industry is about. Sure there are personal changes. People change jobs, leave projects, organizers of User Groups move away, but our industry also changes. What we consider “good security practices” today can be viewed as a horrible implementation tomorrow. Anyone who has worked on a legacy codebase for enough time knows the feeling of looking at code and thinking, “why was it done like this? This is terrible”, then checking the commit logs and realizing they did the coding and remember, “Oh right, that is how we did this five years ago.”

In this issue, Vinícius Campitelli returns to follow up his article from last month with more cryptography talk. This month he talks specifically about *Cryptography with Libsodium*, what it is, why you should be using it, and how you should be using it. In *Exploring the Active Record Pattern,* Alexandros Gougousis discusses the popular Active Record Pattern and some of the benefits of using this pattern to handle persisting data to the backend database.

In Security Corner this month, Eric Mann takes us on a personal journey with a bug report for a package he was maintaining in his article *No Bug Too Small,* and as you can probably guess from the title, the “small bug” was a big problem. Moving on to Joe Ferguson’s *The Workshop* article *Intro to Craft CMS*, Joe talks about one of the PHP powerhouses in the CMS market, CraftCMS. Built on the Yii framework, Joe takes you from install to asset management and gets your CMS up and running in a matter of a couple of pages. *Education Station’s* Chris Tankersley returns us to our data access discussion with *Handling Data Access* and jumps into different ways to handle data access, including raw access to abstraction layers and back to data access layers. This month, Oscar Merida continues to toy with our minds and emotions in his PHP Puzzles column about *Compounding Interest.* He then challenges us with another economic puzzle to finish out the year. Also, this month, I had the pleasure to speak with Wasseem Khayratte, aka 7PHP, in this month’s *Community Corner*. I learned more about what got him involved with the PHP community and his new role as the voice behind Voices of the elePHPant. In this month’s *Here Be Dragons: Problem Space*, Edward touches on a couple of topics most of us had been through at some point in our careers, Burn Out and Gatekeeping. And in finally{} Beth Tucker Long discusses her *Roll With It* philosophy and the idea of embracing change. Thanks for being a reader and I hope you enjoy this issue.

The post The Art of Data appeared first on php[architect].


Interview with Vinícius Campitelli

Eric Van Johnson and John Congdon interview feature contributor Vinícius Campitelli about his article Cryptography with Libsodium.

According to the just-released 2021 version of OWASP Top 10 (a curated list of the most critical web application security risks out there), “Cryptographic Failures” are the 2nd most important of the many security concerns we should have as web developers. These concerns include a lot of misuses of cryptographic systems, like choosing weak algorithms, poor randomness sources, or usage of deprecated methods. That is why this is also the second article covering the main topics for cryptography: on our last issue, we covered the main theory, which sometimes is the cause of those errors mentioned above, and right now we will see how to use libsodium, a modern library with the most recommended algorithms already built-in and no weak settings available per default. It is a cross-platform tool, available to use on Windows, Mac, and Linux, and has been included in PHP’s core since 7.2. It also has bindings for Java, NodeJS, Python, Go, and several other languages. So we are safe to say it runs pretty much everywhere. The official website is libsodium.org, and you can find the full documentation there instead of the PHP.net manual as it is sometimes not complete. There is also a Quick Reference and a “Using Libsodium in PHP Projects” article.

The post Interview with Vinícius Campitelli appeared first on php[architect].


Decrypting Cryptography

Eric and John talk about their first release and the October 2021 issue, Decrypting Cryptography

Topics Covered

  • Cryptography 101
  • What I Wish Something Told Me About SQL Database Design
  • Education Station: Windows 11 for PHP Development
  • The Workshop: Nitro
  • Design Patterns by Moonlight: The Dragon Wrangling Pattern
  • Sebastian Bergmann and the PHPUnit project part 2
  • Security Corner: Updating the OWASP Top Ten
  • PHP Puzzles: Time Value of Money
  • finally{}: Rubber Ducky, You’re the One!

The post Decrypting Cryptography appeared first on php[architect].


Interview with Tomas Votruba

Eric van Johnson and John Congdon interview Tomas Votruba, who wrote an article on Why Would Anyone Want to Downgrade Their PHP Code? in the September 2021 issue.

Topics Covered

    • Downgrading PHP Code and why this might be a good workflow for you
    • Rector – Instant Upgrades and Automated Refactoring
    • The power of automated refactoring.

The post Interview with Tomas Votruba appeared first on php[architect].