Slide 1

Slide 1 text

Сказки о мертвецах Вова Дем

Slide 2

Slide 2 text

MY FAIL?

Slide 3

Slide 3 text

–@mabrek “Erlang тоже мертв”

Slide 4

Slide 4 text

ActionScript

Slide 5

Slide 5 text

ВСЁ СТАРОЕ СТАНОВИТСЯ МОДНЫМ

Slide 6

Slide 6 text

ECMAScript ECMAScript 3 ECMAScript 5 ECMAScript 6 4?

Slide 7

Slide 7 text

ECMAScript 3 ECMAScript 5 ECMAScript 6 ECMAScript 4 ⛔ ECMAScript Harmony?

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

https://medium.com/@Pier/ecmascript-4-was-too-ahead-of-its-time-799e59232db0

Slide 10

Slide 10 text

ActionScript 1 Имплементация ECMAScript 3 … и всё

Slide 11

Slide 11 text

Actioncript 2 ECMAScript 3 + “классы” (сахар для prototype) и интерфейсы + опциональная типизация + зачатки метапрограммирования

Slide 12

Slide 12 text

ActionScript 2

Slide 13

Slide 13 text

ActionScript 3 ECMAScript 4 “Настоящие” классы Run-time type checking Пространства имён Proxy, Dictionary, Reflection API 2006

Slide 14

Slide 14 text

Class Fixed property inheritance Prototype inheritance +

Slide 15

Slide 15 text

Class

Slide 16

Slide 16 text

is instanceof, который работает if (obj is Array) { // … }

Slide 17

Slide 17 text

Where “is”?

Slide 18

Slide 18 text

Интерфейсы public interface IDraggle extends IVisualElement, IBitmapDrawable { function getSnapshot():IDraggleSnapshot; /** * @see ru.teachbase.behaviors.DragBehavior */ function get dragBehavior():DragBehavior; /** * @see ru.teachbase.behaviors.DragState */ function get dragState():String; }

Slide 19

Slide 19 text

Интерфейсы private function requestSnapshot():void { target is IDraggle && (_target as IDraggle).getSnapshot(); }

Slide 20

Slide 20 text

Proxy https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/utils/Proxy.html

Slide 21

Slide 21 text

JS Proxy https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy

Slide 22

Slide 22 text

Proxy public class JSClient extends Proxy{ private var _target:String; public function JSClient(target:String) { _target = target; } internal function _wrap(body:String):String { return '(function(){ return '+body+';})'; } internal function _tojs(value:*):String { … } override flash_proxy function callProperty(name:*, …parameters):* { return ExternalInterface.call( _wrap(_target+"."+name+".apply("+_target+","+_tojs(parameters)+")") ); } }

Slide 23

Slide 23 text

Proxy const jsWindow: JSClient = JSClient.new("window"); jsWindow.scrollTo(0, 800);

Slide 24

Slide 24 text

Пример class PopupContainer extends MovieClip { private var popups:Dictionary = new Dictionary(true); function PopupContainer() { addEventListener( MouseEvent.MOUSE_DOWN, // тип события onMouseDown, // обработчик (метод класса) true, // capture EventPriority.CURSOR_MANAGEMENT, // приоритет true // weakref ); } }

Slide 25

Slide 25 text

Фазы события

Slide 26

Slide 26 text

Фазы события

Slide 27

Slide 27 text

addEventListener https://caniuse.com/#feat=addeventlistener

Slide 28

Slide 28 text

Capture https://signalvnoise.com/posts/3137-using-event-capturing-to-improve-basecamp-page-load-times

Slide 29

Slide 29 text

Worker [Embed(source=" ../swfs/BgWorker.swf", mimeType="application/octet-stream")] private static var BgWorker_ByteClass:Class; private function createWorker():void { // create the background worker var workerBytes:ByteArray = new BgWorker_ByteClass(); var bgWorker:Worker = WorkerDomain.current.createWorker(workerBytes); // listen for worker state changes to know when the worker is running bgWorker.addEventListener(Event.WORKER_STATE, workerStateHandler); // set up communication between workers using // setSharedProperty(), createMessageChannel(), etc. // ... (not shown) bgWorker.start(); }

Slide 30

Slide 30 text

ActionScript 4 Multi-core let with, prototype Function types Type inference Проект закрыт в 2016

Slide 31

Slide 31 text

ActionScript 4 function foo(i :int, s :String) // :double { let x = 2; // x :int var r = x; // r :double r *= 0.5; return r; } let f = foo; // f :(int, String) => double var d = f(1, "Hello"); // d :double

Slide 32

Slide 32 text

Family Flex RTMP RTMFP SWF ActionScript FLV AIR

Slide 33

Slide 33 text

Демо http://bit.ly/demo-fail

Slide 34

Slide 34 text

FLEX or React for ActionScript?

Slide 35

Slide 35 text

Пример

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

“Разметка”

Slide 38

Slide 38 text

Binding

Slide 39

Slide 39 text

Binding http://misko.hevery.com/2010/08/10/what-flex-thought-me-about-data-binding/

Slide 40

Slide 40 text

Состояния

Slide 41

Slide 41 text

CSS-in-ASS @namespace ms “library: //ns.evl.ms/flex/mars”; ms|Button { fontSize: 15; color: #9FA628; }

Slide 42

Slide 42 text

Расположение

Slide 43

Slide 43 text

Скины

Slide 44

Slide 44 text

Flex AS3 код “Разметка” Расположение (layout) Внешний вид (skin) CSS

Slide 45

Slide 45 text

Flux4Flex https://en.wikipedia.org/wiki/List_of_Flex_frameworks#Cairngorm

Slide 46

Slide 46 text

AIR or Flex Native?

Slide 47

Slide 47 text

The main selling point of React Native is fast, iterative development, and a promise that the same code will run on both leading mobile platforms. Often, the pitch goes as far as to say that your existing team of front- end developers, already well-versed in JavaScript, can build a companion mobile app with just minimal training. тут должен был быть скрин из блога

Slide 48

Slide 48 text

FLASH IS DEAD

Slide 49

Slide 49 text

“Flash проприетарный”

Slide 50

Slide 50 text

“Flash медленный”

Slide 51

Slide 51 text

“Flash уязвимый”

Slide 52

Slide 52 text

ActionScript 2018 https://github.com/open-source-flash/open-source-flash

Slide 53

Slide 53 text

ActionScript 2018 Game Engines (Starling) RedTamarin (x-platform CLIs) WebAssembly Apache Royal / FlexJS Haxe

Slide 54

Slide 54 text

Конец?

Slide 55

Slide 55 text

В ССЫЛКЕ © Призрачная Колыма http://bit.ly/as-fail