|
Re: Best practice for very simple objects: msg#00111lang.smalltalk.squeak.beginners
Norbert Hartl wrote: At first I created a lot of classes like AdminRole, I'm a big fan of instances :-) Have one Permission class, one for Role etc. Then you can have instance creation methods (maybe via a cache) Permission modify, Role admin Internally you could actually use (symbol) names Permission>>modify ^Permission new name: #modify or self cache at: #modify ifAbsentPut: [...] This would make it easier to extend the role and permission model later Permission>>named: permissionID anAction requires: Modifypermission anAction requires: Permission modify Cheers Michael
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Best practice for very simple objects, David Mitchell |
|---|---|
| Next by Date: | Re: Best practice for very simple objects, Michael Rueger |
| Previous by Thread: | Re: Best practice for very simple objects, David Mitchell |
| Next by Thread: | Re: Best practice for very simple objects, Norbert Hartl |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |