When you run a technical user group, finding a speaker every month is a challenge. A couple of months ago, I had an idea that would help me and another user group. I got in touch with Alena, who runs PDX PHP, to share my idea with her. I’d go down to Portland and give a talk there, and Alena will come up to Seattle to give a talk at SeaPHP. She liked the idea. I had a feeling she might. I like visiting Portland, so I was basically giving myself a reason to visit. But if i can help someone else, and build community, then everyone wins!
Last night I spoke at the PDX PHP meetup about the Null Object pattern. It’s one of the newer patterns I’ve adopted lately, so I still working on different scenarios where it might be useful. I proposed in my talk, how it could be used with database SELECT queries. A brief description of Null object is to create Null class that mirrors another class’ methods, so you don’t need to add conditionals to check if a value equals null. This works by using polymorphism.
Anyway, you can download my slides.
I had a great time, met some fantastic people, and spent some time with them. If you have the nearby city with a PHP user group, I recommend you offering to speak there. Not only is it a great way for you to branch out, but user group organizers are always looking for speakers.