tag:blogger.com,1999:blog-5685561046226514617.post7368412815575598633..comments2023-12-20T04:11:51.446-08:00Comments on Exploration Through Example: Design patterns in Java - DecoratorJan Križanhttp://www.blogger.com/profile/09923737115400827604noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-5685561046226514617.post-14754869522637962722013-08-06T06:02:18.994-07:002013-08-06T06:02:18.994-07:00Delegation design pattern is used by multiple clas...Delegation design pattern is used by multiple classes to work collaboratively. Java emphasizes on principal of single responsibility i.e. One class should maintain code only for one specific business responsibility For example An Customer class should be responsible only for managing customer data If it starts managing the customer Orders as well It violates the principal of single responsibility. - See more at: http://www.blog.newventurewebsites.com/delegate-design-pattern-in-php/#comment-437<br /><br />http://efectivejava.blogspot.in/2013/08/delegation-design-pattern.htmlAnonymoushttps://www.blogger.com/profile/05074991582457050502noreply@blogger.comtag:blogger.com,1999:blog-5685561046226514617.post-88731072478825826552011-11-19T00:15:05.290-08:002011-11-19T00:15:05.290-08:00Great post man, you have indeed covered topic quit...Great post man, you have indeed covered topic quite well. What is most important point with decorator is that it affect only individual object and not all object which itself a big control and flexibility inheritance doesn't offer. See here for <a href="http://javarevisited.blogspot.com/2011/11/decorator-design-pattern-java-example.html" rel="nofollow">another example of decorator pattern in Java</a>.javin paulhttps://www.blogger.com/profile/15028902221295732276noreply@blogger.com