$30 off During Our Annual Pro Sale. View Details »

Leçon numéro 139, API Platform ce n'est bon qu'...

Leçon numéro 139, API Platform ce n'est bon qu'a faire un POC, FAUX !

La première chose qui est mise en avant avec API Platform c'est la capacité de faire du développement rapide d'application. C'est vrai. Ça ne signifie pas pour autant qu'il est impossible de réaliser une application complexe avec une séparation de la couche métier et de l'API publique. Voyons ensemble les mécanismes avancés d'API Platform et les outils qui en feront votre framework API en PHP.

Grégoire Hébert

March 01, 2019
Tweet

More Decks by Grégoire Hébert

Other Decks in Programming

Transcript

  1. Grégoire Hébert ‣Senior Developper & Trainer @ Les-Tilleuls.coop ‣CEO of

    MasterClass by Les-Tilleuls.coop @gheb_dev @gregoirehebert
  2. LvL 0: Always the same URL in POST with a

    200 return status code. POST: /api
  3. LvL 1: Each type of data has its own URL.

    POST: /books POST: /customers
  4. LvL 2: We use specific verbs for specific actions with

    status codes according to the result. GET: /books POST: /books PUT: /books/12
  5. LvL 3: Hateoas - Hypermedia As The Engine Of Application

    State. We add links to describe how to get to the information in the answer. { "@context": { "comments": "http://api.example.com/vocab#comments" }, "@id": "http://api.example.com/an-issue", "title": "An exemplary issue linking to its comments", "comments": { "@id": "http://api.example.com/an-issue/comments" } }
  6. Septembre 2015 V2 Announced Mai 2016 V2 Alpha Available January

    2017 V2 Stable Available V2.2 February 2018
  7. Septembre 2015 V2 Announced Mai 2016 V2 Alpha Available January

    2017 V2 Stable Available V2.2 February 2018
  8. Septembre 2015 V2 Announced Mai 2016 V2 Alpha Available January

    2017 V2 Stable Available V2.2 February 2018
  9. Septembre 2015 V2 Announced Mai 2016 V2 Alpha Available January

    2017 V2 Stable Available V2.2 February 2018
  10. Septembre 2015 V2 Announced Mai 2016 V2 Alpha Available January

    2017 V2 Stable Available February 2018 V2.2 February 2019 V2.4 (beta2)
  11. Septembre 2015 V2 Announced Mai 2016 V2 Alpha Available January

    2017 V2 Stable Available February 2018 V2.2 February 2019 V2.4
  12. Septembre 2015 V2 Announced Mai 2016 V2 Alpha Available January

    2017 V2 Stable Available February 2018 V2.2 February 2019 V2.4
  13. Septembre 2015 V2 Announced Mai 2016 V2 Alpha Available January

    2017 V2 Stable Available February 2018 V2.2 February 2019 V2.4
  14. Any Public, Protected, Private property will be accessible through your

    API 
 As long as you define the means to access it ! THANKS TO… ?
  15. What if I want to set/remove ownership right after the

    change of state 
 with API Platform?
  16. Create a resource Output is set to false, nothing to

    do We need to create the transformers
  17. THANK YOU ! I am so thirsty right now… But

    if you’ve got any question I can make an effort :)