Hi everyone

How are people managing messages in their OO code i.e. how do you pass
errors or comments from a component which is deep down in the business
layer - say perhaps from a DAO back up to the view. I've had a look at
various projects which I've downloaded and seen that some people use
CFTHROW type=application which means that this can be picked up at the
top level (but it seems odd to me because it is making the assumption
that some other object / code will pick it up i.e. it is not
explicitly saying "I had an error"). Some other projects built arrays
of messages and returned this. But how would you use such an array
solution if you were wanting to pass a bean as well as the array (I
guess you would have to return a structure with the array and bean
inside)?.

Perhaps an example would help, so let's take a very common user-login
scenario

1. User enters email/password.
2. Controller/Listener passes form vars to service layer.
3. Service layer invokes BEAN and passes it to the DAO for population.
ERROR TYPE 1: user not found (Q: So how would you pass this ERROR back
to the view.).
ERROR TYPE 2: DB error (Q: Perhaps there was a table error or DSN
error or database was down. So how would you pass this ERROR back to
the view. Obviously you would want to email the administrator with the
specific error as well as provide a generic message to the user).

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