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

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