Hacker News new | ask | show | jobs
by aantix 5139 days ago
>One in particular is something I've been thinking about and

>refining for a while now [3]. In this approach, persistence

>objects remain extremely thin, and business logic is

>encapsulated in lots of very simple objects known as

>“services” and “policies”. Not all objects in this

>methodology will fit in to one of those two categories,

>but they are two of the most important concepts.

I've seen this division of labor outlined in this DestroyAllSoftware screencast : https://www.destroyallsoftware.com/screencasts/catalog/fast-...

As can be implied by the title, one of the side effects of keeping your service logic in their own separate plain Ruby classes is that you don't have to load Rails as dependency which means tests can run _really_ fast.

1 comments

Yeah, services are one of the types that have leaked out of DDD (and probably leaked into it from somewhere else).