--

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.

--

--

Angular&NodeEnthusiast
Angular&NodeEnthusiast

Written by Angular&NodeEnthusiast

Loves Angular and Node. I wish to target issues that front end developers struggle with the most.

Responses (1)