🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #15947

Re: Wrapper classes

#15947
From: Robert J. Muller
Date: Mon, 19 Apr 1999 00:00
40 lines
2531 bytes
Not to start a flame fest, I hope, but the best reference on this kind of
thing is probably:

Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides.
Design Patterns: Elements of Reusable Object-Oriented Software.
Addison-Wesley, 1997. ISBN 0-201-63361-2

However, if you look at some of the applicable patterns such as Adapter and
Bridge, you may find less justification for your position than you might
think. "Wrapping" the C functions doesn't really achieve much for you in
practice without the accompanying redesign/reimplementation using OO design
techniques. Just packaging the functions into an interface (Adapter) has
the main purpose of providing an interface needed by something else (stress
"needed" here--unless your code is already written to require the
interface, it isn't really needed, as you can just call the C functions
directly in the implementation). If the C functions are a solid, reusable
implementation, then the Bridge pattern may apply: "Decouple an abstraction
from its implementation so that the two can vary independently." The key
here is to abstract the C functions into objects so that you can change the
C functions later without changing the interface. This probably also goes
beyond just "wrapping" as you need to generalize a sufficiently robust
abstraction that will survive reimplementation and can be reused in many
different domains.

Hope this helps!
  --Bob Muller

Jeffrey K Regan wrote:

> Can anybody help??
>
> I am in the rather interesting position of having to explain the value
> of object oriented programming to a large corporate architecture team.
> Specifically, I need to explain to them the value of wrapping
> collections of C functions into C++ classes.
>
> Can anybody help me with references that I can use to supplement my own
> explanations? I still cannot believe I am reduced to explaining this
> kind of fundamental thing to a corporate system architecture team. Go
> figure!
Technical Details
Message-ID: <371B6A46.21F7598E@valuestar.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3719EB9B.47F2F99A@swbell.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,d7b7a7d4aee60f48
X-Google-Attributes: gidf74b3,public
From: "Robert J. Muller" <bmuller@valuestar.com>
Subject: Re: Wrapper classes
Date: 1999/04/19
Message-ID: <371B6A46.21F7598E@valuestar.com>
X-Deja-AN: 468379781
Content-Transfer-Encoding: 7bit
References: <3719EB9B.47F2F99A@swbell.net>
Content-Type: text/plain; charset=us-ascii
Organization: ValueStar, Inc.
Mime-Version: 1.0
Reply-To: muller@computer.org
Newsgroups: borland.public.jbuilder.java.language