<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Auren</title>
    <description>The latest articles on Forem by Auren (@aurentechlab).</description>
    <link>https://forem.com/aurentechlab</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3596195%2F46005b6a-841a-4d30-99fb-2b018d4c94b6.png</url>
      <title>Forem: Auren</title>
      <link>https://forem.com/aurentechlab</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/aurentechlab"/>
    <language>en</language>
    <item>
      <title>Scaffolding, Frameworks, and Build Tools: A Simple Guide to What They Are</title>
      <dc:creator>Auren</dc:creator>
      <pubDate>Tue, 04 Nov 2025 16:26:05 +0000</pubDate>
      <link>https://forem.com/aurentechlab/scaffolding-frameworks-and-build-tools-a-simple-guide-to-what-they-are-4aak</link>
      <guid>https://forem.com/aurentechlab/scaffolding-frameworks-and-build-tools-a-simple-guide-to-what-they-are-4aak</guid>
      <description>&lt;p&gt;In modern frontend development, we interact with "tools" every day: Vite, Next.js, Turbopack, &lt;code&gt;create-vite&lt;/code&gt;, &lt;code&gt;pnpm init&lt;/code&gt;... These concepts pop up endlessly, and it's easy to get confused.&lt;/p&gt;

&lt;p&gt;Many people (especially beginners) often wonder: Next.js and React are both frameworks, so what's the difference? Are Vite and &lt;code&gt;create-vite&lt;/code&gt; the same thing?&lt;/p&gt;

&lt;p&gt;This article will serve as my learning notes to clearly break down the relationship between these three core concepts: &lt;strong&gt;Scaffolding&lt;/strong&gt;, &lt;strong&gt;Framework&lt;/strong&gt;, and &lt;strong&gt;Build Tool&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Scaffolding: Your "Project Starter Tool"
&lt;/h2&gt;

&lt;p&gt;Everything begins with scaffolding.&lt;/p&gt;

&lt;p&gt;Simply put, &lt;strong&gt;scaffolding is your "project starter tool."&lt;/strong&gt; Its core task is to generate the basic directory structure, install core dependencies, and configure the build tools and development environment for you.&lt;/p&gt;

&lt;p&gt;We can classify scaffolding into three types based on how "opinionated" they are and what they deliver:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;1. Heavyweight (Dedicated Scaffolding)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Example:&lt;/strong&gt; &lt;code&gt;npx create-next-app&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Characteristics:&lt;/strong&gt; This type of tool builds a &lt;strong&gt;complete and dedicated&lt;/strong&gt; setup for a &lt;em&gt;specific&lt;/em&gt; framework. It generates the directories, routing, configuration, and sample code. It makes all the important decisions for you. You just need to "fill in the blanks."&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;2. Medium-weight (General-Purpose Scaffolding)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Example:&lt;/strong&gt; &lt;code&gt;pnpm create vite&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Characteristics:&lt;/strong&gt; The core of this tool is to deliver a &lt;strong&gt;build tool&lt;/strong&gt; (like Vite). It sets up the build configuration and base directories, then lets you &lt;strong&gt;choose&lt;/strong&gt; the framework you want (e.g., React, Vue, Svelte, Vanilla, etc.). It's more general-purpose and flexible.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;3. Lightweight&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Example:&lt;/strong&gt; &lt;code&gt;pnpm init&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Characteristics:&lt;/strong&gt; It does only one thing—it creates a &lt;code&gt;package.json&lt;/code&gt; file. This merely declares "this is a project" and doesn't care about your framework or build tool.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why Do We Need Scaffolding?
&lt;/h3&gt;

&lt;p&gt;In a production environment, &lt;strong&gt;the vast majority of modern frontend projects (especially those using a framework) are created by scaffolding.&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Why not "all" projects? Many backend projects (Go, Python), ops scripts, or very simple pure HTML/CSS static pages might just start with &lt;code&gt;pnpm init&lt;/code&gt; or even an empty folder. They don't rely on complex frontend scaffolding.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  2. Framework: The "Soul" and "Main Body" of the Project
&lt;/h2&gt;

&lt;p&gt;Projects created by scaffolding (aside from &lt;code&gt;pnpm init&lt;/code&gt;) are essentially built around a framework.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The framework is the 'soul' and 'main body' of the project.&lt;/strong&gt; It's the core dependency itself (e.g., the React, Vue, Next.js, or Hono code).&lt;/p&gt;

&lt;p&gt;However, there's a crucial distinction between frameworks: their &lt;strong&gt;Degree of Constraint (Opinionated vs. Unopinionated).&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;1. Opinionated Frameworks&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Examples:&lt;/strong&gt; Next.js (frontend), Nest.js (backend)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Characteristics:&lt;/strong&gt; These frameworks are highly "opinionated" (or "constrained"). They provide a complete set of "best practices" for everything from routing and data fetching to state management. Developers simply &lt;strong&gt;follow their conventions to fill in content.&lt;/strong&gt; The development experience is unified, but flexibility is lower.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;2. Unopinionated Frameworks (or Libraries)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Examples:&lt;/strong&gt; Vue/React (frontend), Koa (backend)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Characteristics:&lt;/strong&gt; These frameworks (or libraries) are "unopinionated." They only provide core functionality (like view rendering or middleware). They &lt;strong&gt;allow developers to make flexible adjustments&lt;/strong&gt; during development, such as freely combining third-party libraries for routing, state management, etc.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;create-next-app&lt;/code&gt; (heavyweight scaffolding) delivers an "opinionated framework." In contrast, &lt;code&gt;create-vite&lt;/code&gt; (medium-weight scaffolding) typically lets you choose an "unopinionated framework" (like React) so you can build the rest of the ecosystem yourself.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Build Tool: The "Engine" and "Glue"
&lt;/h2&gt;

