News for hackers. Stuff that matters.
Re:Microsoft Edge and Web Components by ihuman on Thursday July 16, 2015 @12:59AM (#9895543)
Does anyone have a simple definition/explanation of Web Components? The only descriptions I find online call them "reusable widgets or components in web documents," which is kind of meaningless since all code could be considered reusable.
Re:Microsoft Edge and Web Components by corysama on Thursday July 16, 2015 @03:25AM (#9895826)
Disclaimer: I am not a web dev.

The simplest explanation I've come across is that web components lets you create pockets of html, css, and JavaScript that are self-contained and, importantly, not affected by the actions of external css and JavaScript.

The browser vendors originally created it for themselves so that they could do things like build a standardized html5 video player interface using html but without worrying about you iterating over the internal elements in js or screwing up the buttons with css.

Re:Microsoft Edge and Web Components by acqq on Thursday July 16, 2015 @09:49AM (#9897123)
So it's a new way for the "Flash after the death of Flash"?
Re:Microsoft Edge and Web Components by justwannasing on Thursday July 16, 2015 @09:58AM (#9897183)
No. It's a reincarnation of what we should be using all along: XML
Re:Microsoft Edge and Web Components by marknutter on Thursday July 16, 2015 @01:55AM (#9895658)
The simplest and most straightforward explanation of Web Components is that they are a way for web developers to create new html tags instead of relying on the browser vendors to do so. For example, you're probably familiar with the <video> tag; it requires no additional dependencies to use, provided your using a browser that supports it, and its styling and internal logic is neatly encapsulated and hidden from the consumer. Web Components will enable you to create such tags and easily share them with the world.
Re:Microsoft Edge and Web Components by jfoutz on Thursday July 16, 2015 @01:13AM (#9895573)
It lets you bundle up the html, css and javascript in one place. Imagine a video player with css buttons and a video section. you include the component source then put in a <my-player/> tag somewhere. That's the gist anyway. kinda sorta like client side taglibs like you'd see in jsp pages.
Re:Microsoft Edge and Web Components by douche on Thursday July 16, 2015 @01:38AM (#9895622)
So it's like an ASP.NET MVC partial view, with css and javascript defined in the view cshtml file instead of in external files?
Re:Microsoft Edge and Web Components by jfoutz on Thursday July 16, 2015 @02:10AM (#9895685)
not so familiar with ASP.NET, but yeah that sounds about right. The key is it runs in the browser itself, rather than being a bundle that's compiled and moved around at build or run time.

you take all your standard html5 stuff, bundle it in one file, and serve that to any client that wants a video player. You can, of course, play minification games or whatever to reduce the number of files - but the pure form is, one include == one component.

Re:Microsoft Edge and Web Components by itaysk on Thursday July 16, 2015 @03:38AM (#9895855)
I was just going to write it's like ASP.NET Web Forms User Controls. Only that was server-driven.
Re:Microsoft Edge and Web Components by pjmlp on Thursday July 16, 2015 @05:02AM (#9896087)
Basically a way to package a set of HTML, CSS and JavaScript into a reusable table that can appear as if it was natively supported by the browser.

A new generation of web developers gets to rediscover desktop native widgets, 20 years later.