presentation tim numann
TRANSCRIPT
![Page 1: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/1.jpg)
EcoChain
How Flow Helps Us Save The World
![Page 2: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/2.jpg)
Introduction
![Page 3: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/3.jpg)
Hi, I’m Tim NumanInteraction designer, product design, frontend-development, doing web stuff since 1999@TimNuman
EcoChain
![Page 4: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/4.jpg)
A Social Network for SustainabilityWorking together is needed to create real change
EcoChain
![Page 5: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/5.jpg)
EcoChain
1 2 3Map company emissions
Map Emissions to Processes
Map Processesto Products Share your results
![Page 6: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/6.jpg)
“In this talk, a fully working
and operational real-world
TYPO3 Flow application will
be demonstrated”
EcoChain
![Page 7: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/7.jpg)
OOPS.
EcoChain
![Page 8: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/8.jpg)
Backend & FrontendA two part presentation
EcoChain
![Page 9: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/9.jpg)
Part 1 - REST APIChallenges while building a scalable REST API using TYPO3 Flow
![Page 10: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/10.jpg)
26 years old, freelance software engineer, TYPO3 CMS, TYPO3 Flow, Continuous Delivery, Involved since June 2012
Jesper Paardekooper
EcoChain
jesperp on #typo3-flow@jesperp87
![Page 11: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/11.jpg)
Current & NewPlatform architecture
EcoChain
![Page 12: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/12.jpg)
TYPO3 Flow backend67 API calls54 domain models167 Behat tests
Facts & Figures
EcoChain
![Page 13: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/13.jpg)
AuthenticationRetrieving dataUpdating data
Challenges
EcoChain
![Page 14: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/14.jpg)
Authentication in Frontend #1
EcoChain
POST api.local/authenticate
POST frontend.local/authentication/login
EcoChainUserTokenProvider
EcoChainUserToken
![Page 15: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/15.jpg)
![Page 16: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/16.jpg)
Authentication in Frontend #2
EcoChain
GET api.local/usersHEADER EcoChain-Token: topsecrettoken
![Page 17: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/17.jpg)
![Page 18: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/18.jpg)
![Page 19: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/19.jpg)
![Page 20: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/20.jpg)
54 domain objectsAlot of relationsFlexible way of retrieving data
Retrieving data: The challenge
EcoChain
![Page 21: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/21.jpg)
Return all linked objects by default,including ManyToMany collections
Retrieving data: The Bad Solution
EcoChain
![Page 22: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/22.jpg)
16 second authentication calls :(Retrieving data: The Bad Solution
EcoChain
![Page 23: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/23.jpg)
Introduce “fields” parameterAllow multi level control over returned fields
users/?fields=firstName,lastNameusers/?fields=location.nameusers/?fields=location.country.name
Retrieving data: A scalable solution
EcoChain
![Page 24: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/24.jpg)
![Page 25: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/25.jpg)
"Several applications extending the Hypertext Transfer Protocol
(HTTP) require a feature to do partial resource modification. The
existing HTTP PUT method only allows a complete replacement of
a document. This proposal adds a new HTTP method, PATCH, to
modify an existing HTTP resource.“
Source: http://tools.ietf.org/html/rfc5789
Updating Resources
EcoChain
![Page 26: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/26.jpg)
Require all fields in the domain object (except private ones)Replaces the existing domain object
Updating using PUT
EcoChain
![Page 27: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/27.jpg)
Only update the properties providedMust trigger validation annotations
Request parameters not getting through in Flow!http://forge.typo3.org/issues/54600
Updating using PATCH
EcoChain
![Page 28: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/28.jpg)
CachingAPI authentication beyond headersMultiple storage backends
Future challenges
EcoChain
![Page 29: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/29.jpg)
Part 2 - AngularJSBuilding a single page applicationwith AngularJS and TYPO3 Flow
![Page 30: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/30.jpg)
Say what?
www.angularjs.org
AngularJS
EcoChain
![Page 31: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/31.jpg)
MV*RoutingDirectivesServices
EcoChain
![Page 32: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/32.jpg)
What do we want?Install angular and supporting packages in FlowCreate a nice workflowGet a ‘hello’ with an end to end test
EcoChain
![Page 33: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/33.jpg)
EcoChain
What do we need?
Protractor
![Page 34: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/34.jpg)
Phew!
EcoChain
![Page 35: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/35.jpg)
![Page 36: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/36.jpg)
![Page 37: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/37.jpg)
![Page 38: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/38.jpg)
![Page 39: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/39.jpg)
![Page 40: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/40.jpg)
![Page 41: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/41.jpg)
![Page 42: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/42.jpg)
![Page 43: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/43.jpg)
![Page 44: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/44.jpg)
g test:e2e
3 scenarios succeeded
![Page 45: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/45.jpg)
EcoChain
High-tech demo time!(Sadly no lasers…)
![Page 46: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/46.jpg)
EcoChain
Free stuff!https://github.com/jp1987/inspiring-conference-vagranthttps://github.com/jp1987/inspiring-conference-frontend
![Page 47: Presentation tim numann](https://reader034.vdocument.in/reader034/viewer/2022052600/557e68d3d8b42a1e178b4c5a/html5/thumbnails/47.jpg)
EcoChain
Thanks! Any questions?