32
bartmr
5y

Practical example of why you should sort your code by feature (users, notes, analytics) instead of technical layer (models, views, controllers, etc)

Comments
  • 3
    I hate humans. Often.
  • 2
    Why not do both? 🤔
  • 1
    @dc297

    notes/
    --notes-controllers.ts
    --notes-sequelize-models.ts
    --views/
    ----(...more files)

    Like this?
  • 0
  • 1
    @bartmr yeah, you can call them modules and can have one module per feature. You could also have shared/core modules as per your requirements.

    Disclaimer: your use case might be different. 🙏
Add Comment