can any one give me some idea about difference between polymer,x-tag and vanilla js ?
I have used polymer in my project, but i want comparison of polymer,x-tag and vanilla js.
can any one give me some idea about difference between polymer,x-tag and vanilla js ?
I have used polymer in my project, but i want comparison of polymer,x-tag and vanilla js.
On
Web Components is the native implementation in the browsers. Polymer is a library that act as a very thin layer on top of the Web Components technologies. X-Tag is another library that is even thinner because it only relies on one of the four Web Components technologies.
I've written an article about that: http://pascalprecht.github.io/2014/07/21/polymer-vs-x-tag-here-is-the-difference/
VanillaJS only means using web-components without any framework/wrapper in pure JS.
You have to register your custom-element, stamping out the element and taking care of data-binding yourself.
Both
x-tagandPolymerprovide a convenient and opinionated wrapper around web-components that greatly reduce boilerplate code.IMHO the
Polymerlibrary provides the most declerative approach (regarding data-binding, defining templates, etc)This is how it looks like with x-tag:
This is how it would look like with Polymer: