Should I create a page for each of the 3 types of users, or should I create a page that dynamically decides what to display?

tristanr used Ask the Experts™
I am creating an online Alumni Tracking System for my college.  There will be three types of users: Alumni, Faculty and Administrators.  Alumni can do restricted/limited queries and can update their own record.  Faculty can create and update all alumni records and use many queries.  Administrators can create and delete faculty users.

I want to have three levels of access corresponding to the three user types.  What is the best coding practice to implement this?  Is it better to create a page for each user, or to create one page that decides what content to display depending on the user-type?  Which method is the most secure?  Secondly, which is easiest?

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

easiest to maintain would be create include files for each section of the page.

Each include file should determine what to display based on the User's level.

I have found that to be the easiest to maintain rather than full separate files.


i will rather suggests do it in same page. set the accesslevel thing in application.cfm.

e.g for Alumni = 0  Faculty =1  Administrators =9
so in the application.cfm, do the query and get access level and stored in the variable.
<cfloop query="qry">
<cfset my_acceslvl = #<column>#>

and you can code the same page query and additional functionality for depending upon this set varibale.
HI according to me - id say use a same page for foll reasons

1. easy to maintain ...
2. avoids confusion ...
3. takes the same amt of time ...
4. less files to deal with ...
5. allows quick debugging ...
6. less amt of code - which runs dynamically with diff conditions .. so if ur sure abt one set - it wld surely run for all the other ... hence avoids multiple checks to be perfoemd on diff files again & again.



Thanks to all who responded, I have just found this site and intend to use it a lot!  Also recommending this to all my hacker friends, it truly is an amazing resource.

Anandkp and others, will you take a look at another question I posted?  I would really appreciate it.


Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial