Thursday, October 25, 2012

Use Web Components Today with Dart

In a new article posted to the Dart homepage, engineer Siggi Cherem shows you how to build with Web Components using Dart. Web Components are ushering in the "declarative renaissance" for modern web app development, providing encapsulation of structure, styles, and behavior.

"But it'll be years before I can use Web Components!?!" you exclaim. Not true! Thanks to Dart you can compile Web Components into today's HTML and JavaScript.

In the article, Siggi writes:

Dart web components provide templates, data binding, and encapsulation, to help you write web applications at scale. An early version is available in the dart-web-components project. 
Many UI frameworks exist for writing web apps in JavaScript—for example Backbone.jsEmber.js, and AngularJS. Recently, the web community has been pushing to include some of the common ideas of these frameworks directly into the browser platform. As a result, browsers have added features like shadow DOM and web components, and other experimental and cool ideas have been proposed, such as model-driven views (MDV). 
Dart web components combine the ideas of web components and MDV, adapting them to work well with Dart. Dart web components take advantage of advanced browser features when possible, emulating missing features when necessary.

There's more work to be done, with support for Web Components in Dart just getting started. Now is a good time to try out the project and talk to us in the Dart mailing list or ask questions on Stack Overflow.