Looks pretty similar to what I do. You might think about splitting UserManager into a couple classes, as login and getRoles don't really have much to do with users, but with security, so you might want a SecurityManager in there as well that uses User objects.
If you ever subclass your User object, those subclasses will still be Users, just a specialized form, so you can have your return type set to User in your UserManager and that won't have adverse affects down the road. barneyb > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Behalf Of Stacy Young > Sent: Wednesday, October 08, 2003 2:15 PM > To: [EMAIL PROTECTED] > Subject: [CFCDev] Modeling CFCs, basic example > > > > I'm working on a small app. Not mach-ii just yet cause it'd be overkill > at the moment. > > I've created a User.cfc and a UserManager.cfc > > - The User object has some getter/setters and properties specific to a > user instance (pretty obvious I guess ;) > > - The User manager handle's methods like login and getRoles (from the > db) > > - In the application I'm invoking the UserManager and having it return > the User object instance. > > a) Does this make any sense? > b) What happens when I want to extend the User object to different > subtypes? (i.e. I may have diff users in which I need to subclass out > and override a method or two) I currently have the UserManager using a > return type of "all". > > Any pointers appreciated! > > Stace > > > > AVIS IMPORTANT: > ------------------------------- > Les informations contenues dans le present document et ses pieces > jointes sont strictement confidentielles et reservees a l'usage > de la (des) personne(s) a qui il est adresse. Si vous n'etes pas > le destinataire, soyez avise que toute divulgation, distribution, > copie, ou autre utilisation de ces informations est strictement > prohibee. Si vous avez recu ce document par erreur, veuillez s'il > vous plait communiquer immediatement avec l'expediteur et > detruire ce document sans en faire de copie sous quelque forme. > > WARNING: > ------------------------------- > The information contained in this document and attachments is > confidential and intended only for the person(s) named above. If > you are not the intended recipient you are hereby notified that > any disclosure, copying, distribution, or any other use of the > information is strictly prohibited. If you have received this > document by mistake, please notify the sender immediately and > destroy this document and attachments without making any copy of any kind. > > ---------------------------------------------------------- > You are subscribed to cfcdev. To unsubscribe, send an email > to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' > in the message of the email. > > CFCDev is run by CFCZone (www.cfczone.org) and supported > by Mindtool, Corporation (www.mindtool.com). > > An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED] ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com). An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
