Re: Should this be an object?
- From: "MP" <Nospam@xxxxxxxxxx>
- Date: Sat, 23 Jun 2007 17:54:17 -0500
"Ralph" <nt_consulting64@xxxxxxxxx> wrote in message
news:eqktRIatHHA.4232@xxxxxxxxxxxxxxxxxxxxxxx
should
"MP" <Nospam@xxxxxxxxxx> wrote in message
news:467c0388$0$3575$ae4e5890@xxxxxxxxxxxxxxxxxxxxxx
<snipped>
as you can see I'm still quite confused on all this...but really, I am
trying to understand.. <g> .... maybe just not successful :-)
To paraphrase Stroustrup, poorly... <g>
Objects (classes) exist to help a programmer organize his code more
logically. To make it easier to avoid mistakes and to help him find and
repair mistakes if a mistake is made. Period.
An object-oriented program is simply one that is build up from the
colaboration of various types of objects through well-defined interfaces.
There are no specific rules as to how these interfaces should be used, or
even what the interfaces should look like. The only rule is that they
provide some logical services which simplifies one's understanding of thepolymorphism,
solution and makes it easier to maintain. To that end, a whole range of
mechanisms are at one's disposal - Abstraction, encapsulation,
hierarchies, etc.service
On the other hand, sometimes an object isn't needed to provide a solution.
Sometimes everything a process needs is right at hand and fully
understandable in place. In that case no amount of encapsulation,
abstraction, polymorphism, ... is going to improve anything. (Quite the
opposite usually.)
Usually the decision of whether to use an object or not, or what kind of
services to support if an object is choosen, is totally dependent on
requirements outside the mechanics of OO. Anything from how many may bedismal
needed to how often you may need to revisit will likely impact your
decision. One commonly has to adopt a holistic view.
Your so called "unsuccessful" solution may be ideal in one case, and
in another. To know the difference - trust your instincts. If somethingseems
feels silly or awkward - it is usually silly or awkward. If something
right - it is probably a good working solution. Let the problem be yourproblem.
guide to developing a solution. Don't try and force a solution on a
Or make a problem out of a solution. <g>
hth
-ralph
Thanks to all for your inputs.
Mark
:-)
.
- References:
- Should this be an object?
- From: MP
- Re: Should this be an object?
- From: Larry Serflaten
- Re: Should this be an object?
- From: MP
- Re: Should this be an object?
- From: MP
- Re: Should this be an object?
- From: Ralph
- Should this be an object?
- Prev by Date: Re: TRY AGAIN: Reset a Form During Run-Time
- Next by Date: Re: TRY AGAIN: Reset a Form During Run-Time
- Previous by thread: Re: Should this be an object?
- Next by thread: Writing a 2D numeric array to a file, and general debugging
- Index(es):
Relevant Pages
|