If you go to “http://localhost/” or “http://localhost/index.php” you should see a page that just says “hello, world!”. That is our default/index page. So what happens if you go to “http://localhost/index.php/hello/“? You will get an ugly exception that looks like this:
Showing posts with label Tutorial. Show all posts
Showing posts with label Tutorial. Show all posts
Kohana Framework 3 Tutorial part 2 – quick introduction to controllers and the framework
Before building the actual Twitter application I think it would be useful to go over the way the framework works by default. So right now we have a clean and working install. Let’s see how it works.
Kohana Framework 3 Tutorial part 1 – installation and setup
“Kohana is an elegant HMVC PHP5 framework that provides a rich set of components for building web applications.” (kohanaframework.org).
I am a big fan of web application framework as they really do cut down on some of the development time. However they can be quite challenging to the newcomer. A few years ago I first started with CakePHP and then quickly moved to CodeIgnigter, which has been my framework of choice until I found Kohana. It is by far the best framework out there, not only because it is pure PHP5, but also because it offers an unprecedented amount of flexibility to the user.
Anyway lets not talk about the theory but rather about this tutorial. Because Kohana’s documentation is pretty bad, nonexistent for version 3 I though I would do a few tutorial series here. I will try to build an entire web application (nothing too fancy, more on that later) and document every step here. I am not a PHP expert, nor a Kohana expert, but I hope this will provide beginners with a bit of a head-start!
The application: since I couldn’t come up with a better idea I thought I would just recreate Twitter. I personally like the way Twitter is built (especially the sexy URLs) so I thought this would be a good example application.
So lets start with Part 1: