126 reputation
2
bio website about.me/nickl
location South Africa
age 39
visits member for 1 year, 11 months
seen Feb 22 '13 at 5:55

opensource software developer, propeller head and source code connoisseur


Jan
16
awarded  Teacher
Jan
15
comment What will be the better way to access information from another object
The mediator, is perfect for loosely coupling interactions between disparate data sources and this is where we need to make the distinction. As a behavioural pattern I would implore a mediator for reaching conglomerate conclusions. The requirement however is simply to expose the information. There is only one image per image_id at one location, hardly something that requires mediation, would you think?
Jan
15
comment What will be the better way to access information from another object
The reason I consciously chose to avoid a decorator is to loosely couple any dependency to this foreign system which we do not have control over. We are effectively creating our own Page interface independent of the data source of its parts. Since no special need has been identified as yet, we simply mirror the delegate. Any changes in their structure can be made transparent by the delegator alone. The decorator would itself suffer this consequence as well as every part of the system still exposed to its parent.
Jan
15
comment What will be the better way to access information from another object
Yes of course the delegator knows more about the delegates in its possession and employs exactly what it requires to accomplish its task. Exposing a new interface while still encapsulating the data of a Page while hiding the underlying complexities. No limit is imposed on the number, depth, interfaces used by a delegator, none that I am aware of. What you fail to bring into account is the simple restriction I also can't change the class structure without which the corrections could be made in those interfaces instead. @jgauffin I would like to see your solution without infringing on LoD-F.
Jan
14
comment What will be the better way to access information from another object
disclaimer: I just typed this- out here so I can't be sure if there might be compilation problems. Looks about right, yes? Do shout and see it rectified asap.
Jan
14
answered What will be the better way to access information from another object
Jan
14
awarded  Autobiographer