Using the CakePHP as example to learn design patterns