Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Web Components vs. Widgets: Is there a difference?

I recently starting working with Ember.js, and I've been introduced to web components. I've used jQuery UI widgets before, and they seem like the same thing. Is there a difference between a web component and a widget, or are they more or less the same thing?

like image 603
EmptyArsenal Avatar asked Nov 19 '13 21:11

EmptyArsenal


1 Answers

Web Components is an umbrella term for a group W3 standard technologies composed of: Custom Elements, Shadow DOM, HTMLImports, and HTMLTemplates. These four specs working in concert form Web Components, and afford you all the abilities old school UI libraries like jQuery UI or Ember do, while allowing you to do so in a standard package browsers will natively understand.

One huge benefit, is that when you use Web Components, it makes it far easier for the browser to keep your code/app on the "fast path". The fast path, is the accelerated portions of the browser that are able to run as fast as possible and be optimized by underlying mechanisms like the JS engine's JS-to-native code compilation JIT, and low-level DOM systems that minimize things like the import of assets, UI reflows, and layout recalcs.

Here are two libraries that make development of Web Components even easier: http://x-tags.org/ & http://www.polymer-project.org/

like image 180
csuwldcat Avatar answered Oct 16 '22 14:10

csuwldcat