My first two programming jobs have been working on products that were largely designed and written by procedural programmers. Despite all the schooling on OOP, I am still a little shaky on some of the 'correct' ways of doing things. Here is my question of the day:
My project has a database backend and is set up with several objects, most of which contain 20 or more properties. If I am working on a particular screen (web page in this case), and I need one or maybe two fields from a particular object, is it worth the extra overhead to instantiate the entire object, filling all 20 or so fields, just to grab that one that I need? Or is it better to just write a simple SQL statement and grab the data directly?
Thanks for your input!
