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
mthenw
April 10, 2015
Programming
660
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
110
Globally distributed applications with Serverless Framework
mthenw
1
210
The State of Serverless
mthenw
0
780
The State of Serverless (PCUG)
mthenw
0
260
Apex: The Holy Grail of AWS Lambda
mthenw
0
240
Microservices on AWS ECS
mthenw
8
870
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
パスワード再設定メールのURLについて知っておこう
uyuki234
0
120
Androidだけじゃない、DroidKaigiで広がった私の技術スタック
akkeylab
0
120
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
490
KiroのSpecで「五目並べ」を作ってみる
satoshi256kbyte
1
370
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
540
なぜCTOを降りてFDEを選んだのか?〜なぜプロダクト企業がFDEで顧客の現場に踏み込むのか〜
gonta
1
190
Streamlitで実現する自然言語データアプリ開発
ayumu_yamaguchi
1
360
RAG の “R” を Swift で覗いてみる 〜「意味から探す」検索の仕組み〜
nao_randd
0
140
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
8
5.7k
Jetpack Compose Mechanisms
skydoves
2
700
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.6k
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
200
Featured
See All Featured
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
560
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
590
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
Context Engineering - Making Every Token Count
addyosmani
9
1.2k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
320
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.8k
The SEO identity crisis: Don't let AI make you average
varn
0
580
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1.1k
How Software Deployment tools have changed in the past 20 years
geshan
2
35k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
470
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!