To build a web app is to wield these libraries and architectural patterns, usually several at a time. And this means learning the libraries and architectural patterns, which, for something like AngularJS, can be a real fucking chore. Learning aside, it can also mean building a web app that is bloated with library code. This is code that will eventually need to be parsed and interpreted by a browser, or, in the case of Node, by a server. That parsing can be expensive and time-consuming.
Frameworks are pretty useful, however. They provide standardization, simplification, and abstraction. Programmers write less code and, crucially, less complex code. As a result, they theoretically make less mistakes. In particular, frameworks often provide ways of dynamically updating webpages without manipulating HTML directly—and this is how webpages become fullon web apps in the first place.
That’s the pitch, anyway.
This is what Svelte offers: a compiler capable of analyzing source code, including that contained in outside frameworks, and carving away features that aren’t actually used by the current web application. The result are small, relatively lean modules.
“Existing frameworks tend to be large enough that your application becomes slow to start up on mobile phones, especially on Android, which is where the bulk of market growth is happening,” Harris told InfoWorld. “Svelte solves these problems by removing those abstractions. The hard work happens at compile time rather than run time—it spits out highly optimized low-level DOM manipulation code specific to your application.”
I guess the catch is that, while this may simplify things for the browser tasked with running the code, for the developer it’s yet another framework. Part of where things can get really messy is when we start dealing with build tools, a subcategory of framework used for managing code dependencies and packaging code up for IRL deployment. I haven’t totally figured out how Svelte fits into all of that, but am willing to give it a try.
[Another level that will make debugging more difficult.]