Monday 9 January 2017

Issues when selecting between a module and a "class"

I've studying node for a while and have a few projects behind my back now. I'm still not sure of one thing: When is it needed to use a "class" (prototype) and when to just export functions directly? What are the pros and cons of using modules? What are for using prototype approach? I Generally like using modules because it doesnt require me to create new objects because of the node caching system I can just require them. Can someone enlighten me when is it needed to use prototypes? I have been reading about design patterns (http://ift.tt/2jl6dEC) but this still confuses me.

Submitted January 09, 2017 at 02:32PM by tjugg

No comments:

Post a Comment