What is Mixin in Nooku?

Mixin: the name was suggested by Steve’s Ice Cream Parlor in Somerville, Massachusetts. He offered a basic flavor of ice cream (vanilla, chocolate, etc.) and blended in a combination of extra items (nuts, cookies, fudge, etc.) and called the item a “Mix-in”, his own trademarked term at the time. The principle of mixin is the same in  object-oriented programming languages , a class that provides a certain functionality to be inherited or just reused by a subclass.

Ref: http://en.wikipedia.org/wiki/Mixin

In Nooku, mixin is one of the Design pattern feature of Nooku. It is mix in of methods means  the ability to re-use the functionality by mixin without extending the base-class.

When a class mixes in a mixin, the class implements the interface and  includes, rather than inherits, all the mixin’s public properties and  public methods. A class may inherit most or all of its functionality from one or more mixins through multiple inheritance.

Nooku Framework  added the concept of dynamic and selective mixing . Hence making it more powerful. This has brought  Nooku Framweork close to Aspect Oriented Programming.

KFactory::mix('admin::com.harbour.model.boat', 'admin::com.harbour.mixin.engine');
$boat = KFactory::tmp('admin::com.harbor.model.boat'); 
class ComHarbourModelBoats  extends ComDefaultModelDefault { }
class ComHarbourMixinEngine  extends KMixinAbstract {
 public function __construct() {

2 thoughts on “What is Mixin in Nooku?

  1. Pingback: maillot mexique foot

Leave a Reply

Your email address will not be published. Required fields are marked *


− 1 = six

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>