Introducing: Treb – A simple framework for PHP

I announced this on twitter yesterday, but figured I should blog about it a bit more today.

As of yesterday, I published a new PHP Framework on github: Treb

Yeah, I know, the world really doesn’t need another PHP Framework, there are tons of them out there.  So why did I create this new one?   Well honestly, I didn’t set out to do so.   You see at numerous previous jobs: Digg, TripAdvisor, HiiDef, mojoLive — I’d ended up building or extending custom frameworks for those specific applications.

In all of those cases, a ‘stock’ framework just didn’t end up making sense.  They locked you into specific ways of doing things, which may not have been what you needed to do in order to scale.  While at the same time, while they provided a lot of structure, they didn’t provide certain features that I felt were necessary (such as built-in write through data caching).
So in each case, something custom got built from scratch (or something existing got customized).   After doing this essentially 4 times.  I was tired 🙂   With mojoLive I got the ability to take the framework that I’d written for mojoLive, to scrub it of anything specific to mojoLive, and open source it.  So I did.

The moral of the story?  It’s just that in the future now, when I need to start a new custom framework for another site, I don’t have to start from scratch again.  I can start from Treb now that it’s open sourced.   Granted right now it’s very rough as it was part of a bigger system and was just ripped out.  But it’s a good starting point.

Will anyone else end up using it?  I dunno, and that wasn’t the goal of releasing it.  I will say that of others that have used this, they enjoyed it, in it’s simplicity.  And new coders to mojoLive were committing code against it on the first day.  So that’s gotta say something.
If you’d like to know more, you can read up about it on Treb’s home, and start reading it’s documentation as well.

NOTE: I’ve already been called out for Treb not having tests.  No, it doesn’t, I wouldn’t argue if it began acquiring them, but it doesn’t have tests written for it because it’s a child of a rapid-startup-culture web application.  I plan on writing up another blog post about that soon.

5 thoughts on “Introducing: Treb – A simple framework for PHP

  1. Gaetano Giunta (@gggeek)

    If all frameworks you previously used fell short one way or another, maybe it’s because libraries would have been better suited to the task. Why not write/contrbute to a library then instead of going the YAF way?

    1. Eli

      Well, in the end just because you can consider Treb to really just be an extended library, with a touch of MVC thrown on. So really you could consider/use it that way anyway.

  2. yokohurley

    I think that’s a good thing that you did create a new PHP framework but the thing is that who is going to use this as there are lots of good frameworks available.

    1. Eli

      Dunno, perhaps noone 🙂 But that wasn’t the main point of releasing this. The point was that I’ve previously written this ‘almost exact same’ base starting framework/library at approximately 5 jobs in a row. Because I’d go from one job to another, and go: “DARN, I need something really close to what I used at the last job”. But since it wasn’t open sourced, I had to start from scratch.

      Now, for my own purposes (and other people who I know have enjoyed using this style of framework) … there’s an open source version that you can just grab and start using.

  3. leroyrasmussen

    The Simple PHP Framework is a pragmatic approach to building websites with PHP 5. It’s geared towards web design shops and freelance programmers looking for a common foundation to quickly bring web projects to life.

Comments are closed.