Hi Michael,

I'm cooking dinner and don't have time to do the OO explanation, but
this may help:

If you're using the CFLOGIN framework, you're allowed to set what
roles a user is a part of.

Then, on your CFFunction tag use the ROLES attribute to control who
can access that method.  For example, a method called getClassesTaught
would use roles="teacher".

-joe

----- Original Message -----
From: Dawson, Michael <[EMAIL PROTECTED]>
Date: Thu, 22 Jul 2004 14:58:09 -0500
Subject: CFC Design for Multiple Person Roles
To: CF-Talk <[EMAIL PROTECTED]>

In our school, as would many other schools, we have people who are of

multiple roles.  The roles would mainly include: Student, Faculty,

Employee.



Currently, I have a single CFC that wraps all three user roles in one.

I don't really care for that method, but I haven't seen a solution, good

or bad, that lets me break up the different roles into separate objects.



A user may be a(n):

Employee-only

Employee and faculty

Employee and student

Employee, faculty and student

Faculty-only

Faculty and student

Student-only



A "base class" would be "User", but how do I extend this base class to

include each possibility of the other roles?



Some differences are:

A faculty has a method that returns all courses they teach.

A student has a method that returns all courses in which they are

enrolled.



Can anyone suggest a OO design principle that may satisfy these needs?



Thanks!



M!chael A. Dawson

Manager, Programming and Software Development

Office of Technology Services

University of Evansville

1800 Lincoln Avenue

Evansville, IN 47722

812-479-2581



If you can read this, you are umop apisdn.________________________________
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to