Traits: PHP's best feature that you aren't using


Comments are closed.

Mathieu Imbert at 10:27 on 5 Aug 2016

It was an interesting talk. Chase was able to well explain what traits are, and how to use them. But it was too short. Traits are simple, but it could use real life examples. Maybe some simple simple without / with traits to show how they can be implemented.

Anonymous at 11:46 on 5 Aug 2016

Too short, needed more examples.

Anonymous at 11:46 on 5 Aug 2016

More real world examples to lengthen talk

Chris Brown at 13:54 on 5 Aug 2016

This talk has great potential.
As I shared in person, I'd recommend starting with some real-world functional examples, then explain some theory points (such as the various syntax implementations to handle clashes on method/property names etc), and then the slide about "popular objections to traits". These would have more contextual relevance after people have first seen a real practical example.

As to presentation skills, suggest working on catching the use of "um" instead of just a bit of silence.

For a starting example, I suggest starting with a tiny class that "does something" that needs a solution that could be extracted into a trait ... implement the solution without the trait ... then extract it into the trait .... and then show another unrelated class that also needs the same solution, and simply import the trait and demonstrate that the problem is instantly solved. After all that then the theory and alternate syntaxes, and objections, will have some context to understand and would serve more as "advanced tips" instead of being the core content as today's presentation did.

There's great value in bringing knowledge of how to use these tools to a conference audience. I look forward to seeing a future version of this talk.

enas hasan at 23:08 on 6 Aug 2016

It was nice and useful. However, I found it too short and hoped to learn in more depth about examples using traits.