Slide 1

Slide 1 text

Introduction of RiotJS 2016/03/11 Gotanda.js #3 @mizuki_r 1

Slide 2

Slide 2 text

PROFILE @mizuki_r 5XJUUFS!NJ[VLJ@S (JUIVCSZ@NJ[VLJ OQNNJ[VLJ@S "OHVMBS 3JPU+4·ΘΓͷ࢖͍ख ࠷ۙ͸ϑϩϯτΤϯυͷΞʔΩς ΫνϟΛߟ͑Δ͜ͱ͕ଟ͍ 2

Slide 3

Slide 3 text

INTRODUCTION RIOT-JS 3

Slide 4

Slide 4 text

hmm… this is very difficult… ( ŋั﹏ŋั) I THOUGHT THE TALK 4

Slide 5

Slide 5 text

do you know Riot? 5

Slide 6

Slide 6 text

~Fin~ 6

Slide 7

Slide 7 text

tell the usage of Riot 7

Slide 8

Slide 8 text

http://riotjs.com/ja/guide/ 8

Slide 9

Slide 9 text

~Fin~ 9

Slide 10

Slide 10 text

tell the spirit of Riot 10

Slide 11

Slide 11 text

http://riotjs.com/ja/ 11

Slide 12

Slide 12 text

~Fin~ 12

Slide 13

Slide 13 text

INTRODUCTION it’s not joke! ▸ Riot is very minimum ▸ Riot is very simple ▸ Riot is very easy ▸ Riot is very casual 13

Slide 14

Slide 14 text

{ opts.title }

  • { item }
Add #{ items.length + 1 } this.items = [] add(e) { var input = e.target[0] this.items.push(input.value) input.value = '' } 14

Slide 15

Slide 15 text

VS REACT RIOT-JS 15

Slide 16

Slide 16 text

http://riotjs.com/ja/compare/ 16

Slide 17

Slide 17 text

WHY RIOT RIOT-JS 17

Slide 18

Slide 18 text

WHY RIOT why Riot ▸ easy to learn ▸ easy to use ▸ make small, summarize small 18

Slide 19

Slide 19 text

WHY RIOT easy to learn ▸ lifecycle (mount, update, updated, unmount) ▸ update ▸ yield ▸ dom events http://riotjs.com/ja/api/ 19

Slide 20

Slide 20 text

WHY RIOT easy to use ▸ script in html ▸ very simple usage

{ opts.title }

  • { item }
Add #{ items.length + 1 } this.items = [] add(e) { var input = e.target[0] this.items.push(input.value) input.value = '' } riot.mount('todo') 20

Slide 21

Slide 21 text

WHY RIOT make small 1. create html ٩(๑´3ʆ๑)۶ 2. separate tags 3. ʮhum… it’s largeʯ(´ɾωɾʆ) 4. separate tags 5. repeat 1 … 4 ٩(๑`^´๑)۶ possible to turn a lot of small cycle!! 21

Slide 22

Slide 22 text

WHY RIOT sammrize small example of using webpack. view/app/components ᵓᴷᴷ ffp ᴹ ᵓᴷᴷ index.tag ᴹ ᵋᴷᴷ style.css ᵓᴷᴷ ffp-body ᴹ ᵓᴷᴷ index.tag ᴹ ᵓᴷᴷ store.js ᴹ ᵋᴷᴷ style.css ᵓᴷᴷ ffp-code-pretty ᴹ ᵓᴷᴷ index.tag ᴹ ᵓᴷᴷ store.js ᴹ ᵋᴷᴷ style.css ᵓᴷᴷ ffp-header ᴹ ᵓᴷᴷ index.tag ᴹ ᵋᴷᴷ style.css ᵓᴷᴷ ffp-input ᴹ ᵓᴷᴷ action-creator.js ᴹ ᵓᴷᴷ index.tag ᴹ ᵋᴷᴷ style.css ᵓᴷᴷ ffp-loading ᴹ ᵓᴷᴷ index.tag ᴹ ᵓᴷᴷ store.js ᴹ ᵋᴷᴷ style.css ᵋᴷᴷ ffp-result ᵓᴷᴷ index.tag ᵓᴷᴷ store.js ᵋᴷᴷ style.css https://github.com/rymizuki/electron- ffp/tree/master/view/app/ components possible to separate into component. 22

Slide 23

Slide 23 text

USE CASE RIOT-JS 23

Slide 24

Slide 24 text

USE CASE there is a problem also… ‣ take over all of the data on child becomes larger, there is danger of conflict!!! todoList.todos => { todos } todoList.tags.todo => { todos, name, description } todoList.tags.todo.tags.description => { todos, name, description, content } 24

Slide 25

Slide 25 text

USE CASE use case ‣ try quickly ideas ‣ make a small app ‣ when just want to write ‣ in combination with other libraries started small, until the scale of the moderate 25

Slide 26

Slide 26 text

CONCLUSION RIOT-JS 26

Slide 27

Slide 27 text

CONCLUSION Riot is awesome ‣ Riot is very minimum ‣ Riot is very simple ‣ Riot is very easy ‣ Riot is very casual 27

Slide 28

Slide 28 text

THANKS! 28