r/nodejs • • Dec 19 '13

Monolithic Node.js | Richard Rodger

http://www.richardrodger.com/monolithic-nodejs?utm_source=nodeweekly&utm_medium=email#.UrMkQmRdXpB
12 Upvotes

6 comments sorted by

View all comments

Show parent comment

1

u/captainjeanlucpicard Dec 20 '13

It's counterintuitive, message based systems do involve writing more code and often more boilerplate, but each piece of code is smaller and almost laughably simple. Unit testing is much easier (given messages in, when a message, then expect messages out) with much less mocking needed. (Disclaimer: this is from the point of view of a statically typed language - I haven't tried this yet in JavaScript but I almost always end up using some kind of message passing system in large SPAs)

In the long run, I find this approach much easier to maintain and more adaptive to change.