On Sat, Mar 26, 2011 at 6:08 AM, Reinier Zwitserloot <[email protected]> wrote:
> I explained both the API in general terms and why such an API is quite
> unlikely to be observable publically (it's banking software, what do you
> think?). You call 'transferFunds' on someone's account, give it an amount
> and another account, and that's that. There is no return value, so encoding
> a problem via return value would be a fantastically silly design.
> This is more than enough information for you to tell that this is a rare but
> valid example.
>

I like how you call foul all the time on other people's rudeness, yet
feel free to call any design you don't care for silly on a whim.
TransferFunds could return any number of useful things, not the least
being a transferReceipt.  As for why one might prefer for this to be a
runtime, it is likely something you can let bubble up all the way to a
UI layer to have a handler that captures it and presents it to the
user in an appropriate fashion.  The transactions should get rolled
back no matter what the actual exception was.

Also, I linked to what I would consider a fairly elegant domain model
for trades.  Not exactly the same, but pretty close.  I am not looking
at it again right now, but I don't recall it relying on exceptions.

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" 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/javaposse?hl=en.

Reply via email to