sample codes for objective c design patterns