Brandon's Blog

4/19/2006

Interesting Little Concept

So, the school thing was a little too much to handle today, so I have this cool little proof of concept to show off.  Check it out.

It’s a circular story-writer.  The key concept is the “ball,” which passes from person to person as posts are made.  The concept I have running here has three users: brandon, eric, and kristin … in that order.

Now, doing the wiki thing was possible, but I was using this as a PHP instructional project, and I didn’t want to learn sessions at the same time.  Plus, sessions are a pain in the butt even if you are competant with them (as I used to be in ASP), so I wanted something more elegant.

Therefore, there is no “User Name: ” field to type in.  Either you have the ball or you don’t.  A future iteration would have an administrator for cleaning, editing, and rearranging.  Requiring the posts to follow each other sequentially removed the need for a time-based variable.

Storage is done using text files on the server.  There is currently a known and benign HTML form insertion bug that would allow a (registered) user to insert output when it isn’t their turn, but they would be required to rewrite my form and execute it from outside the server.  I’m not losing sleep over that.

Passwords are also public if you can guess the file name (please don’t).  :)  The best way to handle that is to actually build a PHP array to hold them instead of just using [what I might take the liberty to call] a “glyph-separated file.”  I used multiple characters as a delimiter so I would not be requred to escape file text.

All in all, I think this is pretty dang interesting.  Hmm?