Tag: OOP

SOLID design

Programming #SOLID #OOP #PHP #Architecture #Principles

Aug 10, 2011 - 8 comments

Oh how we love acronyms. We’ve discussed a lot about writing a class, but we haven’t talked about writing classes yet. How do you know if your solution is right? It is not enough to have a working program. SOLID is a set of principles that define severable measurable properties your architecture should have at least, in order to be dubbed right.

Read more »

OOP Intermezzo: Traits

Technology #PHP #PHP 5.4 #Traits #OOP #Concept

Aug 06, 2011 - no comments

OOP Intermezzo: Traits

Recently the first previews of PHP 5.4, with several cool new features, has been released. I want to talk about an OOP concept that will be introduced in this version of PHP: traits.

Read more »

Polymorphism

Programming #OOP #Polymorphism #Inheritance #Concept #Definition #PHP

Jun 23, 2011 - no comments

Classical Greek monomorph

If inheritance can feed your kittens, polymorphism will solve world peace ánd become beauty queen to boot. Read all about it in this article!

Read more »

I'll play nice if you tell me what that means

Theory #PHP #OOP #SOLID #Perfection #Judging

Jun 10, 2011 - no comments

Image: Salvatore Vuono / FreeDigitalPhotos.net

Lukas Kahwe Smith wrote an article about keeping the parameter order intact when overloading the parent Exception’s constructor. He feels that by rearranging the parameter order the child no longer follows the contract of the parent. This is confusing and an ‘OO no-no’, according to him. In another recent article Keith Casey talks about this issue as well.

Read more »

Inheritance

Programming #Inheritance #OOP #Architecure #PHP

May 28, 2011 - no comments

Image: africa / FreeDigitalPhotos.net

A very powerful and dangerous tool in the OOP toolbox is inheritance. Without it, OOP is utterly pointless and totally useless. Inheritance is the way to re-use functionality without re-implementing it. Inheritance will even feed your kittens! Read on for all the magic.

Read more »

$oop->consistency = false;

Programming #OOP #Consistency #Perfection #Encapsulation #PHP

May 18, 2011 - no comments

Image: Ambro / FreeDigitalPhotos.net

There are various ways to access the properties of an object. Is one way better than another? What constitutes a better way? Why should anyone care?

Read more »

Differences between Abstract Classes and Interfaces

Programming #OOP #Concept #Definition #PHP

Apr 23, 2011 - 1 comments

Image: Nutdanai Apikhomboonwaroot / FreeDigitalPhotos.net

I’m sure this topic has been discussed many times before and will be discussed many times again. However, I think there is a very interesting and important meta-discussion going on that is being left out of the spotlights.

Read more »

Intro Object Oriented Programming

Programming #OOP #Concept #Definition #PHP

Apr 16, 2011 - no comments

Image: Idea go / FreeDigitalPhotos.net

I’m going to try and present the very shortest explanation of what OOP is. Even though the concepts we will be talking about are equally valid in most, if not all, modern programming languages that use OOP as their paradigm, I will use PHP in my examples because that’s the language I work with the most. So let’s dig in! 

Read more »