Graham Nicholls wrote: > I'm writing an application to extract data from a dataease database. > > It will have 2 main objects ; an input file and a schema. How would you > organise the code? Would you have a class for each of these objects, and > a function called, say "extract" which would be passed the objects, or > would you have a class called extract which owned the objects "file" & > "schema", and had the method called "extract". Am I barking up the wrong > tree? (Or simply barking?) I hate writing inelegant code - my thinking > being that if I get the top level structure right, the rest is easy. So, > any comments, please. Do the simplest thing that works. James -- http://www.ruby-doc.org - The Ruby Documentation Site http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys