Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Web components seems bizarre to me. Web developers are moving away from the multiple requests per page model, towards sprites and asset packaging. Web components seem like a step backward, especially given that all of the web frameworks have robust templating solutions.

Am I missing some key need here?



Looking at the Web Components overview it doesn't add any addition request unless you build it that way. It basically seems to add HTML templating and a cleaner API for working with events and modifying nodes.


And scoped styles (including only optionally inheriting styles from the parents) and events, which seem like they could be phenomenally helpful for widget libraries. You have to be careful with site-wide CSS to avoid styling, for example, a jQueryUI widget. With this, there would be zero conflicts, unless you explicitly allow them.


If the browser knows that the tabs.html is a reusable component that does not have changing content, it can cache it very intelligently. Also if someone builds a tabs component and hosts it on foo.com/999/tabs.html (CDN) which you use, your visitors may already have it downloaded and cached.

So I think in the long run, something like this would be a better solution.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: