官术网_书友最值得收藏!

Building web interfaces with Dart

The dart:html package is not the only option for building web interfaces with Dart. The main contenders are Polymer and Angular:

  • Polymer (https://www.polymer-project.org/) is a JavaScript framework for creating reusable web components (using the Web Component standard) that are encapsulated and inter-operable. They take the form of custom HTML elements. For example, the dialogs in this chapter could be made into web components. To use them in a page, we would use the tags <DialogConfirm> and <DialogWordCount>, which would avoid a set of nested div elements. Polymer.dart is the Dart version of the framework and is available from pub.
  • Angular (https://angularjs.org/) is a framework for dynamic data views and is a giant in the JavaScript world. Again, there is a Dart version, called Angular.dart. The forthcoming Angular 2 will be written in Typescript and will support both JavaScript and Dart.

Whichever framework or package is chosen, it is likely to use dart:html classes at some point, so it is worthwhile to be familiar with them. Not every developer or application needs a framework, so be pragmatic!

主站蜘蛛池模板: 山丹县| 水城县| 盐池县| 紫阳县| 华安县| 万盛区| 玉屏| 宁蒗| 东平县| 敦煌市| 麦盖提县| 社会| 阜城县| 德化县| 蒙阴县| 佛山市| 荔浦县| 通许县| 泰兴市| 金乡县| 大理市| 拜城县| 县级市| 探索| 祁连县| 白水县| 大足县| 宁乡县| 安徽省| 平罗县| 洪江市| 安吉县| 庆阳市| 吉水县| 珲春市| 交城县| 巫山县| 卢龙县| 介休市| 环江| 泸州市|