You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Context
Certain backend controllers nowadays include extensive business logic.
which is tightly integrated with HTTP processing in a domain and makes testing
and, hence, management.
exemple concret
In functions/create-room/src/main.js, the
Creates room metadata based on input parameters
Calls LiveKit to create a room
Stores room data with Appwrite
There is a blending of handling requests and orchestrating business domains.
Proposal
As a first, well-scoped step:
Abstract room creation logic into a service/use case. Keep the controller concerned with request parsing and response handling. This will be a non-breaking refactor**, starting with one controller. I will proceed further with examples only if I receive feedback on what I
Context
Certain backend controllers nowadays include extensive business logic.
which is tightly integrated with HTTP processing in a domain and makes testing
and, hence, management.
exemple concret
In
functions/create-room/src/main.js, theCreates room metadata based on input parameters
Calls LiveKit to create a room
Stores room data with Appwrite
There is a blending of handling requests and orchestrating business domains.
Proposal
As a first, well-scoped step:
Abstract room creation logic into a service/use case. Keep the controller concerned with request parsing and response handling. This will be a non-breaking refactor**, starting with one controller. I will proceed further with examples only if I receive feedback on what I