Building a PHP Framework: Part 1 - Why? Seriously, Why?
Matt Sparks
Posted on April 22, 2018
There are a tremendous amount of great PHP frameworks. Off the top of my head I can think of several: Laravel, Symfony, Yii, Slim, Cake, etc. Yet, for every Laravel there are probably five lesser-known, high quality frameworks. Go ahead and search Github for “PHP Framework.” As of this writing it lists 20,000 results. Sure, most aren’t fully fledged PHP frameworks, but that’s still a lot of code.
So with all of that being said, it begs the question: why on Earth would you want to do this?
The extremely short answer: I want to.
The less short answer: A PHP framework encompasses many of the areas I want to learn more about.
Why I’m Building a PHP Framework
Look, I’m very aware that there is no need for a new framework. I agree with that. For whatever problem you’re trying to solve you’ll no doubt be able to find a solid solution.
I’m not trying to reinvent the wheel or make a “better” code-base. I’m under no delusions of grandeur – this framework will never see a production environment. If it does, may God have mercy on your soul.
I’m building this to learn. That’s really the long and short of it.
What I Want to Learn
There are a number of areas that I would like to have more knowledge of. Chief among them are:
- Application Architecture
- Design Patterns
Other areas include (but aren’t limited to):
- Routing
- Cache
- Database Abstraction
- IoC
- Code Organization
- Testing
All of those topics fall into the “yeah, I ‘get’ it but do I really understand it” category. That’s what I hope this little experiment solves.
What This Won’t be
It is not my intent to make a production-ready framework. I have no plans of making a robust code-base. This project is a tool to help me (and hopefully others) learn. Anything after that is just gravy.
What’s Next
Before I build a framework, I should probably figure out what exactly a framework constitutes. That doesn’t sound intimidating at all.
Wait! We Need a Name
I can’t keep referring to “the framework” or “code-base.” I’m one post in and it’s already getting old. Let’s call it the Analyze PHP Framework. Seems appropriate to me.
Originally posted on DevelopmentMatt.com
Posted on April 22, 2018
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.