This video will be available to
subscribers on Tue, Jun 3, 2025.
You must be a subscriber to view this video.
Jun 3, 2025
18m:18s

First Review & Refactor

Classification
Software Engineering | Languages | PHP
Keywords
oop | php

About This Episode:

It’s time to pause and sharpen the tools. In this video, we take a step back to review our progress and clean up our codebase, because maintainability is key to sustainable development. 🛠️

Here’s what we tackle in version v16-framework-refactor:


Emphasize the value of regular review and refactor sessions 🧠
Review our entry point (public/index.php) and extract logic into a new App class 📦
Create Framework/App as a singleton with a start() method to centralize bootstrapping 🚀
Address messy relative paths like '../../' by creating a dedicated Path helper class 🧭
Build Framework/Path as a singleton and introduce helpers like app(), root(), require_app(), and require_root()
Refactor all path-related code to use these clean, expressive helpers 📁
Move globals.php into the Framework directory to keep framework-related code encapsulated
Clean up and clarify all require/import statements 🔄


This refactor sets us up for a cleaner, more organized foundation—making our mini-framework easier to navigate, extend, and love. 💡
Bob Cravens

Bob Cravens

Your Instructor
more »
Owner
TekFoundry
Wisconsin
United States
Short Bio:
Bob Cravens is a seasoned technology leader, software architect, and educator with a passion for empowering others through practical, real-world knowledge. As the founder of TekFoundry, Bob has dedicated his career to designing and delivering innovative software solutions that combine cutting-edge technology with elegant simplicity.

At TekCasts, Bob leverages over two decades of experience in software engineering, application architecture, and team leadership to create engaging, high-impact courses for developers and technology professionals. His instructional style is rooted in practical application, offering insights drawn from his extensive background in industries like medical devices and global technology consulting.

Bob’s expertise spans a variety of technologies and methodologies, including PHP/Laravel, FastAPI, and DevOps, as well as architecture best practices and team dynamics. Whether teaching foundational concepts or advanced strategies, he’s passionate about helping others turn complex challenges into streamlined solutions.

When not crafting elegant code or inspiring the next generation of tech innovators, Bob enjoys exploring the intersection of technology, business strategy, and creative problem-solving.