For quite a while now I’ve been doing PHP development and have gone through my own self evolution. I started like any newbie coding PHP inline with my HTML code. This was fine when I did simple sites, one or two pages but as I stared moving along to bigger projects this just didn’t cut it.

Then I found Smartywhich is an excellent template engine. Basically what you do is you write your database work and business logic in one file while a second file is the view which is basically used by plugging in values that are passed in by the first file. This was great and I kept asking my self why I didn’t think of this before. I kept my code much cleaner and separate from the actual presentation of the data. It also made changes to either easier as I didn’t have to worry about breaking things as I had done plenty of times before. But there was still one problem my database code was sloppy and intertwined with my other logic. I tried separating this further once I started reading about MVC programming pattern but never did really work the way I wanted. I tried using Propelto handle all the DB work but I could never really get it to work.

Then it happened I came across Symfony this was exactly was I was looking for. It separates the view and model just like Smarty and provides an easy way to setup the database layer by using config files that do all the Propel work for you. At first it was very intimidating seeing quite a few directories many levels deep but once you start working with it you start to get a feel of how easy things can be done. The hardest part of using Symfony is trying to keep my self from using my old habbits to do thing since Symfony has ways to get things done quick and clean.

Symfony has quite a bit of documentation based on a book but I still think there is quite a bit left out. This is where the community comes in. There is quite a bit of people using Symfony which makes it a great Framework to work with. So in case you are stuck you can always google it and get an answer. As time goes by I’ll try to post some of the lesser know tips and trick I find in hope that they will be useful to other people because as we know the best way of learning is teaching.