Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Lots of questions to answer here, I'll try my best.</p> <blockquote> <p>Do you know real-life examples of "database-heavy" applications like directories, online communities... with a log-in area built on Kohana 3 where I could take a peek how they do it? </p> </blockquote> <p>There's a few example applications out there. Woody Gilk (Kohana founder) has published the code to his personal website on <a href="http://github.com/shadowhand/wingsc" rel="nofollow noreferrer">github</a>. For the login area he assigns a cookie value. Kohana 3 / 2.4 sign the cookies which makes it safe and removes the requirement for sessions. This might not be up to everyone's tastes so you can always use built in authentication library that uses both sessions and cookies.</p> <p>Here are some other projects you might be interested in:</p> <ul> <li><a href="http://github.com/kerkness/shindig" rel="nofollow noreferrer">Shindig</a> - Light weight blog module for kohana 3</li> <li><a href="http://github.com/bluehawk/kohanut" rel="nofollow noreferrer">Kohanut</a> - An extensible CMS written in Kohana 3</li> </ul> <blockquote> <p>Are there conventions or best practices on how to structure an extendable login area for end users in a Kohana project that is not only able to handle a business directory page, but further products on separate pages as well? </p> </blockquote> <p>If I understand you correctly you want to generate a login box for each of those pages? This is easy with Kohana 3 as we can take advantage of the <strong>H</strong> in HMVC. Sam de Fressyinet wrote an article detailing what this all about on the iBuilding Tech Blog. <a href="http://techportal.inviqa.com/2010/02/22/scaling-web-applications-with-hmvc/" rel="nofollow noreferrer">Scaling Web Applications with HMVC</a>.</p> <p>What you can then do is perform an internal request to the login controller or action and dump the response into your view page.</p> <pre><code>$login = Request::factory('login')-&gt;execute()-&gt;response; </code></pre> <p>$login now contains the login form, which you can put anywhere you like. You may want to return a different response if the request is internal which is why this piece of code can be useful:</p> <pre><code>if (Request::instance() !== $this-&gt;request) { print 'Internal called made with Request::factory'; } </code></pre> <blockquote> <p>Do you know any good resources on building complex applications with Kohana?</p> </blockquote> <p>There's not going to be documentation showing you how to build complicated applications. The view of the Kohana community is that you're a PHP developer and should be able to solve these problems for yourself. If you can't, well you shouldn't be using Kohana then.</p> <blockquote> <p>Have you built something similar and could give me recommendations on a project structure?</p> </blockquote> <p>Once you understand how Kohana 3 finds files things are easy to understand.</p> <pre><code>|- classes |-- controller |-- model |- views </code></pre> <p>For example: </p> <pre><code>Controller_Mathew extends Controller </code></pre> <p>Will look for a file called <code>mathew.php</code> in: </p> <pre><code>classes/controller </code></pre> <p>Underscores can be used to specify deeper directories. Example:</p> <pre><code>Controller_Mathew_Davies extends Controller </code></pre> <p>will look for a file called <code>davies.php</code> in:</p> <pre><code>classes/controller/mathew/ </code></pre> <p>As you can see, the underscores in the controller name act as directory separators. This rings true for models and vanilla classes.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload