From: dblack@... Date: 2007-07-23T10:16:09+09:00 Subject: Re: Class Overkill? What's practical? Hi -- On Mon, 23 Jul 2007, Todd Burch wrote: > But, then I have sections of code that "cut" data from the catalog sheet > and "paste" it into the bill of materials sheet, and which class do I > put that method in? In reading that description I picture something like: bom_sheet << catalog_sheet.cut(some_params) The catalog sheet would know how to provide some data from itself, and the bill of materials sheet would know how to insert data into itself. > I'm not making a general purpose library for distribution to John Q. > Rubyist. It's for my use, and I will most likely create another bill of > materials script for another user in the future, and most certainly, > while the concepts might be the same, the specifics will change. For > intance, it might use a MySQL database for the catalog data instead of > an Excel spreadheet. Or, I might use Google Spreadsheets on the next > one instead of Excel. Therefore, I want to structure the thing to be > reusable, but I don't want to go crazy with it. I would recommend keeping it quite specific, and then generalizing it later. I always find, at least, that generalizing becomes sort of a project of its own, so it feels like I'm working on two things at once, if I try to do it all at the same time. David -- * Books: RAILS ROUTING (new! http://www.awprofessional.com/title/0321509242) RUBY FOR RAILS (http://www.manning.com/black) * Ruby/Rails training & consulting: Ruby Power and Light, LLC (http://www.rubypal.com)