TIP: Use Markdown or, <pre> for multi line code blocks / <code> for inline code.
These forums are read-only and for archival purposes only!
Please join our new forums at discourse.kohanaframework.org
Kohana as components
  • Over the past few years that I've been using Kohana for many of my web projects I have become accustomed to, maybe even depended on, the power of this framework. Not only is Kohana, in my opinion, the best PHP web framework but it also comes shipped with some of the finest goodies a PHP developer can dream of. Think of Query Builder and the various helper classes such as Arr, Text, Date, Valid, etc.

    On many occasion I find my self working on PHP projects that are not directly web tier or Kohana related (think business logic or Wordpress) and I find myself sadden by the fact that I'm not surrounded by my favorite buddies to get the job done. Oh, I'm tempted to hack it. Make a copy of my favorite helpers, chance the class names and comment out the stuff that has a dependency on the web framework but doing that I feel kinda dirty so I try to avoid it. Then I find myself writing my own version of Arr::get()...

    Sometimes I find myself thinking, what if Kohana was split into multiple projects that would separate the web framework from all these yummy goodies? If e.g. Query Builder and the database module were their own independent Kohana project (ala Doctrine) that could be used independently from the web framework. That there was a separate Kohana utilities project that would include goodies such as Arr, Text, Date, Valid, etc. which I could use in a non-Kohana web framework context?

    These sub projects would obviously be shipped as part of the web framework but they could also be used outside of it. The database is already shipped as a module but it could be split up further to include a vendor. Currently all the helper classes such as Arr, Text, Date etc are baked into the system.

    Please let me know if I'm rambling or if I'm just full of wishful thinking here...

  • what if Kohana was split into multiple projects that would separate the web framework from all these yummy goodies?

    We're planning on doing this for 3.4.

    If e.g. Query Builder and the database module were their own independent Kohana project

    They basically already are. With only a few small modifications, you can use the db module in any php project.

  • That's good stuff. I'm looking forward to 3.4!

  • There has been a lot of conversation lately about separating the web tier (Kohana) from the "business logic" tier in the forums. Does anybody have an example or a write up of a good example of how you guys have implemented this in a project?

  • @chrisgo are you also referring to the articles on zombor.github.com ? - Good Stuff.
    We could build the Zombohana framework :)

  • I'm guessing, splitting Kohana into Composer packages, right?

  • Decoupled Composer packages would definitely be favourable. I could then just add a dependency on "kohana/util" or "kohana/router" to my project.

  • @pan69 Some of the modules are Composer compatible already: https://packagist.org/search/?q=kohana

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion