Re: [nodejs] Advantages of functions as modules

2014-10-02 Thread Angel Java Lopez
Short answer, English is not my strong point ;-) A keyword: modularization Instead of populate the global environment, each module exposes the functions that needed to be consumed, without worrying of name conflicts with other modules. And there are more benefits: - Each module tries to cover a

[nodejs] Advantages of functions as modules

2014-10-02 Thread Sameer Joshi
Hello Team! I wanted to know, what are the advantages (if there are) of calling functions from modules using *modules.exports* as opposed adding all the functions to the main app JS file. I am looking for a simple comparison or pro's and con's for points apart from that it gives logical modula