Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Correct. A business logic controller can not directly corner the outside world, it must talk through a service.

This is nice because it prevents leaky abstractions into the controller layer. Actions across services that need to be atomic can be grouped in an XA transaction:

// Xa start databaseService.reset password(user); emailService.notifyPasswordChange(user); // Xa commit



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: