Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
mercurial
13y ago
0 comments
Save
Share
With dependency injection frameworks, you don't really need setters anyway. I add getters only as needed, unless it's a public API.
0 comments
2 comments · 1 top-level
top
newest
oldest
edwinnathaniel
13y ago
· 1 in thread
2 things: 3rd-party API that only works on "beans" and thin object (not your Services or DAOs that use DI heavily).
mercurial
OP
13y ago
You can't do much with 3rd-party APIs. For thin objects, a best practice is to keep them immutable by having only getters, but then you generally end up with Builder boilerplate.
j
/
k
navigate · click thread line to collapse