|
Best practice for very simple objects: msg#00109lang.smalltalk.squeak.beginners
Hi, I'm thinking right now about some role and permission stuff for my webapp. But I'm asking myself what will be a good approach for this. At first I created a lot of classes like AdminRole, MemberRole, CreatePermission, ModifyPermission etc. I used the class objects for this. These only carry some state like index, label. The role objects also carry a set of permissions. But at the moment I doubt this is a good approach. I'll end up with a lot of classes that have only two mehods. And second (I dislike most) is to use class side initialization for populating the objects at first. The good thing about it is that I'm able to use something like anAction requires: Modifypermission and aUser hasPrivilege: AdminRole What would be a usual approach to solve something like this?? thanks in advance, Norbert
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: How you could get your public IP from Squeak, Edgar J. De Cleene |
|---|---|
| Next by Date: | Re: Best practice for very simple objects, David Mitchell |
| Previous by Thread: | How you could get your public IP from Squeak, Edgar J. De Cleene |
| Next by Thread: | Re: Best practice for very simple objects, David Mitchell |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |