Rcls
Jul 21, 2021

--

This is somewhat a generic comment about clean code that doesn't really relate to the article, as the example I provided contains no business logic. The function simply transforms the received event to simpler format and delivers it forward to another queue.

I do agree on your point that any business logic (domain logic) should be at the core of your application, and it should be isolated (pure). But I believe that means keeping external dependencies out of your domain logic ie. dispatching messages to SNS, or sending an email from a domain function. Business logic is something that should have an input, and an output, and external dependencies should be handled by some type of orchestrator ie. the executed Lambda function, that then can call some business function, but handles the external dependencies at the 'root'.

--

--

Rcls
Rcls

Written by Rcls

Consultant, software architect and developer, freelance UI/UX designer, computer engineer, tech enthusiast, father.

Responses (1)