Skip to content

Implementing a layered architecture for better code qualtiy #4

@anuragsinha03

Description

@anuragsinha03

Currently the code looks very untidy, you should better add different layers to differentiate concerns.
What I personally prefer and recommend is to use a flow like this
Routes -> Controllers ->Services -> Repository

  1. Routes - Everything related to routing goes here
  2. Controllers - It only handles where does the request goes in order to get handled and what response does it get.
  3. Services - Implement business logic here
  4. Repository - Interaction with databases

If you need any assistance, contact me via mail anuragsinhadeveloper@gmail.com

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions