top | item 45628339

(no title)

Mystery-Machine | 4 months ago

This sounds like a really innovative idea. I haven't seen a dedicated place for "collection of useful procs", but one emerging pattern is to use `app/services` and then have a bunch of single-responsibility service classes that each have call or perform method and then you use the service when you need some shared functionality. It's like a proc, but instead it's a class with `#call` method.

discuss

order

vidarh|4 months ago

> It's like a proc, but instead it's a class with `#call` method.

It's called the "callable" pattern.