user2387319
user2387319

Reputation: 123

Dividing a CakePHP project into 2 huge sub-systems

I am working in a huge project, in CakePHP. Its tough to handle a huge system like this. So, I want to divide this system into 2 sub-systems. There will be same database, with same tables. Both sub-systems can use all the tables. I just want to make 2 packages of Controllers, Models, Views; I mean, both package will have their own Controller, Models, Views, and they may interact if they need to.

Its like HMVC of Code Igniter, triads of MVCs.

Is that possible ? If yes, how ? I am asking for any code, I am asking for the way to organize my system(site) in a systematic way.

Thanks.

Upvotes: 1

Views: 119

Answers (1)

Nik Chankov
Nik Chankov

Reputation: 6047

The equivalent of HMVC in Cake would be the plugins. You can make as much plugins as you like in order to modularize your project.

Although making your code modular (using plugins) is good, you need to keep the reference to the plugins in the rest of the site/project.

As example you always need to place plugin in the link in order to keep the proper links like

$this->Html->link('Your link', array('plugin'=>'my-plugin', 'controller'=>'my-controller',....));

Apart from that I think there are a lot of benefits making your project modular.

Upvotes: 2

Related Questions