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
Practical React in Marionette application
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
mthenw
April 10, 2015
Programming
650
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Practical React in Marionette application
meet.js Poznań
mthenw
April 10, 2015
More Decks by mthenw
See All by mthenw
How to make better technical decisions
mthenw
0
100
Globally distributed applications with Serverless Framework
mthenw
1
200
The State of Serverless
mthenw
0
770
The State of Serverless (PCUG)
mthenw
0
260
Apex: The Holy Grail of AWS Lambda
mthenw
0
230
Microservices on AWS ECS
mthenw
8
860
Working with single-threaded event loop
mthenw
1
370
Bingo Bango Mongo
mthenw
6
450
Are you Redis? Introduction to Redis.
mthenw
2
770
Other Decks in Programming
See All in Programming
『寄り添うラジオ』をAIで作る 体験価値から逆算した、会話しないUXと品質設計
theoriatec2024
3
180
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
220
LL言語やWebフレームワークのPostgreSQL対応 〜DBの機能がユーザーに届くまで〜
kentaroutakeda
1
150
What We Talk About When We Talk About XP
m_seki
2
660
モジュールの視点からSwiftを読み解く #iosdc
s_shimotori
0
180
JPUG勉強会 OSSデータベースの内部構造を理解しよう(第2回)
oga5
0
260
すこし踏み込む CancellationToken
htkym
2
580
Go × SIMDで高速化するベクトル検索 ~ルーフラインモデルでSIMDが効く境界を探れ! ~
po3rin
1
2k
The Rails Doctrine Decade
koic
2
140
世界の中心で、AI(App Intents)をさけぶ ー App Intents中心設計の実践ガイド
touyou
0
610
WebAssembly in Android Apps 〜 WASMはJNIの夢を見るか
keiji
1
110
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
5
3.4k
Featured
See All Featured
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
540
The Limits of Empathy - UXLibs8
cassininazir
1
680
Odyssey Design
rkendrick25
PRO
2
810
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
76k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
500
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
510
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
530
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
410
Rails Girls Zürich Keynote
gr2m
96
14k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
Transcript
Practical React In Marionette application
@mthenw
None
Egnyte Web UI
Egnyte Web UI Backbone/Marionette require.js karma/jasmine JSHint/JSCS underscore templates
not so much unit tests a lot of HTML duplication
overcomplicated business logic two-way binding (rivets.js)
New feature - Audit Reports
None
DataGrid PoC
None
DataGrid PoC less code reusable components easy to test
React + Marionette
no revolution
React Bridge
var ReactBridge = Backbone.Marionette.ItemView.extend({ template: "#react-bridge-template", initialize: function (options) {
this.options = options; }, onRender: function () { React.render(this.initializeComponent(this.options), this.el); }, onClose: function () { React.unmountComponentAtNode(this.el); } });
var Grid = ReactBridge.extend({ initializeComponent: function (options) { return DataGridComponent({
title: "Cool Grid", desc: "with awesome data", collection: options.collection, ... }); } });
App.Settings.layout.content.show( new Grid({collection: collection}) );
None
Model Component model’s attributes as props update on change getModel().set(..,
..)
Best practises
Best practises JSX
var Header = React.createClass({ render() { return ( <header className={
`${this.props.classNamePrefix}-header content-header` }> <div> <h1 key="header"><span>{ this.t(this.props.title) }</span></h1> <span className="desc" key="desc">{ this.t(this.props.desc) }</span> { filters } <div className="actions" key="actions">{ actions }</div> </div> </header> ); } }); var Header = React.createClass({ render() { return ( React.createElement( "header", {className: `${this.props.classNamePrefix}-header content-header`}, React.createElement("div", null, React.createElement("h1", {key: “header"}, React.createElement("span", null, this.t(this.props.title) )), React.createElement("span", {className: "desc", key: "desc"}, this.t(this.props.desc) ), filters, React.createElement("div", {className: "actions", key: "actions"}, actions ) ) ) ); } });
Best practises JSX small components beware of using state
var DataGrid = React.createClass({ render() { return <div className="datagrid" >
<Header /> <Notifications /> <Table /> <Pagination /> </div>; } });
Best practises JSX small components even smaller components beware of
using state
var Icon = React.createClass({ render() { return <i className={"icon-" +
this.props.icon} />; } });
Best practises JSX small components even smaller components beware of
using state no revolution
+1
Thanks!