26
なぜModdable作るのか (あるWeb屋さんの場合) Shinya Ishikawa 石川 真也 Why I make things with Moddable - from a web developer’s perspective

なぜModdableで 作るのか - Ecma International...なぜModdableで 作るのか (あるWeb屋さんの場合) Shinya Ishikawa 石川 真也 Why I make things with Moddable

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: なぜModdableで 作るのか - Ecma International...なぜModdableで 作るのか (あるWeb屋さんの場合) Shinya Ishikawa 石川 真也 Why I make things with Moddable

なぜModdableで作るのか(あるWeb屋さんの場合)

Shinya Ishikawa石川 真也

Why I make things with Moddable - from a web developer’s perspective

Page 2: なぜModdableで 作るのか - Ecma International...なぜModdableで 作るのか (あるWeb屋さんの場合) Shinya Ishikawa 石川 真也 Why I make things with Moddable

自己紹介

Shinya Ishikawa(@meganetaaan)

組み込み開発を始めたいWeb開発者

 SIerでWebフロントエンド開発

→ModdableとM5Stackを使って趣味Maker活動

→ロボット屋さんでUI/UX開発

Self introduction

https://www.rt-net.jp/

Page 3: なぜModdableで 作るのか - Ecma International...なぜModdableで 作るのか (あるWeb屋さんの場合) Shinya Ishikawa 石川 真也 Why I make things with Moddable

Moddableはいいぞ!Moddable is AWESOME!

お伝えしたいこと

Page 4: なぜModdableで 作るのか - Ecma International...なぜModdableで 作るのか (あるWeb屋さんの場合) Shinya Ishikawa 石川 真也 Why I make things with Moddable

ModdableはWeb開発者にいいぞ!Moddable is AWESOME for web developers!

お伝えしたいこと

IoTプロダクトを作りたいWeb企業スマート機器を作りたいメーカーに朗報!

Page 5: なぜModdableで 作るのか - Ecma International...なぜModdableで 作るのか (あるWeb屋さんの場合) Shinya Ishikawa 石川 真也 Why I make things with Moddable

なぜModdableで作るのか?

1) UI開発を強力にサポート

2) 最新のECMAScriptに対応

Web開発者が簡単に習得できて、効率よく開発できるから

Why I make things with moddable

Page 6: なぜModdableで 作るのか - Ecma International...なぜModdableで 作るのか (あるWeb屋さんの場合) Shinya Ishikawa 石川 真也 Why I make things with Moddable

1) UI開発を強力にサポート

1)Strong support for UI development

Page 7: なぜModdableで 作るのか - Ecma International...なぜModdableで 作るのか (あるWeb屋さんの場合) Shinya Ishikawa 石川 真也 Why I make things with Moddable

公式UIフレームワークpiu

● モダンなUI構築のための機能が全部入り

● 高速・省メモリなメディア処理機能

☑文字

☑画像

☑音声

☑アニメーション/トランジション

● UI開発の生産性を高める設計

☑レスポンシブデザイン

☑コンポーネント指向によるUIプログラミング

https://github.com/Moddable-OpenSource/moddable/blob/public/documentation/piu/piu.md

Piu, the official UI framework of Moddable

Page 8: なぜModdableで 作るのか - Ecma International...なぜModdableで 作るのか (あるWeb屋さんの場合) Shinya Ishikawa 石川 真也 Why I make things with Moddable

デモ1:bongo cat

https://github.com/meganetaaan/moddable-examples

Page 10: なぜModdableで 作るのか - Ecma International...なぜModdableで 作るのか (あるWeb屋さんの場合) Shinya Ishikawa 石川 真也 Why I make things with Moddable

デモ2:Twitterクライアント

https://github.com/meganetaaan/moddable-examples

Page 12: なぜModdableで 作るのか - Ecma International...なぜModdableで 作るのか (あるWeb屋さんの場合) Shinya Ishikawa 石川 真也 Why I make things with Moddable

メディア処理…☑文字

● ビットマップフォントを表示できる○ 日本語フォントに対応

○ 使用する文字のみフォント化して容量節約

https://github.com/Moddable-OpenSource/moddable/blob/public/documentation/piu/piu.md

Media processing … ☑Text

Page 13: なぜModdableで 作るのか - Ecma International...なぜModdableで 作るのか (あるWeb屋さんの場合) Shinya Ishikawa 石川 真也 Why I make things with Moddable

メディア処理…☑画像

● 様々な形式の画像を統一されたI/Fで表示できる○ bmp, jpeg, png, gif(アニメーション含)

○ アルファチャンネル付き画像

https://github.com/Moddable-OpenSource/moddable/blob/public/documentation/piu/piu.md

Media processing … ☑Image

Page 14: なぜModdableで 作るのか - Ecma International...なぜModdableで 作るのか (あるWeb屋さんの場合) Shinya Ishikawa 石川 真也 Why I make things with Moddable

設計…☑レスポンシブデザイン

● 複数のディスプレイサイズに対応したUIを作れる

https://github.com/Moddable-OpenSource/moddable/blob/public/documentation/piu/piu.md

240x320 320x480

Design … ☑Responsive UI

Page 15: なぜModdableで 作るのか - Ecma International...なぜModdableで 作るのか (あるWeb屋さんの場合) Shinya Ishikawa 石川 真也 Why I make things with Moddable

設計…☑コンポーネント指向

● UIを再利用可能なコンポーネントとして設計する手法

● コンポーネントを階層的に並べてUIを組み立てる

