API Platform Conference 2023 - Ryan Weaver - Create the DTO system of your dreams

Published: 10 November 2023
on channel: Les-Tilleuls.coop
3,254
98

One of the best features of API Platform is the ability to add #[ApiResource] above an entity and… bam! You have a fully-functional API! Though, if you want to have full control and peak clarity, nothing beats creating a dedicated DTO class.

But, creating a DTO class - especially when the data comes from Doctrine - feelslike reinventing the wheel! Suddenly you need to create a state provider, stateprocessor and filters… which all do the same thing that API Platform does automatically for entities.

No more! In this talk, we’ll explore a new feature called “state options” that gives you the flexibility of a DTO class, but the convenience of an entity. We’ll explore how this works & exactly what you need (e.g. a mapper system) to create a DTO class and have it “just work”.

_________
More info: https://api-platform.com/con/2023/
X/Twitter:   / apiplatform  
Music credits: Solar Flare, Adi Goldstein


Watch video API Platform Conference 2023 - Ryan Weaver - Create the DTO system of your dreams online without registration, duration hours minute second in high quality. This video was added by user Les-Tilleuls.coop 10 November 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 3,254 once and liked it 98 people.