Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comparisons to other libraries #18

Open
gr0uch opened this issue Jul 10, 2016 · 11 comments
Open

Comparisons to other libraries #18

gr0uch opened this issue Jul 10, 2016 · 11 comments
Labels

Comments

@gr0uch
Copy link

gr0uch commented Jul 10, 2016

I'm curious to hear how this is different from other libraries, such as HTMLBars.

@antonmedv
Copy link
Owner

antonmedv commented Jul 10, 2016

Monkberry is more like React or Angular.

@antonmedv
Copy link
Owner

antonmedv commented Jul 10, 2016

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)();
}

@antonmedv
Copy link
Owner

antonmedv commented Jul 10, 2016

Size matter to:

$ jsize htmlbars
htmlbars     41.84 kB (gzip)

@gr0uch
Copy link
Author

gr0uch commented Jul 13, 2016

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: emberjs/ember.js#10454

@uhjish
Copy link

uhjish commented Jan 8, 2017

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?

@leeoniya
Copy link

leeoniya commented Jan 8, 2017

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.

@uhjish
Copy link

uhjish commented Jan 9, 2017

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.

@antonmedv
Copy link
Owner

@uhjish sveltejs is pretty awesome, but monkberry was first 😃

@leeoniya
Copy link

leeoniya commented Jan 9, 2017

and sveltejs got to these first:

#35 each-else: sveltejs/svelte#122
#37 keyed updates: sveltejs/svelte#209
#2 SSR: sveltejs/svelte#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

[1] https://en.wikipedia.org/wiki/Minimum_viable_product

@uhjish
Copy link

uhjish commented Jan 9, 2017

@Elfet Imitation is the sincerest form of flattery; forking is a close second ;-).

@antonmedv
Copy link
Owner

@leeoniya svelte is awesome and have much more "media" power, better marketing. :)

I have plans to add keyed updates in future, btw.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants