Hi Alan

Thanks for the detailed response - very helpful.

Just one question regarding "Your User.cfc bean / business object
would enforce your business rules, ie isPasswordValid(),
isAdministrator(), validateUser()..." I don't get how this would
work... let me paint a picture of how I understand it working (lets
forget about the factory for now);

1. Call getUser() in UserService (passing in username and password for
validating)
2. So does the UserService call validateUser() in UserBean... but I
though Beans are objects with just getters and setters (i.e. no
querying).
I thought the process would have been:
1. Call getUser() in UserService (passing in username and password for
validating)
2. UserService init's a UserBean (passing in username and password)
3. UserService passes UserBean to Read() in UserDAO (passing in an
half-baked-bean)
4. UserDAO runs query looking for record (calls getUsername() and
getPassword() from the half-baked-bean which was passed in).
5. If a record was found then re-run the Init() function on the half-
baked-bean passing in query results as arguments i.e. if
(q.recordcount) { arguments.userBean.init(q.Firstname,q.Lastname)} and
then return the fully-baked-bean.
5b. I'm not to sure what you should do if no recordcount. Perhaps this
is your point that you return the bean to UserService regardless and
then run validateUser() on UserBean to check that it's a fully-baked-
bean.
Am I way off?
Cheers
Matthew
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CFCDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfcdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to