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
Harnessing the power of React in SilverStripe 4
Search
Robbie Averill
September 21, 2018
Programming
0
250
Harnessing the power of React in SilverStripe 4
Presentation given at StripeCon EU 2018 - Enschede, Netherlands
Robbie Averill
September 21, 2018
Tweet
Share
Other Decks in Programming
See All in Programming
103 Early Hints
sugi_0000
1
220
Fibonacci Function Gallery - Part 1
philipschwarz
PRO
0
200
17年周年のWebアプリケーションにTanStack Queryを導入する / Implementing TanStack Query in a 17th Anniversary Web Application
saitolume
0
250
アクターシステムに頼らずEvent Sourcingする方法について
j5ik2o
4
170
talk-with-local-llm-with-web-streams-api
kbaba1001
0
170
rails stats で紐解く ANDPAD のイマを支える技術たち
andpad
1
290
Effective Signals in Angular 19+: Rules and Helpers @ngbe2024
manfredsteyer
PRO
0
130
今からはじめるAndroidアプリ開発 2024 / DevFest 2024
star_zero
0
1k
선언형 UI에서의 상태관리
l2hyunwoo
0
140
創造的活動から切り拓く新たなキャリア 好きから始めてみる夜勤オペレーターからSREへの転身
yjszk
1
130
rails statsで大解剖 🔍 “B/43流” のRailsの育て方を歴史とともに振り返ります
shoheimitani
2
930
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
620
Featured
See All Featured
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.3k
Writing Fast Ruby
sferik
628
61k
Agile that works and the tools we love
rasmusluckow
328
21k
Music & Morning Musume
bryan
46
6.2k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
48
2.2k
A Philosophy of Restraint
colly
203
16k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
29
2k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Designing for Performance
lara
604
68k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
247
1.3M
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
Transcript
React in SilverStripe 4 Harnessing its power 21st Sept 2018
• Robbie Averill
• Assets • Campaigns • History viewer • Archives •
Small components e.g. TreeDropdownField Where it's used already
• SilverStripe form schema • React 15 and Redux •
GraphQL and Apollo • Reactstrap • SilverStripe's JavaScript Injector What you get
• More of the CMS will be React driven •
Slowly phasing out Entwine • A new paradigm for frontend SilverStripe CMS development Where it's heading
• PHP, SilverStripe and entwine boilerplate • React components •
GraphQL queries • Injector transformations Example: new history viewer component
Injecting the component A PHP FormField with a SilverStripe template
Injecting the component
Injecting the component
Don't forget to unmount! • Prevent React components from continually
mounting into the document by unmounting it
From here on out, it's all React!
A "hello world" component example
Register with Injector
None
Cool man… give me a list!
None
Obviously I wanted some data in the list
Scaffolding a GraphQL query
Test it with GraphiQL
Make query a Higher Order Component • Use the "graphql"
HOC (Higher-Order-Component) from the react-apollo package • cms/client/src/state/history/readOnePageQuery.js
Inject the query into HistoryViewer
Here's your list!
Use the React and Redux dev tools • React dev
tools let you inspect component structures and props • Redux dev tools let you inspect the current state and how reducers change it over time
None
• Base module provides abstract components • It's up to
implementations to define the data queries • Use injector to hook it up • Implemented in the CMS and Elemental modules History Viewer: summary
Roadmap: progress since 4.0
• Content blocks • Improved versioning features • React and
GraphQL extensibility • Unified CMS search interface • Large UX focus Roadmap: progress since 4.0
Content blocks
React history viewer
Archive area
React and GraphQL extensibility
Unified CMS search interface
• SilverStripe 3 supported until Dec 2020 • SilverStripe 4
nears its first anniversary (Nov 2018) • New features built as opt-in SilverStripe 4 modules • More clarity on release expectations Release Management
None
• Mainstream use of APIs to decouple CMS • Focus
on managing digital experiences • Deeper integrations with other SaaS tools Analytics, targeting, campaigns, marketing automation, search, etc • Modernise CMS UI through React+GraphQL • New features into minor 4.x releases Coming up in 2019...
Q 4 ’ 1 8 Q 1 ’ 1 9
Q 2 ’ 1 9 Q 3 ’ 1 9 Near Future ✓ ISOLATED BUILDS SilverStripe Technology Roadmap API FOUNDATIONS INTEGRATION OF DIGITAL EXPERIENCE SYSTEMS DECOUPLED CONTENT MANAGEMENT SYNDICATED CONTENT PLATFORM AUTOMATION & SCALABILITY ✓ POPULARISE DECOUPLED USE CASE ✶ SILVERSTRIPE CONTENT API ✶ AUTHENTICATED APIS ✶ IDENTITY MANAGEMENT ✶ API INFRASTRUCTURE ✶ CONTENT SHARING ✓ UPGRADE PLATFORMS TO PHP 7 ✶ SURFACE EXISTING USAGE ✶ ANALYTICS MODERNISE CMS UI TECHNOLOGIES SILVERSTRIPE 6 ✓ CONVERT SECONDARY UIs TO REACT ✶ BLOCKS ECOSYSTEM ✓ REACT GRIDFIELD ✓ BLOCKS EDITOR ✓ PATTERN LIBRARY ✶ CONVERT PRIMARY UIs TO REACT ✓ STABILISE GRAPHQL ✶ MULTI CHANNEL Logging and metrics on SSP and CWP ✶ CWP CANDIDATES ON AWS ✶ EXPERIMENTATION AND TARGETING ✶ PERSONALISATION ✶ MARKETING AUTOMATION ✶ LOGGING EVALUATION SILVERSTRIPE 5 ✶ PERFORMANCE ✶ MAXIMISE REUSE ✶ METRICS EVALUATION ✶ AUTOMATED SSL CERT. ON SSP (LET'S ENCRYPT)
• 20-25 contributors/month • 500 commits/month • 63,936 total commits
• Over 11 years (on GitHub) • 583 total contributors • 828,462 lines of code • 879 open, 4,511 closed issues • 69 open, 9,465 closed PRs Contributions * Graph: OpenHub. Stats: GitHub.
• SilverStripe forums • GitHub issues • SilverStripe contributing guide
• SilverStripe DSM • Get involved! How to contribute
Thank you! Twitter: @robbieaverill Email:
[email protected]
21st Sept 2018 •
Robbie Averill