Jun 26, 2022
Nice article. I would like to suggest an improvement in point 3. Let the route call the controller,the controller performs the required business logic and calls the service to perform any database queries. The advantage here is that common database requests can be reused by multiple controllers using a common service. Don’t allow controllers to talk to each other. It requires passing the request and response objects from controller to controller which can really complicate things.