Note 1: A French version of this article is available.

Since the release of its version 3 in April 2019, the Svelte “framework” is more and more talked about. Due to its lightness and its approach being at odds with the main frameworks like React or Angular, the rising star developed by Rich Harris promises you simplicity and speed for a better user and developer experience. And you, will you be tempted by Svelte.js?

Note 2: This article focuses on the non-technical side of Svelte.js. For more technical points, you can refer to the Svelte Crash Course or to my Pomodoro application POC (links at the end of the article).


A Little Bit of History to Begin With

Rich Harris, front developer at the New York Times, in his quest for performance and good user experience, following a Tweet from Mike Taylor published in 2012, finally realized that “removing a JPEG to save loading time” is not equivalent to removing the same size of JavaScript.

So in 2016, he started a small experiment. His idea: write a JavaScript compiler that would produce quality code, be as light as possible and without abstraction of the DOM, for a super-fast loading time and very fast performance. Everything goes very quickly. In mid-November 2016, he made his first commit; four days later, the first beta is available, and ten days after this beta, on November 26, 2016, he published the first blog article detailing his concept: Svelte was born. The v1.0.0 arrives three days after this post. Then, during a big cleanup, v2.0.0 was released in April 2018, and a year later, in April 2019, a complete overhaul allowed the release of version 3.0.0.

It is with this version 3.0.0 that Svelte.js begins to gain importance, to be talked about, and to slowly initiate a fundamental change in the JavaScript world.


But Then Is It a Framework or a Compiler?

Good question. As a matter of fact, it’s a bit in between, at least compared to the currently popular definition of technical framework.

Svelte offers a real lightweight development framework, with powerful functionalities and syntactic sugar to facilitate the developer’s work, which therefore makes it a kind of framework.

However, Svelte has its own syntax, which certainly created some irony on Twitter with the satirical idea of SvelteScript launched by Evan You, the creator of Vue.js. But this Svelte code is then compiled into vanilla JavaScript by Svelte (which therefore makes it a compiler). In short, Svelte is at the border.


#svelte #javascript #software-development #sveltejs #programming

Svelte.js — An Introduction to the Compiler as a Framework
2.75 GEEK