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
Business logic coupling. A reaction to http://zombor.github.com
  • This post is kind of directed to @zombor after reading his article at http://zombor.github.com

    I found the video you refer too extremely useful.

    I have one thing that wonders my head tho:

    Business logic should not know any framework whatsoever. But Kohana (for example) as a full framework also has these little functionalities that are very useful like the Arr class methods.

    So they are extremely useful, even in your business logic. How would you deal with this? Create a copy of that class so you're not depended on the framework itself? (duplicate code!!)

    I would love to hear your or any other thoughts on this.

  • Business logic should not know any framework whatsoever.

    I don't think this is entirely true. Business logic should be separated from the delivery mechanism as a rule. Kohana has both delivery mechanism code as well as "nice to have" code (this will hopefully be better separated in the future). You will invariably need to import third party code into your project from various sources (since you don't want to redo that work).

    You can add Kohana to your autoloader, and use it normally as a library. You aren't coupling your class's api to the framework, which is what you really want to avoid.

  • Yes that wasn't a very smart sentence. I agree.

    It would be 'nice' if Kohana would separate it. But it's already usable in that way if you 'design' and draw your OWN borders that way. I must say that I already love the separation of the core and modules you guys do! It makes you think more separate out of the box, even as a beginner.

    I think all this design stuff is really a discipline, as seen in the video with rails. It can be done.. but most don't. If it was designed with that mind, everybody might of developed in that way :)

    If I said anything stupid again, correct me hehe.


  • @zombor. Any plans on posting new articles to your blog?



Howdy, Stranger!

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

In this Discussion