Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Presentation tim numann

1,864 views

Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Presentation tim numann

  1. 1. EcoChain How Flow Helps Us Save The World
  2. 2. Introduction
  3. 3. Hi, I’m Tim Numan Interaction designer, product design, frontend- development, doing web stuff since 1999 @TimNuman EcoChain
  4. 4. A Social Network for Sustainability Working together is needed to create real change EcoChain
  5. 5. EcoChain 1 2 3Map company emissions Map Emissions to Processes Map Processes to Products Share your results
  6. 6. “In this talk, a fully working and operational real-world TYPO3 Flow application will be demonstrated” EcoChain
  7. 7. OOPS. EcoChain
  8. 8. Backend & Frontend A two part presentation EcoChain
  9. 9. Part 1 - REST API Challenges while building a scalable REST API using TYPO3 Flow
  10. 10. 26 years old, freelance software engineer, TYPO3 CMS, TYPO3 Flow, Continuous Delivery, Involved since June 2012 Jesper Paardekooper EcoChain jesperp on #typo3-flow @jesperp87
  11. 11. Current & New Platform architecture EcoChain
  12. 12. TYPO3 Flow backend 67 API calls 54 domain models 167 Behat tests Facts & Figures EcoChain
  13. 13. Authentication Retrieving data Updating data Challenges EcoChain
  14. 14. Authentication in Frontend #1 EcoChain POST api.local/authenticate POST frontend.local/authentication/login EcoChainUserTokenProvider EcoChainUserToken
  15. 15. Authentication in Frontend #2 EcoChain GET api.local/users HEADER EcoChain-Token: topsecrettoken
  16. 16. 54 domain objects Alot of relations Flexible way of retrieving data Retrieving data: The challenge EcoChain
  17. 17. Return all linked objects by default, including ManyToMany collections Retrieving data: The Bad Solution EcoChain
  18. 18. 16 second authentication calls :( Retrieving data: The Bad Solution EcoChain
  19. 19. Introduce “fields” parameter Allow multi level control over returned fields users/?fields=firstName,lastName users/?fields=location.name users/?fields=location.country.name Retrieving data: A scalable solution EcoChain
  20. 20. "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
  21. 21. Require all fields in the domain object (except private ones) Replaces the existing domain object Updating using PUT EcoChain
  22. 22. Only update the properties provided Must trigger validation annotations Request parameters not getting through in Flow! http://forge.typo3.org/issues/54600 Updating using PATCH EcoChain
  23. 23. Caching API authentication beyond headers Multiple storage backends Future challenges EcoChain
  24. 24. Part 2 - AngularJS Building a single page application with AngularJS and TYPO3 Flow
  25. 25. Say what? www.angularjs.org AngularJS EcoChain
  26. 26. MV* Routing Directives Services EcoChain
  27. 27. What do we want? Install angular and supporting packages in Flow Create a nice workflow Get a ‘hello’ with an end to end test EcoChain
  28. 28. EcoChain What do we need? Protractor
  29. 29. Phew! EcoChain
  30. 30. g test:e2e 3 scenarios succeeded
  31. 31. EcoChain High-tech demo time! (Sadly no lasers…)
  32. 32. EcoChain Free stuff! https://github.com/jp1987/inspiring-conference-vagrant https://github.com/jp1987/inspiring-conference-frontend
  33. 33. EcoChain Thanks! Any questions?

×