Welcome Guest, Not a member yet? Register   Sign In
Form validation not in controller but rather in Model
#2

[eluser]mi6crazyheart[/eluser]
Code:
moreover dealing with data checking in a controller is not perhaps the good manner to do.

May it's u'r personal style of working or it's logic that need such kind of data flow... but, as far as MVC approach concern, CONTROLLER is made for controlling any kind of checking & validation in the 1st entry stage of the application. Then, after checking it's CONTROLLER should be decide what kind of action taken over the request it has received. In this way it's act like a protective shield to any application.

About MODEL, it's a section which directly work with DB. So, may be there are chances if any thing will go wrong then it's effect directly on u'r DB data.

So in my suggestion , if u'r application has no specific necessary which need form validation at MODEL side then complete all those jobs in controller side.


Messages In This Thread
Form validation not in controller but rather in Model - by El Forum - 08-06-2010, 10:58 AM
Form validation not in controller but rather in Model - by El Forum - 08-06-2010, 10:04 PM
Form validation not in controller but rather in Model - by El Forum - 08-07-2010, 01:05 AM
Form validation not in controller but rather in Model - by El Forum - 08-07-2010, 03:01 AM
Form validation not in controller but rather in Model - by El Forum - 08-07-2010, 03:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB