Composition using design patterns