rails is ridiculously easy for this kind of application, sorry I'll try to read mor of this and post some pointers, but wiki.rubyonrails.org is amazing.
i've started the work. i've been fixing up me schema a lot, and i've got some of the basic functions of the site up and running locally. in a few days, i'll be ready to check the code into SVN o...
yeah. I haven't looked at ezabel schema in a while, but I remember you doing something like this. But the difference in Rails is, its part of the ActiveRecord framework. good support for this kind of thing.
yeah that's really sexy. it figures out the type by the class name?
part of the problem is that I have different tables for everything
news, journals, threads, faqs, events.. all different tables.
i'm pretty sure i could merge news, journals, and threads. but some of the tables have columns specific to the type. i would have to either decide whether or not i really need the extra attributes, or just merge them all in. or have a child table by type or something.
yeah, that is a slight drawback to STI. it's illustrated here:
http://www.martinfowler.com/eaaCatalog/singleTableInheritance.html
all properties of all classes in the inheritance tree are present in the table as fields.
but its not really a problem, as the unused fields are just left unpopulated.
yeah that works. sti helps with searching too.
So, i wrote a migration to create a topics table to merge news, forum_threads, and journals into one table. I combined all the columns. There's only a few that aren't shared, so that's not bad.
Got it working, seems pretty nice.
The only thing I'm wondering now is... do I need separate controllers for each of the models now? So much of the logic is the same, and I want to keep it DRY. Any ideas on sharing some of the logic?