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

It's like XAML for the web. I can't wait to write some SPAs with it.


You should check out custom elements and Polymer: http://www.polymer-project.org/

WinJS looks like another soon-to-be-legacy wrapping framework. It doesn't use Shadow DOM, or allow developers to create new elements, which means that you end up with div-soup and important APIs and state that should be part of the view are in separate objects.

Because of this, WinJS will have a hard time interoperating with other wrapping frameworks like Angular, Ember, GWT, Ext-JS, etc.

Custom elements and Shadow DOM are hugely important for composable web applications. At this point, for SPAs, I wouldn't use anything that doesn't support them, even at the cost of IE8 support.


Web Components are on their "Watch List" at the end of their roadmap[1], but the language seems to be rather dismissive unfortunately.

[1]: https://github.com/winjs/winjs/wiki/Roadmap


Just wanted to point out that can.Component[1] is a custom element implementation that does support IE8.

[1]http://canjs.com/docs/can.Component.html


Unless I'm reading something wrong, that doesn't look like W3C custom elements ( http://www.w3.org/TR/custom-elements/ ), but CanJS's own system for recognizing custom tag names, like Angular directives. The docs even say "Currently, this only works within can.Mustache templates."

W3C custom elements allow the browser to still parse the document, and when it encounters a tag that has been registered with document.register() it calls user code to create construct element. By having the browser be in charge of parsing and element construction, custom elements work without a framework, and when you modify the DOM via things like innerHtml.

Approaches like Angular directives, and I'm guessing CanJS components, usually break down when the DOM is modified outside of certain blessed APIs.


A finalised Web Components spec and broad browser support cannot come soon enough...


> It's like XAML for the web.

Isn't XAML just HTML (declarative markup, with some default behavior, with most behavior defined through linked code in a more-traditional programming language) for the .NET stack?

So wouldn't XAML for the web just be HTML?


At a very high level, sure.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: