REX API Platform

REX API Platform

Talk given at PHPTour Nantes 2017
Joindin: https://joind.in/event/php-tour-2017-nantes-/rex-api-platform

418997665c4a3368515ecf9c3d746b95?s=128

Olivier Dolbeau

May 19, 2017
Tweet

Transcript

  1. Olivier Dolbeau 1

  2. 2

  3. Disclaimer I used API Platform for a side project. I'm

    NOT an heavy user. 3
  4. 4

  5. 5

  6. 6

  7. 7

  8. 8

  9. 9

  10. 10

  11. 11

  12. 12

  13. 13

  14. 14

  15. 15

  16. 16

  17. 17

  18. Enough documentation! 18

  19. Who am I? 19

  20. Twitter: @odolbeau Mastodon: odolbeau@mamot.fr Olivier Dolbeau Web Developer / Architect

    Symfony fan #swarrot maintainer be[a|e]r lover 20
  21. Time Love @Annotations UUID 21

  22. 22

  23. Side project Goal: create a MVP for a SAAS product

    Need: a sexy & dynamic interface Let's use API Platform + a random modern JS framework! 23
  24. Basic business rules SAAS product: need to deal with clients

    As a client: I can submit documents 24
  25. Project organisation 25

  26. Business organisation 26

  27. An entity 27

  28. Business organisation 28

  29. The storage 29

  30. Create 30

  31. Update 31

  32. Find a document 32

  33. Business organisation 33

  34. Normalizer 34

  35. Denormalizer 35

  36. Business organisation 36

  37. 37

  38. 38

  39. 39

  40. UserProvider 40

  41. UserInterface implementation 41

  42. 42

  43. 43

  44. From Doctrine to ES No pain, no gain. 44

  45. From Doctrine to ES With UUIDs. 45

  46. From Doctrine to ES Without annotations. 46

  47. AppBundle 47

  48. 48

  49. 49

  50. 50

  51. “ A data provider using Doctrine ORM to retrieve data

    from a database is included with the library and is enabled by default. “ But sometime, you want to retrieve data from other sources such as another persistence layer, a webservice, ElasticSearch or MongoDB. Custom data providers can be used to do so. 51
  52. 52

  53. 53

  54. 54

  55. 55

  56. ? 56

  57. 57

  58. 58

  59. 59

  60. 60

  61. 61

  62. 62

  63. 63

  64. 64

  65. 65

  66. We created An ItemDataProvider A CollectionDataProvider A Subscriber to persist

    our entity A custom Normalizer 66
  67. 67

  68. 68

  69. Hydra JSON-LD Doctrine Documentation JWT Full working example without Doctrine

    Ecosystem 69
  70. ? Performances Filters Relations Pagination Extensions 70

  71. 71