random title

Class choices

I'm looking at ways to implement a new backend system for the site. I originally planned to write it in Perl, but Ruby on Rails has definitely piqued my interest.

I'm trying to implement a system based on the Model-View-Controller design pattern. I'm trying to represent various things in the system as objects. I want Post objects to inherit from a base class of Record. Record would hold such details as the author and timestamp, attributes common to almost all records in the system. This would hopefully save me from a lot of duplicate code; access control is the same problem whether we're talking about Posts or Images.

Unfortunately, Class::DBI doesn't allow me to handle is a relationships very well. At the best case, I can probably mangle together something with a has a relationship. This isn't nice.

Rails may be able to help. I think I've seen inheritance used the way I need. I'm going to take a further look at Rails and hope to have some good news soon.

Update: I managed to get Rails installed and running on Minds, but something seems to be bust in mod_rewrite for Apache. Even the simplest rewrites don't work, but the module is being loaded and if I screw up a rewrite rule I get a Bad Request error. I spent about three hours trying to figure this one out. I think I'll just screw around with the network here and get a web connection up to my computer so I can use it in Fedora.

Comments

Copyright © 2003-2006 David Barrett. Valid XHTML & CSS.