Open gr0uch opened 8 years ago
Monkberry is more like React or Angular.
Another big difference is what Monkberry does not use eval
or analog new Function
to create template.
From HTMLBars source:
export function template(templateSpec) {
return new Function("return " + templateSpec)();
}
Size matter to:
$ jsize htmlbars
htmlbars 41.84 kB (gzip)
Hmm, I'm not sure if that is the case, the runtime is quite small.
Also, the compiled template looks to implement a similar concept to what monkberry does, build dom code from a template string, especially the build
function: https://github.com/emberjs/ember.js/issues/10454
On the same note, how does this compare to sveltejs? Both seem to compile templates down into optimized vanillaJS and html... Is the compiled code generated by monkberry stand-alone or does it require a runtime?
from http://monkberry.js.org/docs/installation it does require a runtime. but the runtime is 1.25k min/gz, so pretty much negligible. the size of the compiled code would be a much better comparison though.
makes sense, and the --as-module compile leads me to believe that it can build self-contained ES6 modules, which could again be composed into optimized apps with a bit of tree-shaking ala rollup or webpack2... neat.
@uhjish sveltejs is pretty awesome, but monkberry was first 😃
and sveltejs got to these first:
https://github.com/monkberry/monkberry/issues/35 each-else: https://github.com/sveltejs/svelte/pull/122 https://github.com/monkberry/monkberry/issues/37 keyed updates: https://github.com/sveltejs/svelte/pull/209 https://github.com/monkberry/monkberry/issues/2 SSR: https://github.com/sveltejs/svelte/issues/196
...maybe others
at the end of the day what matters is what a lib offers today, not who was first to an MVP [1]. for what it's worth, i consider sveltejs to also be an mvp due to how many use cases seem to require some form of "well yeah" work-arounds :P
@elfet Imitation is the sincerest form of flattery; forking is a close second ;-).
@leeoniya svelte is awesome and have much more "media" power, better marketing. :)
I have plans to add keyed updates in future, btw.
I'm curious to hear how this is different from other libraries, such as HTMLBars.