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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
150
技術的負債を組織課題として解く-増えすぎたマイクロサービスとの戦い-
reimaru
1
3k
モデルのリファクタリングが難しいと思ったら、そもそも複雑だったのはビジネス仕様だった ? / is-the-business-domain-the-real-complexity
hatsu38
0
460
AI主導のプログラミング学習アプリを作ってみた
econanringo
0
150
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
400
dotNET_vulnclicker_intro.pdf
deka_morita
0
140
なぜCTOを降りてFDEを選んだのか?〜なぜプロダクト企業がFDEで顧客の現場に踏み込むのか〜
gonta
1
190
Vue Fes Japan 2026 タイムテーブル徹底解説
448jp
1
650
The Rails Doctrine Decade
koic
2
560
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
110
[2026-09-26]空論ジェネリックプロセス~テスト資産とAIで紡ぐ、再現可能なパフォーマンスチューニングの話~
tosite
0
260
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.6k
Featured
See All Featured
Utilizing Notion as your number one productivity tool
mfonobong
4
610
KATA
mclloyd
PRO
35
16k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.6k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
450
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
310
How STYLIGHT went responsive
nonsquared
100
6.3k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
740
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
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!