When you become higher level than basic PHP coder, you start to ask yourself: do I need to rewrite these common pieces of code again and again? New webapp and again - I need to implement connection to database, content selection, input validation and use some sort of template system? But its boring! And I’m to lazy to repeat this again and again. :) And here comes helpful tools, like custom written classes, collection of functions reusable in most projects etc.
But sometimes even these are not enough. So what to do? I suggest you to give a chance to a framework. There are a bunch of these: CodeIgniter, CakePHP, Kohana, Symfony, Yii, Zend and much more! I think http://www.phpframeworks.com/ will help you to choose framework for your taste.
Personally I have tried two of them: CakePHP and Kohana. CakePHP was “first date” with a MVC framework. As I was young and inexperienced, it didn’t give me a very good impression. Even sample given with documentation didn’t work. Oh, I even didn’t understood why I need it. :)
But time passed, and I started to understand – using MVC is great option building bigger webapps or websites. So I gave another chance to a framework called Kohana.
Kohana is a PHP 5 framework that uses the Model View Controller architectural pattern. It is Originally based on CodeIgniter.
Why MVC? Well About MVC you can read here: Model-View-Controller. Usually in Model you write database queries, return them to a Controller which handles given data and returns it to a View. In a View goes all data layout or simply – template. But that’s not a limit, you even don’t need to use database sometimes to use MVC and so on. That’s great when application logic is separated from layout!
So, if you choose to start learning KohanaPHP, begin from great tutorial – Kohana 101. It is tutorial written by Oscar Bajner and shows how to write basic webapp using Kohana PHP framework. You can read it here: kohana 101 or Download it here: kohana101.
After reading and completing your first web site by yourself, go straight to Kohana documentation page, here you will get all needed help, also they have informative and helpful forum.
Okay, Kohanians, off we go… ;)