Live data from Hacker News

Svelte – A UI framework that compiles into tiny standalone JavaScript modules

svelte.technology

171–180 of 236 posts

Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules

#173

TodoMVC is a useless benchmark for the problem that this claims to be addressing. The limits we're hitting with our applications now are with BIG applications, with many routes, many views, and lots of client side logic. We're talking hundreds of files (in some cases, thousands). Of course a framework, with it's fixed overhead, is going have a bigger payload for a tiny demo app like TodoMVC, than something like this…

Yeah the lack if a realistic benchmarking tool is a major part of this whole front end fatigue, is it just another project or can it realistically prove itself to be a real benefit for performance.

FWIW Rich Harris' other stuff is pretty solid: Ractive, Rollup, Bublé.

Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules

#174
post #139

Looks neat, but also like a non-standard implementation of Web Components, which, though slow coming, already have universal browser support with a small shim. What's the advantage of this over something like Google's Polymer library, which is a toolkit for rapidly creating reactive web components?

Polymer is an enormous library.

No, it's a little library. And smaller in Polymer 2.0. :)

Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules

#176
post #169

So I've just wrapped up using React + Redux and just begun to uneasily accept JSX. It makes me uneasy because React wraps up existing HTML with Javascript. Because it violates using existing, established standards that have truly stood the test of time and wasn't broken at all. Svelte really hits that sweet spot.

I believe most of the brokenness of current day frameworks comes from templates. Here is what you get by JSX being JavaScript: 1. Easy to write typechecking for the templates. The compiled template is just function calls (or well, factory function calls) and the typechecker can work with that. How many template language authors will write a typechecker for the template language? 2. Sane scope sharing - you can take a…

Thank you for the detailed answer, I have a few questions here but I think you've nailed it for the most part, I'm just trying to gauge how well I understood what you wrote.

1) what is meant by type checking in this context? do you mean that now that HTML is converted to JSX in JS context, you can test HTML as if they were Javascript Objects?

2) so the ease of importing functions to JSX + use of existing "encapsulation and modularization" (I'm not sure what this menas) libraries.

3) what makes it difficult to support it from templates point of view? JSX is easier because?

4) why is sandboxing harmful? how does giving developers compilers create sandbox fallacy?

With the last paragraph, you are saying that the lowest common denominators such as DOM diffing will become a common cross platform feature in all browsers?

Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules

#177
post #165

TodoMVC is a useless benchmark for the problem that this claims to be addressing. The limits we're hitting with our applications now are with BIG applications, with many routes, many views, and lots of client side logic. We're talking hundreds of files (in some cases, thousands). Of course a framework, with it's fixed overhead, is going have a bigger payload for a tiny demo app like TodoMVC, than something like this…

Are there any alternatives to TodoMVC out in the wild? I rather like https://github.com/staltz/flux-challenge myself, but I wonder if there are any other projects that are focused on more complex examples.

The 7-GUIs suite looks better, but so far only one JS framework implements it. The problem with more realistic benchmark apps (or suites) is that they require more effort to implement, so you have a selection bias towards easy-to-implement yet too-small-to-be-useful demonstrations like TodoMVC.

Something like a GmailMVC would be better.

https://github.com/eugenkiss/7guis/wiki

Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules

#179

I like the idea of abstractions that exist only in the source code and at compile time, and have zero runtime footprint. How does this compare to Google's Closure compiler and library? Does Svelte's compiler do anything that the Closure compiler cannot? Or how about running the source through a hygienic macro system like sweet.js and feeding the output of that to the Closure compiler? I ask because I'm skeptical of a…

But the google closure compiler have no concept of a tree of components and their lifecycle. The library is old, java-like and I never heard about someone using it :p

Don't quote me on this but I'm pretty sure gmail uses it. I'd say that's a pretty big endorsement.

Re: Svelte – A UI framework that compiles into tiny standalone JavaScript modules

#180
post #165

TodoMVC is a useless benchmark for the problem that this claims to be addressing. The limits we're hitting with our applications now are with BIG applications, with many routes, many views, and lots of client side logic. We're talking hundreds of files (in some cases, thousands). Of course a framework, with it's fixed overhead, is going have a bigger payload for a tiny demo app like TodoMVC, than something like this…

Are there any alternatives to TodoMVC out in the wild? I rather like https://github.com/staltz/flux-challenge myself, but I wonder if there are any other projects that are focused on more complex examples.

[deleted]
Post reply on HN