Cakephp

The difference between a Component and Plugin in Cakephp

Explain the main difference between an component and plugin in cakephp


The difference between a Component and Plugin in Cakephp

Components and Plugins add new functionality to the Cakephp application. 

Components and Plugins are still separate entities in Cake 2.0. Components are "are packages of logic that are shared between controllers", where as Plugins are "a website/cakephp application of controllers, models, and views". which can almost run on it's own, but extend the 'father' site.

Compoments extend the base Component class, while Plugins have their own AppModel and AppController.

Think of a plugin as a separate Cake application sharing the same core libraries with your main application.

Published: 1st June 2016 by

Adverts