Building a PHP Framework: Part 8 – Routing

Part 7 got us up to speed on the container that will be used in the Analyze PHP Framework. In this post we’ll cover how routing works in general and specifically within PHP. How Routing Works Routing is the process of parsing a URI and determining the appropriate action to take. For example, consider the […]

Continue Reading

I Want Scalar Objects in PHP

Recently, I read an interesting article from Andrew Carter entitled Make PHP Great Again [cheap plug: this link was included in my most recent Newsletter]. In it Andrew brought up the topic of scalar objects. If you’re not familiar with scalar objects, they represent a single value (integer, boolean, string, etc.) that you can perform […]

Continue Reading

Building a PHP Framework: Part 7 – The Container

Part 6 began our discussion of PHP containers. Today, I’ll be going into greater detail of the subject and, along with that, I’ll run down the work done so far on the Analyze container. A huge debt of gratitude goes how to the folks behind the PHP League Container and others. I’ve learned a ton […]

Continue Reading

PHP Reflection

Beginning work on the Analyze PHP framework, specifically the container, brought reflection to my awareness. Before that I had maybe heard the term, but I definitely hadn’t used it intentionally. Although it sounds like a scary computer science concept, it’s not. It’s actually quite simple: Reflection is the ability of a computer program to examine, […]

Continue Reading

How to Use PHP Traits

PHP Traits are a great tool for code reuse. They allow developers to write methods that can be used in any number of classes, keeping your code DRY and more maintainable. Define a PHP Trait Traits are defined much in the same way as classes.

You’ll notice that we’re declaring a trait  rather than […]

Continue Reading

Building a PHP Framework: Part 5 – Test Driven Development

In part 4 we laid the foundation for Analyze. Now it’s time to write the very first lines of code! Before we continue, please allow me to interrupt with a quick announcement: I’ve started a newsletter! Each week I’ll send you a great email filled with updates, great links, tips & tricks, and other non-dev […]

Continue Reading

Stoicism & Coding

For the past several months I’ve been studying a philosophy known as Stoicism. I became interested in the subject after reading Meditations by Marcus Aurelius. I took a handful of philosophy courses in college and I’ve always enjoyed the subject, but Stoicism is different. I’m by-no-means an expert – I’m not an expert at anything – […]

Continue Reading

Building a PHP Framework: Part 4 – The Foundation

Part 3 was all about action – without actually taking any or writing any code. This installment will actually see the groundwork for the Analyze framework taking shape. Framework Structure Most frameworks I have experience with or have researched take approach of having a main “core” framework along with an example app. Some examples include […]

Continue Reading