SlideShare a Scribd company logo
1 of 28
Download to read offline
Introduction of RiotJS
2016/03/11 Gotanda.js #3 @mizuki_r
1
PROFILE
@mizuki_r
Twitter: @mizuki_r
Github: ry_mizuki
npm : mizuki_r
Angular, RiotJSまわりの使い手.
最近はフロントエンドのアーキテ
クチャを考えることが多い.
2
INTRODUCTION
RIOT-JS
3
hmm…
this is very difficult…
( ・ั﹏・ั)
I THOUGHT THE TALK 4
do you know Riot?
5
~Fin~
6
tell the usage of Riot
7
http://riotjs.com/ja/guide/
8
~Fin~
9
tell the spirit of Riot
10
http://riotjs.com/ja/
11
~Fin~
12
INTRODUCTION
it’s not joke!
▸ Riot is very minimum
▸ Riot is very simple
▸ Riot is very easy
▸ Riot is very casual
13
<todo>
<!-- layout -->
<h3>{ opts.title }</h3>
<ul>
<li each={ item, i in items }>{ item }</li>
</ul>
<form onsubmit={ add }>
<input>
<button>Add #{ items.length + 1 }</button>
</form>
<!-- logic -->
<script>
this.items = []
add(e) {
var input = e.target[0]
this.items.push(input.value)
input.value = ''
}
</script>
<todo>
14
VS REACT
RIOT-JS
15
http://riotjs.com/ja/compare/
16
WHY RIOT
RIOT-JS
17
WHY RIOT
why Riot
▸ easy to learn
▸ easy to use
▸ make small, summarize small
18
WHY RIOT
easy to learn
▸ lifecycle (mount, update, updated, unmount)
▸ update
▸ yield
▸ dom events
http://riotjs.com/ja/api/
19
WHY RIOT
easy to use
▸ script in html
▸ very simple usage
<todo>
<!-- layout -->
<h3>{ opts.title }</h3>
<ul>
<li each={ item, i in items }>{ item }</li>
</ul>
<form onsubmit={ add }>
<input>
<button>Add #{ items.length + 1 }</button>
</form>
<!-- logic -->
<script>
this.items = []
add(e) {
var input = e.target[0]
this.items.push(input.value)
input.value = ''
}
</script>
<todo>
<body>
<!-- place the custom tag anywhere inside the body -->
<todo></todo>
<!-- include riot.js -->
<script src="riot.min.js"></script>
<!-- include the tag -->
<script src="todo.js" type="riot/tag"></script>
<!-- mount the tag -->
<script>riot.mount('todo')</script>
</body>
20
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
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
USE CASE
RIOT-JS
23
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
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
CONCLUSION
RIOT-JS
26
CONCLUSION
Riot is awesome
‣ Riot is very minimum
‣ Riot is very simple
‣ Riot is very easy
‣ Riot is very casual
27
THANKS!
28

More Related Content

Similar to Introduction of RiotJS

Sinatraonpassenger 090419090519 Phpapp01
Sinatraonpassenger 090419090519 Phpapp01Sinatraonpassenger 090419090519 Phpapp01
Sinatraonpassenger 090419090519 Phpapp01
guestcaceba
 
Useful Vim Plugins
Useful Vim PluginsUseful Vim Plugins
Useful Vim Plugins
anveo
 
Bfg Ploneconf Oct2008
Bfg Ploneconf Oct2008Bfg Ploneconf Oct2008
Bfg Ploneconf Oct2008
Jeffrey Clark
 
WebCamp 2016: Python. Михаил Бегерский: Использование asyncio-стека для разра...
WebCamp 2016: Python. Михаил Бегерский: Использование asyncio-стека для разра...WebCamp 2016: Python. Михаил Бегерский: Использование asyncio-стека для разра...
WebCamp 2016: Python. Михаил Бегерский: Использование asyncio-стека для разра...
WebCamp
 

Similar to Introduction of RiotJS (20)

Sinatraonpassenger 090419090519 Phpapp01
Sinatraonpassenger 090419090519 Phpapp01Sinatraonpassenger 090419090519 Phpapp01
Sinatraonpassenger 090419090519 Phpapp01
 
Trace kernel code tips
Trace kernel code tipsTrace kernel code tips
Trace kernel code tips
 
An intro to the JAMStack and Eleventy
An intro to the JAMStack and EleventyAn intro to the JAMStack and Eleventy
An intro to the JAMStack and Eleventy
 
Useful Vim Plugins
Useful Vim PluginsUseful Vim Plugins
Useful Vim Plugins
 
asyncio stack for web-development
asyncio stack for web-developmentasyncio stack for web-development
asyncio stack for web-development
 
Sacándole jugo a git
Sacándole jugo a gitSacándole jugo a git
Sacándole jugo a git
 
Sinatra
SinatraSinatra
Sinatra
 
Bfg Ploneconf Oct2008
Bfg Ploneconf Oct2008Bfg Ploneconf Oct2008
Bfg Ploneconf Oct2008
 
Website Performance Basics
Website Performance BasicsWebsite Performance Basics
Website Performance Basics
 
The Dojo Build System
The Dojo Build SystemThe Dojo Build System
The Dojo Build System
 
WebCamp 2016: Python. Михаил Бегерский: Использование asyncio-стека для разра...
WebCamp 2016: Python. Михаил Бегерский: Использование asyncio-стека для разра...WebCamp 2016: Python. Михаил Бегерский: Использование asyncio-стека для разра...
WebCamp 2016: Python. Михаил Бегерский: Использование asyncio-стека для разра...
 
