posted 15 years ago
Hello Varun,
For alt 1:
User is Role .. Does it make sense??? NO.
so forget about inheriting from Role. I Don't think it is required at all.
alt 2:
Student extends User
Admin extends User
What are the key differences in both [student and admin]???
Actually, as per my understanding,
Student and Admin are not siblings.
Admin is a kind of role. Don't you think so??
So lets put it this way
Student extends / [implements if appropriate] User
Professor extends User
And Student [Actually User if Student is inherited from it, because permissions will be there for all types of users] has a List of Permission
Now Permission is based on Activity [Say create User]
Each Activity[Key] -> [Values]Read ,Update, Create, etc.
In Admin you will have all Activity with create as true.
What do you say, you may have different ideas.
Regards,
Nachiket
[ December 13, 2008: Message edited by: Nachiket Patel ]
Before software can be reusable, it first has to be usable. - Ralph Johnson