Welcome Guest, Not a member yet? Register   Sign In
elegant way design controllers for medium-sized app?
#1

[eluser]webdevguy32[/eluser]
I have an app where different roles can perform operations on the database. for example, the administrator can create people and manage people. People can manage themselves(people). Instructors need to view people and give people credit for attending a lecture.

So I have controller MAIN handling everything so far (I am new to OOP). Shouldn't I throw off control to a student controller and then test role for access to perform each method b4 they are allowed to perform it?

If so, what does that look like in my main controller?

OR, do I have the menu system simply point(link) to different controllers, like, you're in MAIN as an ADMINISTRATOR (so your URL is something like, mysite.com/main/somemethod. Then have the menu link to <a href="student/manage">Manage</a> where that link takes the user to the manage method in the student controller and in that method, I test for authorization/access to be able perform that operation?

Starting to like this OOP stuff

Thanks.


Messages In This Thread
elegant way design controllers for medium-sized app? - by El Forum - 10-17-2013, 07:04 PM
elegant way design controllers for medium-sized app? - by El Forum - 10-18-2013, 01:41 AM
elegant way design controllers for medium-sized app? - by El Forum - 10-18-2013, 03:40 AM



Theme © iAndrew 2016 - Forum software by © MyBB