Written by Mottola Michele - Italy - Reggio Emilia
|
Sunday, 23 November 2014 18:47 |
what is the problem
The design pattern decorator is used in this case: i have some object and i want to add responsability.
what is the solution of decorator
To solve this problem i can use inheritance, but as we know the inheritance has some drawback and is to prefer composition over inheritance.
Alternative solution is the decorator design pattern that use composition.
Practically the decorator is a wrapper for the object whereto i want add responsability.
The advantage of this pattern is that we can add responsability at run-time, we can easily combine them and we can add responsability at some object or all.
To do that we don't have violate some bacis software design principles as SRP and OCP.
|
Last Updated on Sunday, 23 November 2014 19:03 |
Written by Mottola Michele - Italy - Reggio Emilia
|
Friday, 16 May 2014 15:35 |
In this article i want show how persist a many to many relationship, whith hibernate and jpa annotation.
|
Last Updated on Monday, 22 December 2014 10:37 |
Written by Mottola Michele - Italy - Reggio Emilia
|
Monday, 28 April 2014 10:04 |
Lazy load is an implementation of design pattern proxy. Here it is used to reduce memory consumation when we load collection of object.
For example when we have two relational class Impiegato and Dipartimento
|
Last Updated on Monday, 22 December 2014 10:38 |
Written by Mottola Michele - Italy - Reggio Emilia
|
Thursday, 11 July 2013 00:00 |
Questo documento ha lo scopo di fornire una visione panoramica del progetto realizzato. Non vuol essere nè un manuale utente, nè un manuale tecnico.
|
Last Updated on Monday, 22 December 2014 10:39 |