&lt;p&gt;Before we explore its relationship with scaffolding, we must first clarify: &lt;strong&gt;what exactly is a build tool?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Simply put, &lt;strong&gt;the build tool is the project's "engine."&lt;/strong&gt; It works behind the scenes to handle all the complex work of code "compilation" and "optimization." Its main responsibilities include:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Code Transformation:&lt;/strong&gt; Converting modern code that browsers don't understand (like TypeScript, JSX, SCSS, Vue Single File Components) into standard code that browsers &lt;em&gt;can&lt;/em&gt; read (JavaScript, CSS).&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Dev Server:&lt;/strong&gt; During development (&lt;code&gt;pnpm dev&lt;/code&gt;), it provides a high-speed development server and enables Hot Module Replacement (HMR), allowing us to see code changes in the browser instantly. This greatly improves the development experience (DX).&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Bundling &amp;amp; Optimization:&lt;/strong&gt; For production (&lt;code&gt;pnpm build&lt;/code&gt;), it bundles all our code modules, minifies them, and performs "tree-shaking" to remove unused code. It ultimately generates the most efficient, smallest static files for deployment.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Vite, Webpack, esbuild, and Turbopack are all top contenders in this role.&lt;/p&gt;

&lt;p&gt;As you can see, configuring these build tools and frameworks is extremely complex. &lt;strong&gt;The core value of scaffolding is to save developers from worrying about this configuration by providing a set of "best practices."&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Therefore, the scaffolding you choose almost always determines the build tool you will use.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Key Point: Choosing a scaffolder is equivalent to choosing the build tool it's bundled with.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This naturally leads to the two most common patterns we see when creating projects:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Pattern 1: Scaffolding Name = Build Tool Name&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Example:&lt;/strong&gt; &lt;code&gt;pnpm create vite@latest&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Logic:&lt;/strong&gt; "Hello, I need to start a project centered around the &lt;strong&gt;Vite build tool&lt;/strong&gt;. Please start one for me (and by the way, ask me which framework to use)."&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Pattern 2: Scaffolding Name = Framework Name&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Example:&lt;/strong&gt; &lt;code&gt;npx create-next-app@latest&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Logic:&lt;/strong&gt; "Hello, I need the &lt;strong&gt;Next.js opinionated framework&lt;/strong&gt;. Please install everything I need (including its built-in build tool, like Turbopack or Webpack)."&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  4. The Trend: Why &lt;code&gt;pnpm create&lt;/code&gt; Instead of &lt;code&gt;npm install -g&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Finally, let's talk about the trend in &lt;em&gt;how&lt;/em&gt; we use scaffolding.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;The Old Way (Global Install):&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;code&gt;npm install -g @vue/cli&lt;/code&gt; (First, install globally)&lt;/li&gt;
&lt;li&gt; &lt;code&gt;vue create my-project&lt;/code&gt; (Use your locally installed version)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Problem:&lt;/strong&gt; If you installed &lt;code&gt;@vue/cli&lt;/code&gt; six months ago, you're now creating a six-month-old template. You have to constantly remember to &lt;code&gt;npm update -g&lt;/code&gt;, which is a hassle.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;The New Way (Online Invocation):&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;code&gt;pnpm create vue@latest&lt;/code&gt; (or &lt;code&gt;npx create-vue@latest&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How it works:&lt;/strong&gt; &lt;code&gt;pnpm create&lt;/code&gt; (which is like &lt;code&gt;pnpm dlx&lt;/code&gt;) or &lt;code&gt;npx&lt;/code&gt; &lt;strong&gt;temporarily&lt;/strong&gt; downloads the &lt;code&gt;create-vue&lt;/code&gt; package from the npm registry, runs it, and then &lt;strong&gt;discards it.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Benefit:&lt;/strong&gt; This 100% guarantees that you are using the &lt;strong&gt;latest version&lt;/strong&gt; of the scaffolding template every time you create a project.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;I hope this summary helps you fully understand the relationship between these three concepts:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Framework:&lt;/strong&gt; The "soul" and "main body" of the project.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Build Tool:&lt;/strong&gt; The "engine" that drives the project.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Scaffolding:&lt;/strong&gt; The "launcher" that assembles the "framework" and "build tool" together according to "best practices" and delivers them to you.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The next time you type &lt;code&gt;pnpm create ...&lt;/code&gt; in your terminal, you'll have a much clearer picture of what's happening behind the scenes.&lt;/p&gt;




&lt;p&gt;This article is a summary of my notes from my learning process. As English is not my first language, &lt;strong&gt;if there are any omissions or errors, I warmly welcome feedback and corrections in the comments!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>tooling</category>
      <category>javascript</category>
      <category>frontend</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
