Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
How working on Riot.js has changed me forever
Search
Gianluca Guarini
September 02, 2016
Programming
150
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
How working on Riot.js has changed me forever
Frontend Conference Zürich 2016
Gianluca Guarini
September 02, 2016
Other Decks in Programming
See All in Programming
複数ドメインを一つのアプリに統合するFlutterの設計と運用_FlutterKaigi2026登壇資料(須永高弘)
takahirosunaga
0
160
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
1
2k
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
160
AI時代のIaC入門 〜なぜインフラをコードで管理したいのか?〜 / Introduction to IaC in the AI Era
akihisaikeda
6
1.4k
Materialが消えた日 〜真っ白なFlutterキャンバスにRenderObjectで絵を描く〜
umigishiaoi
0
150
地方こそサーバーレス — 10年続けた、顔が見えるチームで確かな基盤を / Serverless Matters Most in Regional Areas — 10 Years of Building Reliable Foundations with Close-Knit Teams
seike460
PRO
1
220
[JA] Domain Modeling with Vanilla Rails: 「操作」から再考するRailsの設計論
yasaichi
4
1.8k
AI駆動開発4年目の現在地(『あなたはFDEになるべきか?』イベント資料)
kumaiu
0
270
Rails初心者がパスキーを実装してみて大変だったこと
ktombow
0
150
動画プレイヤーはなぜカクつくのか 〜Flutterのレンダリングとネイティブの境界を解剖する〜
naruogram
0
330
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
360
flutter_test のその先へ — Flutter アプリの LLM 機能に「評価」という品質保証を
kosukesaigusa
0
200
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Chasing Engaging Ingredients in Design
codingconduct
0
390
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.6k
Un-Boring Meetings
codingconduct
0
490
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
Ethics towards AI in product and experience design
skipperchong
2
460
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.5k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
510
Optimising Largest Contentful Paint
csswizardry
37
4k
GitHub's CSS Performance
jonrohan
1033
470k
We Are The Robots
honzajavorek
0
440
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Transcript
Riot.js How working on Riot.js has changed me forever
Gianluca Guarini @gianlucaguarini Frontend Conference 2016
2 var categoryProperties = _.omit(this.activeCategory.attributes, "types"); var productsArray = this.activeCategory.get("types");
var rowModelSelected = App.Views.FurnituresView.RowModelSelectedl var currentSection = App.Views.MainView.currentStatus; var newProductsArray = []; this.idProductsToAdd = []; this.$subMenu.find("li.product input").each(function () { var $input = $(this); var productId = $input.closest("li input").attr("id"); if ($input.is(":checked")) { var productToAdd; var isProductAlreadyThere = rowModelSelected.containsProduct(productId, currentSection); self.idProductsToAdd.push(productId); if (!isProductAlreadyThere) { productToAdd = _.clone(self.collections[currentSection].getProductById(productId)); } else { productToAdd = isProductAlreadyThere; } newProductsArray = _.union(newProductsArray, self.addProductsPack(productToAdd)); } }); My code yesterday
3 My code today <timer> <p>Seconds Elapsed: { time }</p>
<script> this.time = opts.start || 0 tick() { this.update({ time: ++this.time }) } var timer = setInterval(this.tick, 1000) this.on('unmount', function() { clearInterval(timer) }) </script> </timer>
4 What’s the problem?
5 It occurs when the amount of input to a
system exceeds its processing capacity. Information overload
6 Some everyday examples
7 {{diagnostic}} <div class="form-group"> <label for="name">Name</label> <input type="text" class="form-control" id="name"
required [(ngModel)]="model.name" name="name"> </div> <div class="form-group"> <label for="alterEgo">Alter Ego</label> <input type="text" class="form-control" id="alterEgo" [(ngModel)]="model.alterEgo" name="alterEgo"> </div> <div class="form-group"> <label for="power">Hero Power</label> <select class="form-control" id="power" required [(ngModel)]="model.power" name="power"> <option *ngFor="let p of powers" [value]="p">{{p}}</option> </select> </div>
8 todo.view = function() { return [ m("input", { onchange:
m.withAttr("value", todo.vm.description), value: todo.vm.description() }), m("button", {onclick: todo.vm.add}, "Add"), m("table", [ todo.vm.list.map(function(task, index) { return m("tr", [ m("td", [ m("input[type=checkbox]", { onclick: m.withAttr("checked", task.done), checked: task.done() }) ]), m("td", { style: { textDecoration: task.done() ? "line-through" : "none"} }, task.description()), ]) }) ]) ]; };
9 var Profile = React.createClass({ render: function () { return
( <InlineCss stylesheet={` & .card { cursor: pointer; margin: 15px; padding: 15px; text-align: center; height: 200px; } & img { width: 130px; height: 130px; } & p { margin: 10px; } `}> <div className="card"> <img src="mao.jpg" /> <p>Mao</p> </div> </InlineCss> ); } }); <div id="InlineCss-1"> <div class="card"> <img src="mao.jpg"> <p>Mao</p> </div> <style> #InlineCss-1 .card { cursor: pointer; margin: 15px; padding: 15px; text-align: center; height: 200px; } #InlineCss-1 img { width: 130px; height: 130px; } #InlineCss-1 p { margin: 10px; } </style> </div> WTF
10 before the project Backenders reactions
11 Backenders reactions after the project
12 What’s the solution?
13 Use what you know best and learn the foundation
of the technology you are currently using
14 User interface micro-library ( 9kb )
15 Simplicity is everything
16 …yes cool but How?
17 New codestyle • less code • shorter variables names
• less API methods • no semicolons • elegant and beauty source code
18 New ideas & approaches • thinking in components •
automating everything • building by myself for myself • experimenting with other programming languages
19 Always share your knowledge doing Open Source
20 Conf Greeting: bit.ly/2bxU7di Other cool examples: bit.ly/2bxTErJ It’s demo
time
21 Think with your mind code with your heart
22 @gianlucaguarini github.com/GianlucaGuarini dreipol.ch riotjs.com Thanks !