Dart Essentials(讀書筆記)——這本書很是大篇幅都在談AngularDart,Zones概念沒談到
Dart Essentials
Getting Started
Practical Dart
- 爲什麼DocumentFragment需要clone後再加進文檔裏去?(p162的樣例沒有)
- Dart 1.9+:async + await
- element.onClick.listen( (evt){...} ); //<--- Stream對象?
- `part`
- num, int, double
The Power of HTML5 with Dart
- use JS:JsFunction.apply() JsObject.callMethod()
-
_jQuery = context['jQuery'];
- Dart Summit 2015? dart2js
- Completer?.complete(items); => .future()
- import 'dart:indexd_db' as idb; //可定義索引?有點像MongoDB
- event.preventDefault(); event.stopPropagation();
- WebAudio
- BiquadFilterNode?=> 分析器?
- typed_data
- SIMD(vector_math):Int32x四、Float32x4
- WebGL
- three.dart, StageXL*, Box2d & play_phaser
- Isolate在browser上用Web Worker實現?
Developing a Mobile App with Dart
- 300ms tap延遲:用meta viewport禁止
- transform-style: preserve-3d;
- *3D書架 with DeviceOrientation事件(.alpha/.beta/.gamma)
- GPS不精確:Kalman濾波?
Web Components with polymer.dart
- Web Components:Shadow DOM + Custom Elements + imports(M36+) + templates
- 代碼演示樣例:
-
var tpl = linkElement.important.querySelector('#id');
-
Node n = tpl.content.clone(true);
-
... targetDiv.createShadowRoot().append(n);
- document.registerElement('my-greeting', MyGreetingElement); <-- factory MyGreetingElement() => new Element.tag('my-greeting');
- MutationObserver*
- main() async { (await initPolymer()).run( (){...} );
- *一路數據綁定
-
@customTag('one-way-book')
-
class OneWayBookElement extends PolymerElement { ...
- 定製屬性:if repeat
- *二路數據綁定(Angular的簡單實現?)
- <core-list> 無限列表
AngularDart
- 3種bind:NgOneWay NgTwoWay NgAttr
- Angular 2.0:使用TypeScript的擴展AtScript辨析的?支持編譯到Dart?
- 性能話題
- digest loop:對model的每個變化?change會‘傳播’...
- 不要嵌套ng-repeat,致使scopes氾濫
- <li ng-repeat="t in tasks | filter:term | orderBy:p track by t.id">
- dont't excess Formatter ...
Server-side apps with Dart
- main()多個一個args參數而已
Testing and Profiling
- 操做符重載?operator ==(Vector v) => ...
- Mixins(略)
- 測試AngularDart:Protractor/WebDriverJS(沒有界面的瀏覽器)
Writing Native Extensions for the Standalone Dart VM
- 略
歡迎關注本站公眾號,獲取更多信息