Kohana 3.3 Introduction

The best programmers are not marginally better than merely good ones. They are an order-of-magnitude better, measured by whatever standard: conceptual creativity, speed, ingenuity of design, or problem-solving ability. – Randall E. Stross

I am merely good… and sometimes merely.  To make up for this I am always looking to reuse code written by the best.

A self-preservation technique I try and follow is to not use other code that I don’t understand. Unfortunately this is a bit of a handicap for me because there is an awful lot that I don’t understand!

And then I found Kohana. I won’t pretend to understand it all but it is such a light elegant framework that it IS understandable. And it works.

I have struggled through a couple of major upgrades of the code base and have sworn a few times because the API keeps changing, often in ways that seem designed to just piss people off. OTOH, I think it is getting better all the time and I want to use it more, not less.

I should have got on top of it after all these years but I am only a (very) part-time web designer and not much of a geek.

One thing that I have struggled with is a lack of good documentation. There is lots there but it always seems like a lot of work to dig out the particular piece you want NOW. I have read sections of source code a few times but, partially because it is so concise and also uses some of the more advanced features of PHP, it takes a lot longer to tease out the information than I would sometimes like.

As part of a reminder for myself, as well as in the hope that it might help someone else, I’d like to make a few notes about a recent mini-project.

I hope it will be helpful.

It includes some very basic suggestions and gotchas that I had to deal with, including:

  • a simple CRUD (well, just the U part at the moment) outline for those who like to roll-their-own
  • Updating multiple models in one go
  • Using MySQL Workbench
  • Using database foreign keys and constraints
  • etc…

All pretty simple stuff in a way…. but took me a day or two to get on top of it. Let me know if it helps, or if you can suggest improvements.

Tagged with: , , , ,