PHP Tip of the Week: Code as Config

This week’s tip is going out to both Nomad PHP and Nomad Mage because the person who wrote the blog post is an active member of both communities.

Stephan Hochdörfer recently penned short blog post introducing an interesting concept that he and bitExpert are espousing. Forget XML (or YAML, or JSON, or any other markup language) store your config files in PHP code. This is an interesting concept to me. I’ve done this in the past but I’ve also used YAML and JSON. (I refuse to use XML for anything)

If you are curious, check out his blog post “Why using code as DI config is a win!”. It doesn’t matter if you like the idea or not. All that matters is that you understand the idea before you decide. 🙂

Don’t miss out on any PHP tips!

Did you know that we post tips like this every single week to our newsletter? Each Tuesday we send you a short post about something that we know you will find informative and useful. Fill out the form below and join the World Wide Herd today. Don’t be the only one who doesn’t know.

 


 

Deploying PHP Applications with Fabric

Oliver Davies

Speaker: Oliver Davies @opdavies

You’ve built your application, and now you just need to deploy it. There are various ways that this could be done – from (S)FTP, to SCP and rsync, to running commands like “git pull” and “composer install” directly on the server (not recommended).

My favourite deployment tool of late is Fabric – a Python based command line tool for running commands locally as well as on remote servers. It’s language and framework agnostic, and unopinionated so you define the steps and workflow that you need – from a basic few-step deployment to a full Capistrano style zero-downtime deployment.

This talk will cover some introduction to Fabric and how to write your own fabfiles, and then look at some examples of different use case deployments for your PHP project.

Atlas: A Data Mapper For Your Persistence Model

Paul Jones

Speaker: Paul M. Jones @pmjones

Atlas lets you build an OO model of your SQL tables and relationships. You can use it at the start of your project for basic CRUD operations. As you begin to need simple behaviors in your application, you can add them to the Record and RecordSet persistence model objects. Finally, when the time comes to transition to a rich domain model, you can map the Atlas persistence model objects to your domain Entities and Aggregates.

What I Learned About Testing While Walking Uphill Both Ways In The Snow

July US

Presented by Chris Hartjes (@grmpyprogrammer)

Date: July 20, 2017
Time: 20:00 CDT

18:00 PDT, 3:00 CEST (July 21), 2:00 BST (July 21)
Not sure of the time in your area? Check it on timeanddate.com

This meeting is over, but you can still purchase the video.

Purchase Video

Back when I was learning about how to test PHP code, I had to walk both ways uphill in the snow to get the information I needed. Over the past 14 years (has it really been that long?!?) I’ve learned a lot about not just testing but about code and people. In this talk I want to share what I wished I knew all those years ago so you don’t have to suffer like I did.

Chris Hartjes

Chris Hartjes

Chris Hartjes, aka The Grumpy Programmer has been building web applications of all shapes and sizes since 1998, with a focus on best practices and how to use testing as an effective development tool.

Monday to Thursday he works as a Staff Test Engineer for Mozilla’s Firefox Test Engineering team and on Friday’s he’s working on building his Grumpy Learning info-product empire. He also was one of the organizers of the now extinct TrueNorthPHP conference. Chris is co-host of the popular /dev/hell podcast.

Atlas ORM: Doing the Heavy Lifting For Your Persistence Layer

July 2017

Presented by Paul M. Jones (@pmjones)

Date: July 20, 2017
Time: 20:00 CEST

19:00 BST, 13:00 CDT, 11:00 PDT
Not sure of the time in your area? Check it on timeanddate.com

This meeting is over, but you can still purchase the video.

Purchase Video

Atlas lets you build an OO model of your SQL tables and relationships. You can use it at the start of your project for basic CRUD operations. As you begin to need simple behaviors in your application, you can add them to the Record and RecordSet persistence model objects. Finally, when the time comes to transition to a rich domain model, you can map the Atlas persistence model objects to your domain Entities and Aggregates.

Paul M. Jones

Paul Jones

Paul is an internationally recognized PHP expert who has worked as everything from junior developer to VP of Engineering in all kinds of organizations (corporate, military, non-profit, educational, medical, and others). Paul’s latest open-source project is the Aura project for PHP. Among his other accomplishments, Paul is the lead developer of the Solar Framework, and the creator of the Savant template system. He has authored a series of authoritative benchmarks on dynamic framework performance, and was a founding contributor to the Zend Framework (the DB, DB_Table, and View components). He was also a member of the Zend PHP 5.3 Certification education advisory board. In a previous career, Paul was an intelligence operations specialist for the US Air Force, and enjoys putting .308 holes in targets at 400 yards.