Different implementation of design patterns