From: tedd on
At 10:26 AM -0500 1/19/10, Bob McConnell wrote:
>Some problems will fit into it, some don't.

I teach OOP thinking at the local college and haven't run into a
problem that doesn't fit. For example, in my last class I had a woman
who wanted to pick out a blue dress for her upcoming wedding
anniversary. The class worked out the problem with a OOP solution.

----

>Some people can look at problems and see objects and some can't.

That's for certain -- but in time just about everyone can understand
the basic concepts of OOP.

----

>But in most cases, it is not easy to take an
>existing procedural program and re-map it into objects. It would be
>easier to start over from the specification and write it from scratch in
>the object model.

I agree with that because part of OOP is understanding/defining the
problem through an object oriented perspective -- it's a paradigm
shift in thinking.

However, a programmer who is good in procedural also understands
problem solving. OOP and Procedural are just two different approaches
and each brings it's own set of tools/problems to the table.

---

>If you have been doing procedural programming, don't worry if you don't
>figure it out right away. It is not an easy transition to make. Many of
>us with decades of programming behind us will never be able to make that
>switch. Our brains are too tightly locked into the previous thought
>patterns.
>
>Bob McConnell

While I teach OOP, I don't write any OOP for clients. My charge is to
do things quickly and OOP requires a considerable amount of analysis
before creating a solution. In most cases, I don't have the time.
Besides, I'm more of an agile programmer and that doesn't lend itself
well to OOP, IMO.

Also IMO, one can argue the advantages that OOP and Design Patterns
bring to the table over procedural, but after all is said and done,
if you know your stuff in procedural, OOP is not going to provide you
with much that you don't already have.

Cheers,

tedd

--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
From: Paul M Foster on
On Wed, Jan 20, 2010 at 06:47:04AM -0600, Jay Blanchard wrote:

> [snip]
> > Another advantage of OOP that is difficult to
> > provide via the procedural paradigm is polymorphism.
>
> Agreed. Though the advantages of polymorphism are questionable,
> depending on your viewpoint.
> [/snip]
>
> In a loosely typed language like PHP that advantages of polymorphism far
> outweigh any potential disadvantages, especially where virtual functions
> are concerned.

My viewpoint may be jaundiced from having programmed in C++, but the
polymorphism of PHP seems a little crippled by comparison.

Paul

--
Paul M. Foster
From: "Jay Blanchard" on
[snip]
My viewpoint may be jaundiced from having programmed in C++, but the
polymorphism of PHP seems a little crippled by comparison.
[/snip]

I wholeheartedly agree, but I figured out how to work with it in PHP to
my advantage and the advantage of my team. It'll get better...
From: Robert Cummings on
Jay Blanchard wrote:
> [snip]
> My viewpoint may be jaundiced from having programmed in C++, but the
> polymorphism of PHP seems a little crippled by comparison.
> [/snip]
>
> I wholeheartedly agree, but I figured out how to work with it in PHP to
> my advantage and the advantage of my team. It'll get better...

Certainly it is lacking compared to C++, but it's difficult to get that
kind of functionality from a loosely typed language.

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP
From: Richard Quadling on
2010/1/20 tedd <tedd.sperling(a)gmail.com>:
> Also IMO, one can argue the advantages that OOP and Design Patterns bring to
> the table over procedural, but after all is said and done, if you know your
> stuff in procedural, OOP is not going to provide you with much that you
> don't already have.

You also have to consider that whilst PHP provides all the fancy
clever OOP facilities, it is written in C, not C++. So, as you say, if
you know your stuff ...

--
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling