This post originated from an RSS feed registered with Java Buzz
by Chris Winters.
Original Post: Number of methods vs. number of objects
Feed Title: cwinters.com
Feed URL: http://www.cwinters.com/search/registrar.php?domain=jroller.com®istrar=sedopark
Feed Description: Chris Winters on Java, programming and technology, usually in that order.
I wonder which is generally easier for people to learn and remember. For me, it's easier to learn a system with fewer objects but easier to remember with fewer methods per object. That said, I suppose that really depends on what type of methods they are -- you might have a set of DAOs with the same five methods (fetch, create, update, remove, findByQuery) and a hundred objects with these methods, each representing a domain object. This seems easier to remember, even if learning all the domain objects takes a little while. Or you could create a DAO-per-system-area and use the same five methods but with the object name attached (fetchFoo, createFoo, etc).