1,014 reputation
617
bio website dalorzo.com
location Costa Rica
age 37
visits member for 3 years, 11 months
seen Mar 20 at 13:24

Software Developer and Photography Enthusiast


Mar
23
awarded  Popular Question
Mar
20
awarded  Curious
Mar
10
comment Why is there only code review?
See Best Kept Secrets of Peer Code Review. Chapter 3 is named: Five Types of Code Review.
Jan
26
answered Is it possible to make some methods invisible/non-usable to some classes in Java?
Jan
24
comment Why is using break considered bad practice?
This also seem related to the practice of having a single exit point in methods.
Jan
8
answered Why do browsers clamp timeouts and intervals?
Jan
8
answered Programmatically extending Hibernate table/entity definitions in Spring, how?
Jan
8
answered Online code editors programming language
Dec
31
answered Declaring lambdas in Java8
Dec
25
answered Design solution for communicating between multiple layers
Dec
24
revised Overriding methods by passing as argument the subclass object where the supertype is expected
added 4 characters in body
Dec
24
revised Overriding methods by passing as argument the subclass object where the supertype is expected
added 4 characters in body
Dec
24
revised Overriding methods by passing as argument the subclass object where the supertype is expected
added 100 characters in body
Dec
24
answered Overriding methods by passing as argument the subclass object where the supertype is expected
Dec
24
answered Pattern for caching DAOs: strategy or decorator?
Dec
24
comment Pattern for caching DAOs: strategy or decorator?
@antonienko So does the proxy. The proxy is an implementation of the interface that forwards requests to the proxied object. Now that we talk about it I think in essence it looks like a decorator, in intent it is slightly different as per my comment above about forwarding the request.
Dec
24
comment Pattern for caching DAOs: strategy or decorator?
@antonienko Some patterns are very similar, but with a different intent. That's the case of a proxy and a decorator yes. So, for me, your decorator working in that manner would be categorized as a proxy, at least in my opinion and understanding of the subject.
Dec
24
comment Pattern for caching DAOs: strategy or decorator?
@Hey I think memoization is an alternative that uses a more functional approach. In this case functions are memoized by wrapping them into another function that is smart enough to use a cache when necessary. The proxy sounds more like OO approach. I guess depending on the implementing language one or the other could be more easily achieved.
Dec
24
comment Pattern for caching DAOs: strategy or decorator?
Well, I am certainly not a world class expert on the subject, but I think the conceptual difference here is that the decorator is supposed to forward requests to its decorated component object. It may optionally perform additional operations, before and/or after forwarding the request, but the forward always happens. With a proxy the story is different, and in the case of a cache you may decide never to forward the request to the proxied object if the cache is still fresh and alive.
Dec
24
comment Pattern for caching DAOs: strategy or decorator?
Actually I have seen this most commonly implemented as a proxy pattern.