My first Slim Framework app

Tonight I decided to check out the Slim Framework. I heard about it at Tek13, and had been wanting to see what it was like.

The first thing I had to do was understand Composer. I started reading on the Composer website, and quickly had it installed in a test folder. The instructions were pretty simple and easy to follow. The only thing I found mildly confusing is that they say they support Windows, OSX, and Linux, but then only give instructions for Linux and Windows. It was pretty intuitive to figure out that I needed to use the Linux instructions for OSX, but it doesn’t actually say that anywhere, so it took me a moment to decide to just try it.

Once I understood how Composer was installed, and what it does, I went back to the Slim instructions and copied the “Hello World” code:

require 'vendor/autoload.php';

$app = new \Slim\Slim();

$app->get('/hello/:name', function ($name) {
    echo "Hello, $name";


Here, once again, the instructions fall short for the beginner. I went to the site in my browser at and got a 404 page.

Slim Framework 404 Screen Capture

Ok, now what?

I started commenting out lines of code to see where the error started, and it seemed that the first 2 lines were the only ones not causing an error.

I decided do some searching on Google, and found enough information to figure out that the URL was not correct. Because the route on line 6 says “/hello/:name”, it is looking specifically for  (or any other name of course)

Once I tried that path, it worked! The lightbulb lit, and I “got it”.

My first Slim application! Albeit simple, but it worked!

My Experience at Tek13

I attended the php[tek] 2013 (tek13) conference for the first time this year. After coding ColdFusion for the last 12 years, I am now diving into PHP. I have not been involved in the ColdFusion community, so when the decision was made to switch to PHP, I decided that I would make community a major part of that conversion.

Tek13 was a great experience for me. I met a lot of great people, and learned a lot of tools and techniques centered around the PHP universe. I was told that I chose the right conference for meeting the community. Apparently, the php[tek] conferences are more centered on community than some other major conferences.

There are a bunch of great people in the PHP community who are willing to offer their time teaching, both by speaking at conferences and by helping out on IRC and other channels.

The content taught was in many cases more advanced than I’m ready for at this point, but more than one person encouraged me to sit in on some of the advanced topics anyway. The idea was that someday when I need that info, I’ll recall some of the information.

I think the most valuable thing I got from the conference was all of the great people I met. So many people were willing to welcome me into the community. It was also great hearing the speakers present. Each one brought something unique to the conference, and their willingness to share was very valuable.

The sponsors that made the conference possible were really friendly. I may have even found a company or two that we can use at my workplace.
As a result of going to the conference:

  • I now have a blog at where I am keeping notes of what I learn.
  • I will be attending my local PHP user group regularly.
  • I will be getting active with a local WordPress user group.
  • I am now active on IRC again (first time since the 90s!).

I really hope to be able to attend this conference each year, so that I can continue to build friendships in the community and learn new things. Eventually, I hope to be a speaker there.