https://github.com/Moddable-OpenSource/moddable/blob/public/documentation/piu/piu.md

Application

Header

Body

Icon

Title

PageCount

Tweet

User

Content

Impression

Design … ☑Component oriented

Page 16: なぜModdableで 作るのか - Ecma International...なぜModdableで 作るのか (あるWeb屋さんの場合) Shinya Ishikawa 石川 真也 Why I make things with Moddable

☑他にも色々

● アニメーション/トランジション

● タッチ/ドラッグ操作

● 画面のスクロール

● ローカリゼーション(多言語対応)

https://github.com/Moddable-OpenSource/moddable/blob/public/documentation/piu/piu.md

☑So many other advantages

Page 17: なぜModdableで 作るのか - Ecma International...なぜModdableで 作るのか (あるWeb屋さんの場合) Shinya Ishikawa 石川 真也 Why I make things with Moddable

WebのUIを開発する感覚で組み込みの画面ができる

ポイント

20 days training10 days implementation

\ AW YEAH… /

Can develop embedded screens feeling like Web UI

Page 18: なぜModdableで 作るのか - Ecma International...なぜModdableで 作るのか (あるWeb屋さんの場合) Shinya Ishikawa 石川 真也 Why I make things with Moddable

2) 最新のECMAScriptに対応

2)Comformance for latest ECMAScript

Page 19: なぜModdableで 作るのか - Ecma International...なぜModdableで 作るのか (あるWeb屋さんの場合) Shinya Ishikawa 石川 真也 Why I make things with Moddable

最新のECMAScriptに対応

● ECMAScript2018 に99%準拠○ RegExp

○ Promise、async/await

○ クラスとprivateフィールド

○ BigInt

● 標準→実装のみならず、実装→標準としてproposalも○ TC53

https://github.com/wingsuitist/ecmascript-logo

Conformance for the latest ECMAScript

Page 20: なぜModdableで 作るのか - Ecma International...なぜModdableで 作るのか (あるWeb屋さんの場合) Shinya Ishikawa 石川 真也 Why I make things with Moddable

「最新の」ECMAScriptで書く利点

● 広く使われている:技術者の調達容易性↑○ Web開発者の87%がECMAScript2015以上での開発を経験

● 様々な開発支援ツールが使える:生産性↑○ エディタ(VisualStudio Code)

○ 型システム(TypeScript)

○ Lint ツール/ フォーマッタ(ESLint/Prettier)

○ パッケージ管理(npm)

※https://2018.stateofjs.com/javascript-flavors/es6

Advantage of using the latest ECMAScript

Page 21: なぜModdableで 作るのか - Ecma International...なぜModdableで 作るのか (あるWeb屋さんの場合) Shinya Ishikawa 石川 真也 Why I make things with Moddable

デモ3:開発のようす(Lチカ)

Live coding of “LED ticker”

Page 22: なぜModdableで 作るのか - Ecma International...なぜModdableで 作るのか (あるWeb屋さんの場合) Shinya Ishikawa 石川 真也 Why I make things with Moddable

型システム

● TypeScript○ JavaScriptに型システムを追加した代

替言語■ ビルド時にJavaScriptに変換する

○ プロパティ名や値の間違いに早く

気づける

○ VisualStudio Code等のエディタと

組み合わせて型の補完が効く

https://github.com/meganetaaan/moddable-boilerplate

Type system

Page 23: なぜModdableで 作るのか - Ecma International...なぜModdableで 作るのか (あるWeb屋さんの場合) Shinya Ishikawa 石川 真也 Why I make things with Moddable

Lintツール/フォーマッタ

● ESLint○ 文法チェックツール

○ JavaScriptのベストプラクティス

(よい書き方)を強制

● Prettier○ インデント等の自動修正

https://github.com/meganetaaan/moddable-boilerplate

Linter / Formatter

Page 24: なぜModdableで 作るのか - Ecma International...なぜModdableで 作るのか (あるWeb屋さんの場合) Shinya Ishikawa 石川 真也 Why I make things with Moddable

パッケージ管理

● npm○ JavaScriptのパッケージ管

理システム

○ 前述の各ツールのインス

トールと実行を管理

○ 簡単なタスクランナーも兼

ねる$npm run deploy:m5stack→TypeScriptの変換、ビルド、書き込みを一挙に行う

注意:Web向けのnpmライブラリは基本的に使用不可● ブラウザAPIが使われている● メモリを潤沢に使える前提がある

https://github.com/meganetaaan/moddable-boilerplate

Package manager

Page 25: なぜModdableで 作るのか - Ecma International...なぜModdableで 作るのか (あるWeb屋さんの場合) Shinya Ishikawa 石川 真也 Why I make things with Moddable

標準に準拠している→Webエコシステムの 資産を活用できる

ポイント

Belong the Web standard -> Take benefit of the Web ecosystem

Page 26: なぜModdableで 作るのか - Ecma International...なぜModdableで 作るのか (あるWeb屋さんの場合) Shinya Ishikawa 石川 真也 Why I make things with Moddable

まとめ:なぜModdableで作るのか?

1) UI開発を強力にサポートモダンな設計手法と強力なメディア処理でWeb UIのように画面を作り込める

2) 最新のECMAScriptに対応標準に準拠しているからWebエコシステムの資産を活用できる

「実践Moddable」booth.pmにて頒布中!

 https://hokunan-shobo.booth.pm/items/1574940

Web開発者が簡単に習得できて、効率よく開発できるから

Conclusion