Re: A Good OOP Tutorial/Read?

From: Date: Thu, 16 May 2013 22:34:14 +0000
Subject: Re: A Good OOP Tutorial/Read?
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-321095@lists.php.net to get a copy of this message
Bastien Koert On 2013-05-16, at 5:28 PM, Tedd Sperling <tedd.sperling@gmail.com> wrote: > -Dan: > > I teach this stuff and still don't fully understand the why/when for interfaces. > > Even the guru's I talk with can't give me a good explanation as to what the > advantages are in using them. I've done a lot of experimenting and can't see any advantage > for them other than grouping different classes together and creating a new data-tytpe. > > Other than that, from my perspective interfaces are mythicode. > > So, if you find a good reference, please let me know. > > Cheers, > > tedd > > > _____________________ > Tedd, The best argument I've seen for interfaces is to abstract calling classes to avoid binding to a particular framework. Phpmaster was where I saw that. The idea was that by implementing an interface, the swapping out a framework was much simpler since the only code that needed to be written was more the interface adapter to the new framework Bastien

« previous php.general (#321095) next »