Bricks coming together to form a pyramid

Building this Blog

20 August 2020

Hey! This post is a little out of date! I had fun writing this PHP framework, but I've since moved to a static site archicture.

This blog is built using Edoras - a barebones MVC framework I built with laravel as my inspiration.

Here's a link to the source code.

I have been trying to learn laravel recently, looking at books, documentation and laracasts. These were all great resources. I'd especially recommend Code Smart by Dayle Rees. They showed me the benefits of laravel and how it creates something elegant out of the famously ugly language PHP.

I thought a fun way to learn laravel would be to try build my own implementation (with a LOT fewer features). It sounded like an interesting challenge. I want to be able to have a strong grounding before getting myself into trouble with laravel magic. I also didn't want to upload anything too big when building this site.

I started by taking a look at this great Medium article by John O. Paul which helped me build a simple router. Then I added the ability to make routes with parameters, view routes, and routes pointing to controller methods. I also created a tiny ORM as a way of interacting with the database using prepared PDO statements. Finally I built some simple authentication functionality.

Edoras doesn't have the fancy Eloquent ORM of laravel or the Artisan command-line tool, but it does give you a quick way to structure a PHP MVC application. It's small enough that it'd be easy for someone to hack into a shape they needed.

Back to blog