

Tech behind Klout.com - Node.js and Open Source - techloverm
http://corp.klout.com/blog/2011/10/the-tech-behind-klout-com/

======
maratd
_Plus, using JavaScript on both the server and the client made writing multi-
purpose code very straightforward._

You really don't want to mix server-side and client-side code. Although I use
the same library (mootools) on both the server and client, I keep the code
separate. The only exception has been a class that I wrote to dynamically
generate PDFs. That has been useful both in the browser and on the server.

~~~
shazow
Why not?

As always, this is a huge "it depends". Take game development for example,
it's very common for huge overlap between client code and server code, both
often written in the same language for this reason.

~~~
maratd
> Why not?

Because server code and client code do very different things. Once you start
using node.js you start to feel that real hard. Server code is accessing the
database, client code is rendering to screen, etc.

Mixing that is always a bad idea, even in games. You'll end up with spaghetti
code.

You will also probably have different guys working on server stuff and client
stuff. Keeping it separate will make things easier there too.