Loading...git
Loading...gitLoading...git
Loading...git
 
Mojolicious lite
Mojolicious liteMojolicious lite
Mojolicious lite
 
Node.js 기반 정적 페이지 블로그 엔진, 하루프레스
Node.js 기반 정적 페이지 블로그 엔진, 하루프레스Node.js 기반 정적 페이지 블로그 엔진, 하루프레스
Node.js 기반 정적 페이지 블로그 엔진, 하루프레스
 
Jquery plugin development
Jquery plugin developmentJquery plugin development
Jquery plugin development
 
He stopped using for/while loops, you won't believe what happened next!
He stopped using for/while loops, you won't believe what happened next!He stopped using for/while loops, you won't believe what happened next!
He stopped using for/while loops, you won't believe what happened next!
 
Realize mais com HTML 5 e CSS 3 - 16 EDTED - RJ
Realize mais com HTML 5 e CSS 3 - 16 EDTED - RJRealize mais com HTML 5 e CSS 3 - 16 EDTED - RJ
Realize mais com HTML 5 e CSS 3 - 16 EDTED - RJ
 
4 Node.js Gotchas: What your ops team needs to know
4 Node.js Gotchas: What your ops team needs to know4 Node.js Gotchas: What your ops team needs to know
4 Node.js Gotchas: What your ops team needs to know
 
Build Chef development box from scratch
Build Chef development box from scratchBuild Chef development box from scratch
Build Chef development box from scratch
 
Metasepi team meeting #6: "Snatch-driven development"
Metasepi team meeting #6: "Snatch-driven development"Metasepi team meeting #6: "Snatch-driven development"
Metasepi team meeting #6: "Snatch-driven development"
 

More from Ryo Iinuma (6)

このすこし短い時間にLTを!
このすこし短い時間にLTを!このすこし短い時間にLTを!
このすこし短い時間にLTを!
 
2015年にpublishしたnpm modules
2015年にpublishしたnpm modules2015年にpublishしたnpm modules
2015年にpublishしたnpm modules
 
NodeJSでCLI開発を楽しくするライブラリの紹介
NodeJSでCLI開発を楽しくするライブラリの紹介NodeJSでCLI開発を楽しくするライブラリの紹介
NodeJSでCLI開発を楽しくするライブラリの紹介
 
AngularJSとFluxとRiotJSと
AngularJSとFluxとRiotJSとAngularJSとFluxとRiotJSと
AngularJSとFluxとRiotJSと
 
フロントエンドから見たWebアプリの高速化 #gotandapm
フロントエンドから見たWebアプリの高速化 #gotandapmフロントエンドから見たWebアプリの高速化 #gotandapm
フロントエンドから見たWebアプリの高速化 #gotandapm
 
最近のフロントエンドツールの紹介
最近のフロントエンドツールの紹介最近のフロントエンドツールの紹介
最近のフロントエンドツールの紹介
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Recently uploaded (20)

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

Introduction of RiotJS

  • 1. Introduction of RiotJS 2016/03/11 Gotanda.js #3 @mizuki_r 1
  • 2. PROFILE @mizuki_r Twitter: @mizuki_r Github: ry_mizuki npm : mizuki_r Angular, RiotJSまわりの使い手. 最近はフロントエンドのアーキテ クチャを考えることが多い. 2
  • 4. hmm… this is very difficult… ( ・ั﹏・ั) I THOUGHT THE TALK 4
  • 5. do you know Riot? 5
  • 7. tell the usage of Riot 7
  • 10. tell the spirit of Riot 10
  • 13. INTRODUCTION it’s not joke! ▸ Riot is very minimum ▸ Riot is very simple ▸ Riot is very easy ▸ Riot is very casual 13
  • 14. <todo> <!-- layout --> <h3>{ opts.title }</h3> <ul> <li each={ item, i in items }>{ item }</li> </ul> <form onsubmit={ add }> <input> <button>Add #{ items.length + 1 }</button> </form> <!-- logic --> <script> this.items = [] add(e) { var input = e.target[0] this.items.push(input.value) input.value = '' } </script> <todo> 14
  • 18. WHY RIOT why Riot ▸ easy to learn ▸ easy to use ▸ make small, summarize small 18
  • 19. WHY RIOT easy to learn ▸ lifecycle (mount, update, updated, unmount) ▸ update ▸ yield ▸ dom events http://riotjs.com/ja/api/ 19
  • 20. WHY RIOT easy to use ▸ script in html ▸ very simple usage <todo> <!-- layout --> <h3>{ opts.title }</h3> <ul> <li each={ item, i in items }>{ item }</li> </ul> <form onsubmit={ add }> <input> <button>Add #{ items.length + 1 }</button> </form> <!-- logic --> <script> this.items = [] add(e) { var input = e.target[0] this.items.push(input.value) input.value = '' } </script> <todo> <body> <!-- place the custom tag anywhere inside the body --> <todo></todo> <!-- include riot.js --> <script src="riot.min.js"></script> <!-- include the tag --> <script src="todo.js" type="riot/tag"></script> <!-- mount the tag --> <script>riot.mount('todo')</script> </body> 20
  • 21. 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
  • 22. 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
  • 24. 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
  • 25. 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
  • 27. CONCLUSION Riot is awesome ‣ Riot is very minimum ‣ Riot is very simple ‣ Riot is very easy ‣ Riot is very casual 27