Welcome Guest, Not a member yet? Register   Sign In
model and controller boundary
#1

Hi,

I am new to MVC so I dont know what I should do or not do in model or controller.

In my project 
1. when user wants to publish item, first I need to check if user exceeded its published_item_limit 
2. or if user want to publish its unpublished item I need to check if user published_item_limit

My quetion is where I should check if user exceeded limit or not in model or controller? 
I am asking it because I need to return different messages for each of this cases and in my model one method does both of these actions (insert or update)

For example, if user exceeded limit should I return 
array('success' => false, 'reason' =>'Couldnot publish, exceeded limit!') or 
array('success' => false, 'reason' =>'Couldnot update, exceeded limit!')
Reply


Messages In This Thread
model and controller boundary - by neuron - 01-03-2017, 06:57 AM
RE: model and controller boundary - by PaulD - 01-03-2017, 12:22 PM
RE: model and controller boundary - by neuron - 01-03-2017, 09:53 PM



Theme © iAndrew 2016 - Forum software by © MyBB