OLD | NEW |
1 Sky | 1 Sky |
2 === | 2 === |
3 | 3 |
4 Sky is an experimental, high-performance UI framework for mobile apps. Sky helps | 4 Sky is an experimental, high-performance UI framework for mobile apps. Sky helps |
5 you create apps with beautiful user interfaces and high-quality interactive | 5 you create apps with beautiful user interfaces and high-quality interactive |
6 design that run smoothly at 120 Hz. | 6 design that run smoothly at 120 Hz. |
7 | 7 |
8 Sky consists of two components: | 8 Sky consists of two components: |
9 | 9 |
10 1. *The Sky engine.* The engine is the core of the system. Written in C++, the | 10 1. *The Sky engine.* The engine is the core of the system. Written in C++, the |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 Examples | 26 Examples |
27 -------- | 27 -------- |
28 | 28 |
29 The simplest Sky app is, appropriately, HelloWorldApp: | 29 The simplest Sky app is, appropriately, HelloWorldApp: |
30 | 30 |
31 ```dart | 31 ```dart |
32 import 'package:sky/framework/fn.dart'; | 32 import 'package:sky/framework/fn.dart'; |
33 | 33 |
34 class HelloWorldApp extends App { | 34 class HelloWorldApp extends App { |
35 Node build() { | 35 UINode build() { |
36 return new Text('Hello, world!'); | 36 return new Text('Hello, world!'); |
37 } | 37 } |
38 } | 38 } |
39 | 39 |
40 void main() { | 40 void main() { |
41 new HelloWorldApp(); | 41 new HelloWorldApp(); |
42 } | 42 } |
43 ``` | 43 ``` |
44 | 44 |
45 Execution starts in `main`, which creates the `HelloWorldApp`. The framework | 45 Execution starts in `main`, which creates the `HelloWorldApp`. The framework |
46 then marks `HelloWorldApp` as dirty, which schedules it to build during the next | 46 then marks `HelloWorldApp` as dirty, which schedules it to build during the next |
47 animation frame. Each animation frame, the framework calls `build` on all the | 47 animation frame. Each animation frame, the framework calls `build` on all the |
48 dirty components and diffs the virtual `Node` hierarchy returned this frame with | 48 dirty components and diffs the virtual `UINode` hierarchy returned this frame wi
th |
49 the hierarchy returned last frame. Any differences are then applied as mutations | 49 the hierarchy returned last frame. Any differences are then applied as mutations |
50 to the physical heiarchy retained by the engine. | 50 to the physical heiarchy retained by the engine. |
51 | 51 |
52 For more examples, please see the [examples directory](examples/). | 52 For more examples, please see the [examples directory](examples/). |
53 | 53 |
54 Services | 54 Services |
55 -------- | 55 -------- |
56 | 56 |
57 Sky apps can access services from the host operating system using Mojo. For | 57 Sky apps can access services from the host operating system using Mojo. For |
58 example, you can access the network using the `network_service.mojom` interface. | 58 example, you can access the network using the `network_service.mojom` interface. |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 3. Using a USB cable, plug your phone into your computer. If prompted on your | 100 3. Using a USB cable, plug your phone into your computer. If prompted on your |
101 device, authorize your computer to access your device. | 101 device, authorize your computer to access your device. |
102 | 102 |
103 Running a Sky application | 103 Running a Sky application |
104 ------------------------- | 104 ------------------------- |
105 | 105 |
106 1. ``packages/sky/lib/sky_tool --install examples/stocks/main.sky`` | 106 1. ``packages/sky/lib/sky_tool --install examples/stocks/main.sky`` |
107 The --install flag is only necessary the first time to install SkyDemo.apk. | 107 The --install flag is only necessary the first time to install SkyDemo.apk. |
108 | 108 |
109 2. Use ``adb logcat`` to view any errors or Dart print() output from the app. | 109 2. Use ``adb logcat`` to view any errors or Dart print() output from the app. |
OLD | NEW |