Welcome Guest, Not a member yet? Register   Sign In
Grouping up functions for controllers and models.
#1
Question 

Let's say I have users and products. 

Users and Products both have profiles.

Let's just take basic CRUD functions into consideration.

Users can leave reviews(basic rating + comment) on user and product profiles.

This is where i am confused and indecisive.

Basically, i want a clean layout of my project because i can't deal with big pile of mess projects(ignites procrastination). An example of this would be to make only 1 controller file for all controller functions and 1 model for all model functions.

Now i have two choices, i can either break it up into 'purpose' or 'purpose+target', what i mean by this is.

'Purpose': create 1 profile.php file for controller and model and put all relevant functions inside those for both user and product.

'Purpose+Target': create 2 profile.php file namely, profile_user.php and profile_product.php and put all relevant functions inside both for user and product separately.

Which is better?

P.S. i'm a newbie
Reply


Messages In This Thread
Grouping up functions for controllers and models. - by dweenator - 10-22-2019, 01:46 PM



Theme © iAndrew 2016 - Forum software by © MyBB