Re: [PHP] A Good OOP Tutorial/Read?

[email protected] (Bastien)
Newsgroups php.general
Message-ID <[email protected]>

Bastien Koert

On 2013-05-16, at 5:28 PM, Tedd Sperling <[email protected]> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.