Introducing The NERD Stack
Don’t be MEAN! Be a friendly NERD!
During my 2 day Hackathon project and the subsequent short project phase at Hack Reactor, I needed an easy to use stack suited for agile development. Typically, people choose the popular MEAN Stack for this type of job. But since I dislike the idea of having to follow a pre-defined boilerplate with lots of overhead (just look at the Yeoman generators), I decided to start completely from scratch and not rely on any opinionated frameworks at all. Finally, I decided to choose the following stack, which is - in my opinion - very well suited for rapid prototyping while guaranteeing high-reliability, scalability and performance (so many buzz words in one sentence -wohahaha!).
Without further blabla, here is the stack:
Node.JS is very well suited for rapid prototyping. Since I needed to have the ability to crawl the [BitTorrent Mainline DHT network](www.bittorrent.org/beps/bep_0005.html), a platform with high I/O capabilities was the perfect choice. The event-oriented architecture Node.JS provides makes it the perfect tool for the job.
Express makes it really easy to write simple server side code. During the development phase, I was inspired by the design philosophy behind the website of the npm-registry. The basic idea is to prevent your app from being over-engineered by removing unnecessary layers of abstraction. For instance, a MVC architecture with client-side routing is a great choice for web apps that need to be super-responsive, but for a simple, multi-page Hackathon project, deciding to render sites on the server side is typically a better choice than having to integrate “just another tool”. Therefore, my choice was to have some sort of model and a router. Hogan.js would take care of rendering my template.
Redis is a great choice for applications that need to be blazingly fast. Nevertheless, it might not always be the best choice if you expect to generate lots of data. Keep in mind that all your data has to fit in memory at all time. Redis supports persistence by periodically writing to disk. Nevertheless, it is still a in-memory database. If you keep this in mind, you are unlikely to experience any problems because of Redis.
D3 is the de-facto industry standard for data-driven documents, aka websites with neat charts. I chose it since the popular DataMaps library is based on it. It has a significant learning curve to master it, but after that, it gives you a lot of power.