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

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

Building a PHP Framework: Part 3 – Time For Action

In part 2 of this series I discussed what web frameworks are and how they worked. This post will explain architectural patterns and which among them will be used for Analyze. Architectural Pattern or Design Pattern? After deciding to use a solution other than MVC I began researching alternatives. During this exploration I noticed something […]

Continue Reading

Building a PHP Framework: Part 1 – Why? Seriously, Why?

There are a lot of great PHP frameworks. Why would I want to build another? The answer is simple: building a framework will provide an opportunity to learn about many different subjects. I’m know there isn’t a need for another framework. This isn’t an attempt to reinvent the wheel. My goal is to learn; a […]

Continue Reading