|
Node.js has brought the JavaScript revolution of the past few years to the server. Java-
Script, it turns out, has uses beyond the client, and many techniques for effective clientside
development are applicable on the server side as well. Front-end developers can
use their existing skills to work with Node today.
Depending on who you ask, there are several different definitions of “front-end developer”.
Some of us deal only with client-side languages, relying on other developers to
provide data and infrastructure on the server. Others create the server-side tools we
need to make the front-end function, things like templates or REST interfaces. What
we have in common is that we all probably understand JavaScript, and we are all probably
the people responsible for implementing it on the sites we work on.
Even if you never touch server-side development in your work, Node.js is something
worth your attention as a front-end developer. The arguments for using Node are welldocumented,
and you’re likely to hear them in the same breath you first hear it mentioned:
it’s fast, it’s scalable, it’s evented, it’s already got an enthusiastic community of
developers building tools. However, if you’re already used to coding in JavaScript, the
most important reason to consider Node for new sites is a more subjective one: it simply
gets out of your way and lets you work.
If you don’t often touch server-side development, the process of setting up an application
from scratch, organizing files, setting permissions, and doing all the other configuration
necessary before you start actually coding might be a bit intimidating. The
nice thing about configuration, of course, is that it isn’t very hard. It just requires you
to remember all of the steps, and in which order to execute them to be successful. As
someone who codes websites—not someone who administers web servers—the setup
bit might be kind of a painful exercise. This is the great thing about Node. You can do
a lot of setup by just writing JavaScript. Adding functionality can be as easy as importing
a module. Your paths, your permissions, your session tracking and data persistence are
all configured by just writing JavaScript. There are no obscure menus to track down or
fragile sets of instructions. You just begin writing code.
|
|