Overview
Syllabus
Intro
Application architecture
Code and component re-use
Rapid Development
With PHP and React.js
ResearchGate SCIENTIFIC NETWORK
PHP templates
Small components over big controllers
Share code between server and client
Virtual DOM
Getting the data in there
Problematic
Underfetching
Flux Datastores
Requirements
Remember: self contained
Do not fetch data directly
Require stuff
Request Cache
Multi-GET
Futures
Data dependencies within a widget
Callbacks
PHP 5.5 Generators
Data dependencies between Widgets
Assembling the tree
Widget Requirement
Getting the data to React.js
Server side rendering
Better user experience
Several approaches
NodeJS proxy
Bundling
Rapid prototyping
Easier Refactoring
Easy re-using of components
Error Handling
Feature toggles
Caching of Components
Load components asynchronously
Conclusion?
Think about your architecture
Frontend and backend are part of the same application
Taught by
PHP UK Conference