NYCPHP Meetup

NYPHP.org

[nycphp-talk] SPL - Do you use?

John Zabroski johnzabroski at yahoo.com
Sun Sep 30 22:50:07 EDT 2007


The benefit of object-orientation is message dispatch.  Objects are peers.  They define what to do, not how to do it.  Delegation of responsibilities is therefore way more dependable a concept than simply polymorphism.  If the notion of a network of inter-cooperating agents working together to accomplish a task resembles your task, then objects might make sense.

Polymorphism isn't why object-oriented frameworks are successful.  In general, frameworks are successful because the problem application domain was well understood before it was ever translated into code.  Frameworks tend to address a vertical line of business (some ill-defined problem application domain) or a horizontal line of business (i.e., security).  Frameworks are also successful because they usually glue together off-the-shelf software in interesting ways that rapidly solve problems.
  
  Also, if you want to make your code to be very simple, then just obey the first rule of programming: figure out what you want to say before you figure out how to say it.  Meaningful abstractions can never be crafted in the absence of a well-defined context.

Programming language concepts don't make programming simple.  Deep, penetrating knowledge of the problem application domain makes programming simpler.  Having a language that you can easily translate that knowledge into is also a boon, just as having off-the-shelf software that you can glue into your architecture is a boon.

Michael B Allen <ioplex at gmail.com> wrote:
 OOP provides one major benefit - polymorphism. If you don't need
polymorphism, you should not be using OOP. But in some cases
polymorphism can make your code very simple and yet highly extensible.
It *can* be extremely powerful.
       
---------------------------------
Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel and lay it on us.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070930/b291d293/attachment.html>


More information about the talk mailing list