RE: Beginner Tutorials for using CLASSES in PHP4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[snip]
I wouldn't play with a lawnmower class in the first place. I use PHP to 
write web applications which deal with database tables, not lawnmowers,
and 
I have yet to find a good reason for using interfaces in such
applications. 
Your contrived examples do not convince me of anything.
[/snip]

This is the best supporting argument that you have provided for your
case, and you are correct...it is not necessary to implement an
interface to perform polymorphism.

We have several applications that dealer with customers and we achieve
polymorphism for the different customer types through interfaces. It is
convenient, easy to document and easy to maintain. Still a relatively
simple application, customer database and all. We also use interfaces to
achieve polymorphism for certain product types.

We used to do all of this functionally or procedurally and made it as
easy to maintain as possible. It worked pretty well but was not nearly a
scalable as required. We also did this in PHP4 OOP without interfaces
and it was easier to maintain and we were able to achieve a limited
polymorphism. PHP5 gave use greater polymorphism without interfaces,
interfaces are just icing on the cake.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux