Wanna Kohana?

admin » 31 October 2009 » In web development »

Wanna Kohana? Because I sure do.. This secure, lightweight, and extensible little number can work wonders for your web developing ensemble.

OK, I know what you’re all thinking, “What about CakePHP?” Cake is undeniably an Olympic gold medalist framework featuring many similarities to Ruby on Rails. Ahhh Rails, I promise someday I’ll devote more time to you, but until then my programming world resides primarily in PHP. Sometimes you have to make the best of the hand thats dealt…

Which brings us to the lovely, elegant, graceful and genteel Kohana framework.

Enough fluff, I’m about to punch you in the face with some factualizations. Here’s reasons why Kohana has street cred:

  1. The strictest OOP PHP has to offer
  2. Dainty footprint, no extra libraries like PEAR
  3. Locks down GET, POST, COOKIE, and SESSION with XSS protection
  4. Auto-loads classes like butter
  5. Orginization
  6. Flexible and extensible
  7. Godlike power over events
  8. Rapid Application Development

Don’t believe me, download the framework and see for yourself!

First of all not having to support PHP4 means less code and enables more robust functionality for the framework. Auto-loading, for those of you who haven’t yet experienced its awesomeness, steadfastly promotes great justice. Gone are those agonizing days of having to use require_once() and the likes.

MVC, well we all know the virtues of MVC. Also, the RAD aspect is pretty rad as well.

Event handling enables you to poke your head in at almost any time during execution just to say hello or stay and enjoy a spot of tea, cherio.

Time for some snippets!

Here is a basic controller:

class Freshness_Controller extends Controller {
  function freshen()
  {
	// Load the view as an object
	$view = new View('freshest');
	// Adding variables to be displayed in the view
	$view->title      = "Welcome to Bennyfreshness's blog.";
	$view->heading = "Wow this is indeed extremely fresh.";
	$view->content = "I've never seen so much freshness.";
	// Render the view
	$view->render(TRUE);
  }
}

You get the point… Clean, concise code…

To bring this party to an end I’d like to end with some closing remarks. If you’re doing web application development in PHP I strongly recommend checking out Kohana. Its short learning curve, vibrant community, friendly IRC (#kohana on irc.freenode.net), and most importantly rich and robust code base will increase your productivity and you’ll have more fun while programming.

So how do you get me to go back to developing in Cake?

Take the letter “c” out of “cloth” and the letter “f” out of “way”

:)

Tags: , , ,

Trackback URL

4 Comments on "Wanna Kohana?"

  1. bennyfreshness
    Henrietta Winkler
    31/10/2009 at 12:54 pm Permalink

    Take the letter “c” out of “cloth” and the letter “f” out of “way”

    WTF are you smoking?

  2. bennyfreshness
    admin
    31/10/2009 at 5:01 pm Permalink

    Very good point Henrietta, thanks for the feedback!

    What I was going for is a joke which doesn’t come across well over the internet.

    Take the “f” out of “way”…

    Well there’s no “f” in “way”. No f’in way.

    So how do you get me to go back to developing in cake?

    There’s no f’in way :)

  3. bennyfreshness
    @rmn
    02/11/2009 at 3:30 pm Permalink

    we’ve been knocking things out in Kohana for a good few years now and love it. I’d be interested to in what you feel it to be lacking/missing compared to cake, particular the ORM. ‘nother post on that please sir!

  4. bennyfreshness
    admin
    02/11/2009 at 4:18 pm Permalink

    @rmn, ask and ye shall recieve…

Hi Stranger, leave a comment:

ALLOWED XHTML TAGS:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to Comments