RE: [PHP] Object Oriented Programming question
| From: | Bob McConnell | Date: | Wed, 20 Jan 2010 16:31:57 +0000 |
| Subject: | RE: [PHP] Object Oriented Programming question | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-301269@lists.php.net to get a copy of this message | ||
From: tedd
> 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.
Hi Tedd,
Here's one you can think about. I have a box, purchased off the shelf,
with multiple serial ports and an Ethernet port. It contains a 68EN383
CPU with expandable flash and RAM. The firmware includes a simple driver
application to create extended serial ports for MS-Windows, but allows
it to be replaced with a custom application. The included SDK consists
of the gcc cross-compiler and libraries with a Xinu kernel and default
drivers for a variety of standard protocols.
I need to build a communications node replacing the default drivers with
custom handlers for a variety of devices. It must connect to a server
which will send it configuration messages telling it what hardware and
protocols will be connected to each port. The Xinu package includes
Posix threads.
In the past 23 years I have solved this problem six times with five
different pieces of hardware. But I still don't see how to apply OOP to
it.
> ----
>
>> 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.
Understanding basic concepts and understanding how to map them on to
real problems are two entirely different skill sets. I understand the
concepts, they just don't make any sense to me. All of the definitions
are backwards from the way I learned to evaluate problems. I feel like a
carpenter trying to figure out how to use a plumber's toolbox. There are
some things in there I think I recognize, but most of it is entirely
foreign to me.
Cheers,
Bob McConnell