I agree with Nuno on this (but I'm a beginner). I mostly do functional.... but often I find a places where i prefer an object abstraction.
And I find that this is mostly the case of the node api, you will find like a bunch of functions in "fs"... but then things like Stream or the EventEmitter looks more like objects (classes). so, I use both but more functional. 2012/6/19 Nuno Job <nunojobpi...@gmail.com> > Do functional style if you feel like it, OO if you feel like it. > > It's your choice, nodejs lends itself to both. > > A lot of good nodejs developers do OO. A lot of good nodejs developers do > functional style. > > Ignore FUD, and all the benchmarks that consistently look at non > bottlenecks. > (If you are creating 1 million objects per second you are probably doing > something else wrong) > > Nuno > > > On Thursday, September 29, 2011 8:30:07 AM UTC-7, Giovanni Giorgi wrote: >>> >>> Hi all, >>> I am new to nodejs, even if I am a 37 super-nerd loving programming >>> languages. >>> >>> I know and love python, java, ruby, erlang, SmallTalk, bash, emacs-lisp >>> (less then other :-), coffescript, perl, Self and so on >>> >>> So I started to play with nodejs, too which was not yet in the "web >>> framework" collection of mine :) >>> >>> I have always OOP in python, Self and SmallTalk. >>> Making objects is fun. >>> >>> But after reading >>> >>> https://github.com/**spencertipping/js-in-ten-**minutes<https://github.com/spencertipping/js-in-ten-minutes> >>> >>> in particular "5.1 Why new is awful" and "5.2 Why you should use >>> prototypes", a lot of things in my head went wrong. >>> >>> I fear strong-OOP is not the better way of code in JavaScript and in >>> nodejs in >>> particular. >>> >>> Nodejs is callback-based. So a functional approach is better, and >>> should I avoid using class >>> inheritance? >>> >>> I like functional approach, but in my little experience it works quite >>> bad with high dynamic >>> languages, and javascript oddities seems not a good starting point. >>> >>> What is your experience (and suggestions)? >>> >>> --- >>> Gio's Blog http://gioorgi.com >>> >>> -- >> Job Board: http://jobs.nodejs.org/ >> Posting guidelines: >> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines >> You received this message because you are subscribed to the Google >> Groups "nodejs" group. >> To post to this group, send email to nodejs@googlegroups.com >> To unsubscribe from this group, send email to >> nodejs+unsubscr...@googlegroups.com >> For more options, visit this group at >> http://groups.google.com/group/nodejs?hl=en?hl=en >> > > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to nodejs@googlegroups.com > To unsubscribe from this group, send email to > nodejs+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en