3 ms·
If I'm not mistaken Angular 2+ also has this. It's named AOT compilation (ahead of time). Edit: so does Vue if you're using vueify (https://github.com/vuejs/vu
by alessioalex 9y ago
If I'm not mistaken Angular 2+ also has this. It's named AOT compilation (ahead of time).
Edit: so does Vue if you're using vueify (https://github.com/vuejs/vue/issues/4272 https://github.com/vuejs/vue/issues/4272).
- christophilus 9y agoIt's not the same, though. Those are compiling textual templates into executable JavaScript. React/Preact do this automatically, too. What Glimmer does is it converts your views into bytecode (not JavaScript) which can be streamed and run without a JavaScript compilation / parsing phase in the browser. Vue, React, and Angular views all ultimately are translated into JavaScript which has to be compiled / parsed in each browser.
- 1_player 9y agoI'll have a look at Glimmer later, but who executes this bytecode?
- dean 9y ago> They are instantly executable by a small VM written as a JS library Guess you have download the VM on initial page load.
- christophilus 9y agoYes. It's about 18KB of JavaScript.
- keda 9y agoglimmer-vm https://github.com/glimmerjs/glimmer-vm https://github.com/glimmerjs/glimmer-vm
- irrational 9y agoIs it more similar to Vue server-side rendering (https://vuejs.org/v2/guide/ssr.html https://vuejs.org/v2/guide/ssr.html)? Or are Glimmer and server-side rendering two different beasts?
- christophilus 9y agoTwo different beasts.