Hacker News new | comments | show | ask | jobs | submit login

Anybody who doesn't have something like mail_safe [1] installed is asking for trouble, no matter where he stores his business logic.

[1] https://github.com/myronmarston/mail_safe




I tried to pick a very contrived example. The architecture rails forces you to have is great if all of your business logic is simply CRUD. Once your app starts doing other things though, that's where careful consideration is needed as to where that logic should live.

You could imagine callbacks or observers that do all sorts of things:

  ping an external service
  touch another model or models
  send an internal email
  or does a combination of a bunch of stuff.
Things get even tougher when you start having flags that turn logic on or off. It has the potential to really become a mess, very fast.


That's a nice solution to the "emails gone wild" problem, but - no offense - it's a bit besides the point.

We could just as well be talking about S3 data, facebook posts, tweets, anything with (side) effects beyond the active database record in question.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: