Export or edit this event...

PDX PHP - Using the Null Object Pattern

ImpactFlow
2222 NE Oregon St
Portland, OR 97232, us (map)

Website

Description

Food, give-a-ways, speakers and a great time to network with the fabulous PHP Community!

Using the Null Object Pattern

When you develop OO PHP applications, you'll eventually get the error message "PHP Notice: Trying to get property of non-object". You can add a conditional to check if an object is null. There is however a better way. Null Object Pattern is a design pattern that helps you to simplify your application logic. The Null Object patthern removes the need to check for an object vs null by using Polymorphism. I'll demonstrate how it works with generic PHP code, and how you can apply it to work with database results.


Presented by Andrew Woods


Andrew Woods is a seasoned Web Developer, and a command line aficionado. He's been making websites since 1999. He organizes the Seattle PHP User Group (@seaphp) and Pacific Northwest PHP conference (@pnwphp). He's an advocate for the open web, and values accessibility and design. He has a knack for making difficult topics easy to understand. In his free time, Andrew enjoys coffee, movies, exploring the city, and playing guitar. He is currently learning to speak Spanish.

Share

Tags