Learn Sails.js - Part 0

von Manuel am 17.08.2025 um 12:00 Uhr

Welcome back! I hope you will enjoy the next few posts introducing the Sails.js web framework. To make it more fun I thought I make it into a little RPG like game. So let’s get started with part 0 which is more of a pre-stage to make your system ready for Sails.js.


Pre-Voyage Checklist: The Shipyard


The Captain’s Briefing (Background and Theory)

Welcome to the shipyard, future Captain. Before you can command a fleet, you must first understand the vessel. A modern web application is a complex machine, and building one from scratch using only raw materials is a monumental task. You would need to forge every screw, mill every plank, and weave every rope yourself. That is the world of coding without a framework.

This is where your master blueprint, Sails.js, comes in. Sails is a web framework. Think of it as a master-crafted ship kit. The hull’s design is already laid out, the key structural components are pre-fabricated, and there’s a logical set of instructions for assembling everything. This lets you focus on the important parts, the cargo you’ll carry, the routes you’ll travel, and the unique features of your ship, rather than on the basics of naval architecture.

The Engine Room: Node.js and npm Your ship will sail on the vast “Digital Sea,” which is powered by Node.js. Node.js is a runtime environment that allows you to run JavaScript code on a server, outside of a web browser. It’s the engine that will power your entire application.

Every engine needs parts, fuel, and tools. For Node.js, that supply store is npm (Node Package Manager). It’s the world’s largest software registry, the grand bazaar where you’ll acquire all the “packages” (pre-written code) you need, including the Sails.js framework itself.

The Master Blueprint: The MVC Architecture Sails.js, like many professional frameworks, is built upon a time-tested architectural pattern called MVC (Model-View-Controller). Understanding this is the single most important concept for your journey. It’s how your ship is organized.

By separating these three concerns, Sails keeps your code organized, scalable, and much easier to manage.


Key Concepts Checklist


Mission Log: Quest - “Sign the Ship’s Articles”

This quest ensures your development environment is correctly set up and you’ve understood the core principles.


Mission Debrief (Review & Outcomes)

Excellent work. You have successfully provisioned your shipyard. Your local machine is now a fully-featured development environment, equipped with the runtime, package manager, and framework blueprints necessary for the journey ahead.

Most importantly, you now understand the fundamental MVC pattern that governs our work. This separation of concerns is the key to building clean, powerful applications.

Your tools are ready. Your mind is prepared. The next step is to use those blueprints to construct your very first vessel.


Rewards & Promotion

Welcome aboard, Seaman. Your voyage begins now.