EPIC Phails

My friend Robb just IM’d me to tell me he’s released a new PHP framework.

The source code is impressive! Using just three lines of code, you are able to create a website with tagging.

   /**
    * Phails can do anything!
    * Here is an example on how to create tagging for your site.
    */
   require_once('Phails.php');
   $Phails = new Phails;
   $Phails->tags->add(array('web 2.0', 'scalable', 'ORM'));
 

I always appreciate a lightweight framework, that isn’t overwrought.

/**
 * Phails
 *
 * Open Source Framework for PHP on Rails
 */

class Phails {
    /**
     * Constructor for Phails
     */
    public function __construct() {
        $this->_fail();
    }

    public function __get($var) {
        $this->_fail();
        return $this->$var = new Phails;
    }

    public function __set($var, $value) {
        $this->_fail();
    }

    public function __call($method, $args) {
        $this->_fail();
    }

    private function _fail() {
        echo "FAIL n";
    }
}

Hmm, makes me jealous. I should be writing my own framework. I heard all the cool kids are doing it.

11 thoughts on “EPIC Phails

  1. Nate Klaiber

    *Sigh*. Still? It was years ago that I stumbled upon your writings, and now years later it’s all the same stuff. We get it. You don’t like Rails. You don’t like frameworks. You like to re-write code, and re-write it procedurally.

    Years later, what do you expect the result to be? I just feel like you have worn out this joke a long time ago. A one hit wonder that won’t let it go.

    All of that being said, I have enjoyed your writings – I think you are right in some aspects. I respect you. I’m just curious if this stuff will ever end.

    Reply
  2. Nate Klaiber

    RE: kenrick
    For some sad reason, I have noticed that very heavily in the PHP community. Like the 20 year old freshman in high school still wanting people to laugh at the jokes he told ten years ago. “Hey everyone, look at me!”. In his mind they don’t get old.

    I guess you’re right.

    Reply
  3. tychay Post author

    @Nate Klaiber: I missed the part where I was holding a gun to your head, forcing you to read this blog. ;-)

    As many people have pointed out to you over the years, I have the same attitude to all frameworks, not just Ruby on Rails. If you don’t get the self-effacing humor of the Phails codebase, I’m not surprised—I see the same reaction from a zealot no matter what religion gets attacked.

    (The ranting will end when I feel that the prefab approach to frameworks is relegated to those areas frameworks work best in and isn’t advocated as a one-size-fits-all solution to spaces it clearly has no place in being.)

    Reply
  4. Pingback: The Woodwork » Blog Archive » Web development as torture

  5. Pingback: Learning Programming, part 2 | The Woodwork

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>