re: Designing a better architecture for a Node.js API VIEW POST

FULL DISCUSSION
 

Why do i need this structure ? i use normal functional approach.

 

Yes, I've being using a normal function approach for a long time too, but applying design patterns using class is really helpful and easy to replicate/add functionalities across your app, this will make your life easier especially on a big project.
For example, if you need to create a new endpoints with the same common functionalities as a CRUD like we did there you won't need to copy and paste code (respecting CLEAN code), you can just inherit all the functionality you have already created somewhere.

 

neither functional nor OO are normal. Those paradigms merely tools. The author chose to go OO but doesn't mean that a lot of the concepts can be used in the functional way.

code of conduct - report abuse