Talk in English - US at AmsterdamPHP Monthly Meeting - June/2013
Short URL: https://joind.in/talk/2fce7
(QR-Code (opens in new window))
Traits and statics, the right way
Comments are closed.
This was one of the talks that i really had to sink down in a night of sleep, because right after the talk i still had the same feeling about traits themselves. Since the introduction of traits in PHP i've been very reluctant to start using them, it is very easy to abuse them or to overdo it. Wrong usage results in a very huge pain when debugging and readability, even if you use xdebug.
At this point we use them in production, on simple reusable parts like loggers or common implementations of interfaces that are used in multiple classes.
I'm not against using traits, but i suggest everyone to be very carefull when you want to use traits inside traits (inside traits and so on).
The statics part was all clear to me, usually people who use statics a lot, are very keen on using the singleton pattern of which i think, should be used with great caution. But the things that were included in the talk about statics, i agree with. Global scope and tight coupling is evil!
One thing to help you in your future talks is, when you're not wearing a microphone, try to prevent turning your head to the beamer screen all that often because it gets harder to understand you if you talk the other way. I was sitting all the way in the back, and it was understandable when you talked towards the beamer screen but it was a lot harder.
Brave topic as a first talk! Even though the topic is controversial the point came across clearly and it was extremely easy to follow.
Somer nervousness was visible in the beginning of the talk but that is to be expected for a first talk. Frank eased into the talk and added some humour as well (not sure if it was on purpose but it worked out well)
I still didn't get fully convinced on why traits or statics would be nice to use and maybe some real life examples would have been better than the typical "human" class demo examples.
There were also some typos in the slides so having someone else go over the slides for next talk would be advisable before the next talk, because after this, I fully believe Frank is able to give more talks at different events!
Great talk by a great speaker, who definitely knows what he is talking about. There were some remarks made by people to make this a traits only talk, but i sure did like statics being part of the talk, if it was only to spark up the discussion. You pointed out clearly how they can be used right or wrong, perhaps you could trim down the introduction to statics a bit and expand the in-depth part about traits. Overall a nice subject and love to see you do another talk sometime.
I found Frank to be an interesting speaker, who made a difficult topic reasonably accessible. And, he's got jokes - which keeps the flow going when unplanned stuff happens. I'd surely check out another talk by him.
As a pointer, I'd say that -ignoring the typo's- the material in the slides left the most room for improvement. The example with traits as limbs was just too 'far out' - simple is good, but a practical example always makes more sense to me.