Welcome Guest, Not a member yet? Register   Sign In
HMVC best practices to reuse code
#5

[eluser]gh0st[/eluser]
The way I am currently experimenting with is:

Code:
MY_Controller - has basic functionality I need for the entire site
Admin_Controller - has basic functionality for the admin side, and extends MY_Controller
MY_Model - Jamie Rumbelow's MY_Model code, it extends Model.

I am experimenting the auto-loading my own model.
Core_Model (extends MY_Model) and has core methods that are relevant to my system only. This way I don't hack Jamie's code.

Your common functionality modules would be in your MY_Controller because they exist in all areas (from what you describe).

I would recommend downloading PyroCMS and pulling apart what Phil did, that's what I've done/doing; even though the goal is different it certainly has some pointers which I think could be useful.


Messages In This Thread
HMVC best practices to reuse code - by El Forum - 02-03-2010, 12:45 PM
HMVC best practices to reuse code - by El Forum - 02-03-2010, 07:42 PM
HMVC best practices to reuse code - by El Forum - 02-04-2010, 03:16 AM
HMVC best practices to reuse code - by El Forum - 02-04-2010, 04:37 PM
HMVC best practices to reuse code - by El Forum - 02-09-2010, 11:22 AM



Theme © iAndrew 2016 - Forum software by © MyBB