RE: [PHP-DEV] Aggregation, Multiple Inheritence, pros/cons
| From: | Pierre-Alain Joye | Date: | Tue, 09 Apr 2002 09:11:40 +0000 |
| Subject: | RE: [PHP-DEV] Aggregation, Multiple Inheritence, pros/cons | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-82327@lists.php.net to get a copy of this message | ||
> Could you please explain how interfaces promote code reuse?
> I am not the perfect java pro, and as I understand it,
> interfaces define a set of instance variables and methods that
> must be there in order to be compliant to an interface, but
> provide to way to import an implementation of such an interface
> into an existing class.
Interface provide standart ways to import/use modules inside a project
and/or an existing applications. A good introduction of interfaces is the
IDL format ( dynamicly generated from a dll/tlp in COM by ex. ). I believe
that is nothing to do with code reuse, but specifically binary modules
reuse.
That makes developer's life easier and provides a multi-langage support for
modules import, in this case that promotes code reuse, but that s not make
the code reusable.
A good definition is available in the msdn site somewhere in COM
introduction ;).