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

TOP OF THREAD FULL DISCUSSION
re: 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.

code of conduct - report abuse