Archive for March 3rd, 2009

The problem…

In Yii you can have all your JS and CSS files together with your PHP. For example, you have some view in /views/user/create.php and you can have your css & js in /views/user/assets/css/ and /views/user/assets/js/. That’s quite convenient when you reuse your views/controllers/components from application to application. But these directories are not accessible from the web, so there is publishing mechanism there. Continue reading ‘Registering group of JS files in Yii’ »

When I was studying patterns, I went through main patterns in the alphabetical order. Adapter pattern was in the beginning and Template Method – in the end. And when I came to the latter and read about it, I was confused. Thee solve the same task, implement the same GRASP principle (Protected Variations) – they are the same, but why are they called differently?
Continue reading ‘Difference between Adapter and Template Method pattern’ »