Learning Kohana
Asked Answered
D

9

10

I'm a reasonably intelligent guy and have been involved in a lot of stuff like HTML, PHP, Java, C#, C, C++, assembly, and so on and so forth. All in all I think that there's very little I don't have basic understanding of, though of course I'm by no means an expert in all the subjects, it's simply to illustrate that I'm not as green as I may very well sound.

Now, the thing is that I've been instructed to learn about the Kohana framework, in order to help with some web development at work. Well, that's all well and good, especially as I'm kinda tired of spending my time correcting other peoples HTML/CSS mess. To do some proper coding for a change would indeed be nice.

So I set out to learn, what I thought would be easy as pie, and not only did I think so, I was told so. Imagine my disappointment when after making an effort, I still didn't have the most basic understanding of the subject.

The documentation is unsatisfying to say the least, and I have yet to find a proper explanation of the subject as a whole.

In short, I understand close to nothing, and the more effort I make, the more confused I get. I honestly don't know where to begin and end.

I can't really tell you what I need to get going, as my understanding isn't even significant enough to know what I need to learn. I suppose a tutorial explaining, step by step, how to make something useful, would be in order, but I've been unable to find anything in the many hours I've spent searching.

This is my last way out, and the only possibly solution I could come up with. To ask you how you initially learned to use Kohana.

I do apologize for the lack of an actual question, but I do hope that you'll do your best to help anyway.

Diaster answered 17/6, 2011 at 13:52 Comment(2)
Take a look at this question as well: #394675Accompanist
"I still didn't have the most basic understanding of the subject.". That's disappointing to hear after reading about how great you are in the first paragraph. You really know how to break a man's heart.Tawannatawdry
T
18

Kohana isn't a "one size fits all" framework. We don't mandate how you do things. Therefore, tutorials don't apply the same way they do in other frameworks. The docs are there to tell you how to use the provided classed, but not really to tie them all together.

There's example applications on github if you'd like to look. Here's a few of mine:

The best source of information is...the source.

Tavarez answered 17/6, 2011 at 14:22 Comment(0)
B
7

When I learned Ko3, documentation didn't exist at all, read the source starting from index, bootstrap, request, etc. and continued as long as there was something I couldn't understand. Altough it took some time to get through everything, eventually I got to know it as if I wrote it, so yeah - I think this is the best way.

Anyways, there are many sources for learning Kohana today:

Brandnew answered 17/6, 2011 at 13:56 Comment(0)
O
4

How I learned Kohana? By just diving in, mess around and reading and understanding the framework code. When I started with Kohana, version 3.0 was about to be released and there was no documentation like there is now..

Oligoclase answered 17/6, 2011 at 13:57 Comment(1)
The thing is though, if I have to read and understand the entire source to use it, there really isn't much of a point. I might aswell just write a framework of my own. It probably wouldn't be as good, but it would most certainly srve my needs better.Diaster
L
3

I am a person who refused to use frameworks for personal reasons until i was forced to learn one because it was what the company i was applying for required me to learn before i'd get accepted. The framework was Kohana version 2.3.4, and i was given one week to complete a project using the framework as well as other requirements given to me by the head developer.

Upon googling, this is the best resource i found at the time: Kohana 101.pdf

I totally totally agree with you, DOCUMENTATION SUCKS!!! But because of this i completed my project in 4 days (thankfully), meaning its very easy to absorb kohana with this resource. In the part where you're already doing mysql queries, you will encounter 1 query that doesn't work, i'll leave the easter egg hunting to you ;) Don't worry the solution is very basic :D

I very much strongly suggest you learn Kohana version 2.x first before 3.x But if you want to jump learning Kohana version 3.x this link might be your best reference.

If you have questions folks at kohana forums can help you ALOT, they're really nice people. Some bite, but not eat you at least :D

I now love frameworks especially especially kohana because of alot of things. Hope this helps! :D

Larue answered 1/7, 2011 at 21:50 Comment(1)
The link appears to be dead now, here's an alternative source: ebookbrowse.com/kohana101v2-pdf-d161023832Deedradeeds
T
1

The best place to learn about kohana is:

1 Read the source code

2 Join #kohana on freenode

Tugboat answered 17/6, 2011 at 13:57 Comment(0)
C
1

If you really have this kind of experience you should not have problems with this articles: http://kerkness.ca/wiki/doku.php

Cuspidor answered 17/6, 2011 at 13:59 Comment(2)
This is out of date now. It also had some pretty bad docs, in terms of best practices.Tavarez
I've been looking a lot at this, as it's basically the only thing of interest I've found on my own so far, however, as already mentioned, it is out of date in many areas.Diaster
A
1

There is actually not much to understand, altough you should have a good understanding of some terms and subjects. First of all, please make sure you know something about MVC (Model-View-Controller). It's not a difficult topic, you should understand it in half an hour or an hour. I assume, basing on your programming experience, that the term OOP shouldn't be sounding strange to you, otherwise, please start there.

Then just start with creating some controllers, just echoing stuff (echo "inside controller xyz";), then including views. Place all controllers and views in the application/classes/controller/ and application/views/ directories. The Kohana documentation at http://kohanaframework.org/3.2/guide/kohana/mvc/controllers and http://kohanaframework.org/3.2/guide/kohana/mvc/views should help you out here.

Now a little bit of a tricky part; Routes. They are quite powerful and important in Kohana, alltough after you get used to them you won't using them that much. Please read http://kerkness.ca/kowiki/doku.php?id=routing:routing_basics .

Then now is probably a good time to try out the models and the ORM module.

Now please be aware of the cascading file system and be sure to understand it properly. This will make it possible to extend anything, from your own code to all Kohana core features. It'll also makes it possible to write your modules, with their respective routes, controllers, views, models, configuration files etc.

If you've understood the above you've grasped the basics of Kohana. Now it's all up to experience, trying out, asking us guys on SO and your own imagination. But I cannot stretch enough that a proper understanding of HMVC and OOP is probably the most important. Then you'll only need to get used to Kohana.

Australian answered 8/2, 2012 at 0:17 Comment(0)
R
0

I think the best place to start is the guide page on request flow. Kohana is basically an HTTP request handler with some fancy class and config file autoloading. Personally, this is what I like most about it.

Because the request handler lives in index.php, if you want to respond to URLs without that string in them, you need to use the example .htaccess file to instruct your webserver to redirect requests to that file.

You need to also get your head around MVC if you've not used it before; it's mostly about separating the code which does the important work from the code which just prints out HTML.

Ramos answered 18/6, 2011 at 19:16 Comment(0)
T
0

I have released a vagrant development environment with a base checkout of Kohana 3.3.1 installed. That could be a quick way to get up and running. The best way to learn is to just dive right in. Hopefully this can help get you in the pool quicker, so to speak.

Intro to Vagrant with Kohana with Zen Kommerce

Tasker answered 5/3, 2014 at 6:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.