DEV Community

Discussion on: Dependency injection in functional programming

 
patroza profile image
Patrick Roza

Small follow-up on Repository, so i'm kind of more in the boat of:

find();
findOne(1); // find by id
findOne({ firstName: "Timber", lastName: "Saw" }); // find by query

and then using these functions in the interactor, instead of encapsulating specific queries in single use methods in the Repository.

Thread Thread
 
patroza profile image
Patrick Roza • Edited

Of course Jimmy has a word on that too ;-)
lostechies.com/jimmybogard/2012/10...
(it stands at the basis for the Query/Command handlers, which is an evolution of this)