This one has haunted me for so long. When doing MVC programming what do you think is the better programming practice? Should one use fully populated models or the partially filled ones, especially when I know that for this particular task I am going to need only 2 fields from the model object which has 5 others?
Sometimes it just seems criminal to fill a list of 20 model objects with all values from database when you know that you are going to need only a few of them.
Of course partial model means that you will have to write one more method in your DAO apart from the one which fetches everything. Which mean more code to maintain?
On the other hand pulling everything from DB with fully populated models means one method serves all but this is obviously going to give you some performance overhead.
I can see ORM (such as Hibernate or ActiveRecord of Rails) favoring trends in MVC programming and databases like Google’s BigTable full models is accepted trend. But what if you are still using good old JDBC?
Hardware is cheap, development is costly. Is that really true even when the app needs to scale to few hundred thousand requests per hour?