There is one thing that unites people who work on software: we like to create things that work. Nothing is more satisfying than finishing a feature or project that simply does what it was intended to do. When it comes to my side projects, I love learning new frameworks, technologies, and languages. But in the end, the most rewarding and satisfying part is finishing the project and releasing something to the wild. Let’s be honest, if you work full-time and worry about things like exercising, chores, and possibly sleeping – then you understand me when I say it is not always easy finding time to complete a side project. We can help ourselves by planning ahead and perhaps utilizing some fancy project management tools. But what about our technology stack? If our end goal is to finish and release our project, then it makes sense to pick a technology stack that is well-suited for rapid development.
I. What is Node.js exactly?
II. When you shouldn’t use Node.js
Before we move deeper into the awesome parts of Node.js development, let’s first draw the line where you should not be using Node.js.
You should not use Node.js if you are building an application that involves any CPU-intensive operations. Node.js is single-threaded, so having processes that take a long time to run on the server is going to cripple the performance of your application. Your application should not do any sort of processing of large data sets on the server. Either offload the work to your database or simply switch to a more appropriate platform.
Our application logic is now spread between both our front-end and our back-end; luckily for us Node.js developers, we get to use the exact same programming language for both ends. Most developers are well-aware of the cost of context switching. Having to refocus and recalibrate your mind to a new task, new language, and/or new problem often takes a developer several moments of valuable productive time. By reducing the distance between each context leap, we can more comfortably jump between tasks with much quicker recovery times.
IV. JSON – King of the Data Jungle
V. Modules – Just what you need, nothing more
A good rule of thumb for side projects is to keep it small and focused. That rule will help you make sure that you actually complete your project. This same concept is mirrored in Node.js projects – you will only be using modules that you actually need. This keeps your application extremely lightweight. Unlike other more enterprise-focused platforms, you won’t have tons of extra baggage that won’t ever be used. Your builds and deploys will be faster, your project will take up less space, and you will have peace of mind knowing that everything in your project is exactly what you need and nothing more. NPM, Node Package Manager, is a major selling point for Node.js applications. It gives you quick and easy access to all public Node modules with a selection of over 150,000 packages. Being able to reduce development time and utilize existing open-source software and tools has never been easier.
VI. Wrapping up
Node.js provides us with a fantastic application platform that really excels with web applications with high I/O requirements. If you decide to build a Node.js application for your next side project, try your best to build a lean web server API that minimizes the workload on the actual server. Node.js is incredibly accessible and it is relatively easy for a programmer to pick up and learn, so why not give it a shot?
VII. What is my next step?
I wanted to include a short list of some fantastic resources that helped me get a handle on Node.js.
https://thinkster.io/mean-stack-tutorial/ – This was by far the most helpful tutorial for me. The tutorial is structured nicely and covers a ton of extremely useful content. The tutorial is free but you can also pay extra to gain access to the source code and videos (when I used it I paid $25 for the source code, but it appears they have since switched to a $20 monthly subscription for all their tutorials).
http://www.toptal.com/nodejs/why-the-hell-would-i-use-node-js – This was a well-written article that helped me understand the strengths and weaknesses of Node.js.
If you want updates from me on my future blog posts or on my future projects, please sign up for my email list below!