Category Archives: Technology

Model-View-Controller in PHP: View

I’ve been programming in PHP for a few years now, and after being exposed to MVC through Ruby on Rails back in 2007, I came to realize that I liked the idea of keeping the presentation of data separate from the manipulation of data.

So I built a View class.  Download View Class

Usage:

$view = new View('views/main_page.tpl', array(
       'some_var' => 'This will be assigned to $some_var in the view'));
$view->render();

And like that, data presentation is separated from data manipulation.

Piece of cake.

Hey everybody!

I’ve finally hopped onto the blog bandwagon.

So here’s what I’m working on, or have been working on in the past few weeks:

  • I’m writing a paper for INI304 about how awful the Warren Commission report was at making a case against Lee Harvey Oswald after the JFK assassination.  Seriously – if Oswald had gone to court, his defence lawyer would have had a field day destroying all of the inadmissable evidence.  He would have gotten away, scot free.  How convenient he was killed before he could be tried…
  • The University College Drama Program production of Martin Crimp’s “Attempts On Her Life” wrapped up last Saturday, and for 7 hours yesterday, we destroyed/recycled the set.  It was a good show, ran for two weeks, and was selling out right up to the end.  I’m hoping to put up some photos soon.
  • I’m working on a project this year for Prof. Karen Reid called OLM…or Checkmark.  Actually, we don’t really have an official name for the project just yet.  It’s an online marking tool for CS undergrad classes, and it’s written in Ruby on Rails.  Check it out.
  • I’m playing Feste from Shakespeare’s Twelfth Night in my DRM400 Performance class.  If this thing goes public, I’ll post it.
  • I have to memorize JFK’s “We go to the moon” speech for presenting after Reading Week.  That’s for DRM401 Voice.

There’s plenty more where that came from, but that’s the major stuff.

Anyhow, here’s my blog.  I’m on the internet now.  Woop woop.