Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Practical React in Marionette application
Search
mthenw
April 10, 2015
Programming
630
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
92
Globally distributed applications with Serverless Framework
mthenw
1
180
The State of Serverless
mthenw
0
750
The State of Serverless (PCUG)
mthenw
0
250
Apex: The Holy Grail of AWS Lambda
mthenw
0
220
Microservices on AWS ECS
mthenw
8
850
Working with single-threaded event loop
mthenw
1
360
Bingo Bango Mongo
mthenw
6
440
Are you Redis? Introduction to Redis.
mthenw
2
750
Other Decks in Programming
See All in Programming
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
13
3.6k
エージェンティックRAGにAWSで入門しよう!
har1101
8
1.4k
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
150
Developing with AI Agents — Codex, Claude Code & Cowork Practical Guide
x5gtrn
PRO
0
1.3k
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
150
ふつうのFeature Flag実践入門
irof
7
3.7k
net-httpのHTTP/2対応について
naruse
0
470
「エンジニアインターン、どうやって取った?」準備のリアルを語るLT会 Progate BAR
akiomatic
0
130
Lessons from Spec-Driven Development
simas
PRO
0
180
ユニットテストの先へ:テスト技法で要求・仕様を整理するJava開発実践 / Beyond_Unit_Testing_Practical_Java_Development_Techniques_for_Organizing_Requirements_and_Specifications
shimashima35
0
390
Lemonade + Foundry Toolkit でお手軽アプリ開発
seosoft
1
320
「AIで開発し、AIを届ける」をEvalでつなぐ 〜AIネイティブに始めるプロダクト開発の実践〜 / Connecting "Develop with AI, deliver AI" with Eval
rkaga
4
4.9k
Featured
See All Featured
The Mindset for Success: Future Career Progression
greggifford
PRO
0
360
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Darren the Foodie - Storyboard
khoart
PRO
3
3.4k
The World Runs on Bad Software
bkeepers
PRO
72
12k
YesSQL, Process and Tooling at Scale
rocio
174
15k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
450
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
320
Building the Perfect Custom Keyboard
takai
2
790
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.3k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
840
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
56k
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!