Skip to main content
19 events
when toggle format what by license comment
Dec 11, 2015 at 8:59 comment added dyesdyes That seems to be Java, in C++ that might be a good example of the use of the friend keywork. So the private fields stay private for the other classes but you can still use them from your builders. I don't know if there is a similar concept in java though.
Dec 11, 2015 at 7:54 answer added Basilevs timeline score: 1
Dec 10, 2015 at 8:59 history tweeted twitter.com/StackProgrammer/status/674876060438253568
Dec 9, 2015 at 10:38 vote accept firtydank
Dec 9, 2015 at 7:30 comment added firtydank @Aaron - the monitor application has its own API which uses a different object domain.
Dec 8, 2015 at 20:29 comment added Aaron Kurtzhals What is the difference between the object itself and the "POJO representation"?
Dec 8, 2015 at 19:49 history reopened Doc Brown
gnat
Michael Shaw
S Dec 8, 2015 at 13:37 history suggested Paprik CC BY-SA 3.0
removed getters in the second example code, you can directly access the fields
Dec 8, 2015 at 13:27 review Suggested edits
S Dec 8, 2015 at 13:37
Dec 8, 2015 at 11:39 review Reopen votes
Dec 8, 2015 at 16:40
Dec 8, 2015 at 11:36 comment added Doc Brown @firtydank: I agree, there are some people here who press the "close as dupe" button a little bit too quickly for my taste. I am voting for reopening.
Dec 8, 2015 at 11:13 comment added firtydank I am surprised by the "duplicate" tag. The two questions seem only superficially similar (they both question the Single Responsibility principle, I guess). My question is about representations and information hiding.
Dec 8, 2015 at 0:12 history closed Scant Roger
durron597
gnat
Duplicate of Single-responsibility and custom data types
Dec 7, 2015 at 16:25 review Close votes
Dec 8, 2015 at 0:13
Dec 7, 2015 at 15:37 answer added Doc Brown timeline score: 2
Dec 7, 2015 at 15:21 answer added Matthew timeline score: -1
Dec 7, 2015 at 11:05 answer added Euphoric timeline score: 9
Dec 7, 2015 at 10:22 comment added Andy Sometimes you have classes, which represent the business logic, providing simple public API and hiding implementation details (be it inside the public methods or private ones), sometimes you have classes, which represent the data and are passed around in your application, which provide getters. Getters and Setters are Evil cannot and will not apply to everything. My prefered way is to have the POJO with public properties and pass it to processors which know what to do with the data. Because when I want a XML representation, I don't care about Monitor and vice versa.
Dec 7, 2015 at 9:26 history asked firtydank CC BY-SA 3.0