Skip to main content
11 events
when toggle format what by license comment
Feb 8, 2013 at 14:48 vote accept Eran Medan
Feb 8, 2013 at 14:43 comment added Eran Medan @Mat good point, but not always. e.g. Baz can be a service and Bar can be a Model loaded from the database, you can argue if this is good design or not (e.g. in Rails/Grails/Roo all CRUD is on the model, whereas in older Java/Spring typical architecture, you have a separate Dao / Service layer, it's a matter of taste). But I don't see how this relates to the question :)
Feb 8, 2013 at 13:17 comment added Sign The relationship between foo, bar, and baz is what defines if this is reasonable. If you see changing the foo on your baz as influencing bar it makes sense. If the relationship is an implementation detail then it doesn't.
Feb 8, 2013 at 13:10 answer added Doc Brown timeline score: 3
Feb 8, 2013 at 13:09 history tweeted twitter.com/#!/StackProgrammer/status/299867482561331200
Feb 8, 2013 at 12:58 answer added buttgumpling timeline score: 2
Feb 8, 2013 at 12:37 comment added Kate Gregory I would cache that expensive Bar and add a getBar that returns the cache if possible. That leaves your setFoo sensible while still optimizing perf (and of course, only do this after measuring that the cost of expensivegetBar is really making a difference)
Feb 8, 2013 at 12:08 answer added user53019 timeline score: 2
Feb 8, 2013 at 6:49 answer added Jon Purdy timeline score: 13
Feb 8, 2013 at 6:42 comment added Mat If setFoo operates on Bars, shouldn't it be one of Bar's methods to begin with?
Feb 8, 2013 at 6:35 history asked Eran Medan CC BY-SA 3.0