CodeIgniter is a powerful PHP framework. I have been working on CodeIgniter for more than 2 years. I suggested lot of my friends to learn CodeIgniter. Few months back I started working on Kohana PHP framework. The slogan of Kohana is nice – “The Swift PHP Framework”. I liked Kohana at the first sight.
I developed several web application using Kohana and became a big fan of Kohana. Here I would like to show you some code segments of both frameworks.
How to load view in CodeIgniter
To load a view in CodeIgniter you have to write
$this->load->view('home', $data);
How to load view in Kohana
$this->template->content = new View('home');
I like the Kohana’s technique best. CodeIngiter is not fully object oriented. Helper functions of CodeIgniter are not object oriented. But in Kohana, everything is object oriented. Say of example- here is a helper class and function to redirect to a particular function in Kohana.
url::redirect('some_controller/some_function');
But in CodeIgniter the helper function is something like this-
redirect(‘some_controller/some_function’);
I would like to share my opinion.
CodeIgniter:
- Easy to learn
- Fast and light weight
- Good documentation
- Not fully object oriented
Kohana:
- Easy to learn
- Fast and light weight
- Documentation is not good
- Fully object oriented
Leave a Reply