No, only service CFCs extend base_service.
OK, that's good to know! That sort of matches listeners in Mach II (which all extend MachII.framework.Listener).
Say you update the email address in your user profile and are sent a
verification email, then hit refresh so 2 emails get sent. You click on the
link in the first email that arrives, but the verification code is no longer
valid. This will raise an exception in the model when it fails to find the
verification code in the users database table. The type of exception would
be something like 'dataIntegrity.invalidEmailCode'. The presenter CFC
responsible for dataIntegrity exceptions would have a method to handle
exceptions of type 'dataIntegrity' and may or may not have a specific one
for exceptions of type 'dataIntegrity.invalidEmailCode'.
Yes, that allows for exceptions to be used in the model that match how the model behaves without coupling them to the application flow / UI. Good. Only the presenter / controller really knows what to do with exceptions.
Sounds like BatFink is pretty well thought out!
Designing a good exception handling model into a framework is key because it affects so much of how developers will do error / exception handling. One thing folks should bear in mind is that exceptions are really intended for 'exceptional' situations, not for 'expected' errors. In other words, your data integrity exception is a good example - because the system is designed to create a unique email and have a single verification action. Things like hitting the end of a file or the end of a list are 'expected' errors and shouldn't warrant an exception. User input validation is a somewhat grey area because you can 'expect' users to enter invalid data but validation of hidden fields might lead to 'exceptional' errors. There are also user input scenarios where you can't easily validate the data fully and only by attempting to work on it within the model can you completely validate it - which also might create 'exceptional' errors.
Sean A Corfield -- http://www.corfield.org/blog/
"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man."
-- George Bernard Shaw
--- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED]
MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia http://www.mxdu.com/ + 24-25 February, 2004
