Skip to content

Services

Dany Marcoux edited this page Jul 13, 2021 · 6 revisions

Problem

You have a complex set of operations that need to be executed in a sequence synchronously or asynchronously.

Solution

Concentrate the core logic of a request operation into a service class which resides under src/api/app/services.

Details

Services can easily become a code smell if not handled properly. If you find yourself with a service that has too many methods and/or becomes generally unreadable and hard to understand, you might have to find a bounded context or use one of the design patterns mentioned in that article.

Links:

Clone this wiki locally