4 ms·
As always, my main concern with this is traction. Will this be well supported, with a good community, 4 years down the line? I know React will, just because of
by Tankenstein 9y ago
As always, my main concern with this is traction. Will this be well supported, with a good community, 4 years down the line? I know React will, just because of the massive amounts of business depending on it. When building something real, i have to think about this because i need to be able to hire developers and actually develop my product instead of rewriting it.
That aside, the idea of svelte is cool, and i'm happy they're continuing to build on that. Excited to see what comes out of this!
- gedy 9y agoI think the big benefit here (and most of Rich Harris's projects) is less "will this be the next big thing?" as it is pushing the client-side app world forward with new ideas and questioning status quo. Rich balances these "wild ideas" with solving practical problems and I'm always impressed.
- mlsarecmg 9y agoAs much as i want to like it, i have troubles thinking of templates as something that questions the status-quo. The other big thing seems to be loading effort, but react has gotten so small (react+react-dom = 29kb, react+react-dom-lite 15kb, preact-compat 4kb), there's not really an impact any longer. And as for performance, could Svelte even approach something like the Sierpinski demo - something that would allow React to finally breach the gap between native and web performance? When look at fiber and react-reconciler, it seems to me react is already contemplating the future. The reconciler especially.
- gedy 9y agoSvelte is not "templates" (i.e. client-side), it compiles to JS modules
- dmitriid 9y agoWhatever it compiles down to in the end, it's stringly-typed templates with a custom syntax and weird assumptions about code that break everything you know about Javascript: scoping rules, variable declarations etc.
- gedy 9y agoOkay, but JSX is not 'just JavaScript' either - it's a DSL embedded in JS. You could make the same argument that Svelte is 'just HTML' with a script block, style block etc.
- mlsarecmg 9y agoLike typescript, flow or even es-next. An optional DSL that transpiles to pure javascript isn't an obstacle to programming. A string-template with an arbitrary syntax is an obstacle on the other hand.
- Touche 9y agosvelte templates compile to "pure javascript".
- mlsarecmg 9y agoAll template engines do. JSX doesn't get compiled but transpiled which makes all the difference. Therefore it works with the language, uses latest es-drafts without problems, is 100% typesafe as it can work with other supersets like TS or flow, it also doesn't rely on dependency injection and all the other annoyances. The biggest reason for me to prefer it: JSX is a simple but elegant solution to a decades old problem. A function signature was all it took to allow it to become cross platform and independent of the browser. A template engine comes at the expense of simplicity and flexibility. It needs so many abstraction and circumventions to function, injecting scope, evals, parsers, foreign syntax ... and for what, it most certainly doesn't make things easier.
- dmitriid 9y ago
- rich_harris 9y agoYou mean this Sierpinski demo? http://svelte-sierpinski.surge.sh/ http://svelte-sierpinski.surge.sh/ Ok, I'll level with you — that's not actually doing the same thing as the Fiber version. But that's it's basically impossible to accidentally slow down your Svelte app in the same way as the Fiber demo depends on. Fiber doesn't really speed things up so much as it prevents bad code slowing things down. The innovation isn't templates (though these aren't your grandad's templates), it's compiling those templates to lean, memory-efficient JS code that doesn't depend on virtual DOM reconciliation or anything like that.
- mlsarecmg 9y agoThe whole point is the artificial slowdown. Taking it out makes it meaningless, it prints a few blue bubbles. Scheduling is and always will be the biggest bottleneck. It is that kind of innovation that keeps react relative. As for a lean dom representation, i have never seen or heard of memory related problems regarding v-dom. And won't byte-code make it leaner in any case? React-compiled is already being tested.
- vanderZwan 9y ago"lean" is not limited to memory though - walking down the vdom reconciliation tree can incur get some pretty large overheads in terms of nested JS calls, just to decide that only a few buttons have to change. PureComponents and things like that are meant to help with this, but it still can take quite a bit of engineering effort to get this right. Mind you, I don't actually know if Svelte avoids this problem, but a statement like "doesn't depend on virtual DOM reconciliation or anything like that" kind of implies that it defaults to less work.
- jondubois 9y agoOh yeah I forgot to factor in the irrefutable fact that Rich is a genius and everyone else who tried building a full stack framework before him was an idiot.
- whome2 9y agoMassive amounts of business were also built on Angular 1.x but it is no longer supported. To be honest, I am tiring of seeing a new javascript framework everyday. I am pretty sure I saw a post for something called StimulusJs in the last hour and now this.
- hluska 9y agoSorry, but that isn't correct. Angular 1.x had a release just over a week ago. 1.6.8 was released on December 21, 2017. https://code.angularjs.org https://code.angularjs.org
- RobertRoberts 9y agoI think he is implying that since Angular 2 is out, 1 is guaranteed to be gone, and no longer supported in the future. Who would intentionally use an older version of a framework, where the upgrade path breaks compatibility? Angular 1.x is in essence, dead. It's just going to take a long time to go away.
- azangru 9y agoStimulus.js is first and foremost for Rails devs. Not very interesting for the rest of us.
- digitaltrees 9y agoYou can use it with Turbolinks without rails. I have seen elixir and laravel devs using Turbolinks, not sure if they will adopt stimulus too but I suppose they could.
- digitaltrees 9y agoActually the nice thing about stimulus is that it is deliberate in ignoring the hype cycle. It works with Turbolinks and rails core to add the small but missing interaction from a traditional ssr framework.
- Tankenstein 9y ago
- nailer 9y agoI think I've been using Rixh's previous project, Ractive, onr of the first virtual DOM implementations, for 4 years now. It has a decent community and good stack overflow love.
- kelvin0 9y agoAsk not what your framework can do for you, but rather what YOU can do for your framework.