cdimascio / generator-express-no-stress

🚂 A Yeoman generator for Express.js based 12-factor apps and apis
MIT License
595 stars 82 forks source link

Some further reading on your architecture? #2

Closed Obiwarn closed 7 years ago

Obiwarn commented 7 years ago

Could you recommend some links / info about the folder structure and Service / Controller / Router architecture you are using in the project? How do you expand this to larger projects?

cdimascio commented 7 years ago

Hello @obiwarn, the service, controller paradigm crops up in many languages and frameworks e.g. playframework, spring, ruby on rails. In the case, of express-no-stress, it remains relatively un-opinionated. It leaves it up the developer to choose a path. Hence, why the example controller and service is so simple.

I personally like the paradigm. Hence why the example is as such. It ensures loose coupling between your services and your routing/controller layer. This makes it easy to test services independently. They become more portable and can be extracted into a standalone library.