Refactoring Everything, Day 9

by chromatic

This 30-day project explores the refactoring of a legacy system. The Everything Engine is an aging software project that powers Perl Monks, Everything 2, and a few other websites. It suffers from poor design and maintainiability. Learn what it's like to look over the shoulder of an experienced developer as he refactors, redesigns, and updates the code.

Today's task is still more work porting the node tests to Test::Class. When will it all end?


2006-04-22 03:23:08
I agree that web developers should take as much advantage of DB features as possible, but does mysql support triggers these days?

I know postgres does, but IIRC you could nuke a node without them by using foreign keys and cascading deletes. This would cut down on the number of lines of Perl and SQL a lot.

Taking advantage of DB specific features though, might involve rewriting quite a bit of the Everything database layer.

2006-04-26 14:59:18
MySQL does support triggers and stored procedures and views. A couple of times a year, Brian Aker and I talk about taking advantage of something more than MySQL 3.23. With more tests in place, I'll be able to move all of the database access back into Everything::NodeBase and then make database-specific helper classes.

That's definitely going to help.