Re: object as parameter
- From: "Ralph" <nt_consulting64@xxxxxxxxx>
- Date: Thu, 15 Mar 2007 12:21:41 -0500
"MP" <NoSpam@xxxxxxxxxx> wrote in message
news:O99Tn8jZHHA.4220@xxxxxxxxxxxxxxxxxxxxxxx
bit<snipped>
Thanks Ralph,
I've read about implementing interfaces many times and played with it a
but not yet ...er... implemented it...<g>
I'm excited to try that and get it more firmly implanted in my 3 remaining
brain cells.
... topic creep ahead <g> ....
Per your recent advice on another thread I've been reading object oriented
design and analysis by Booch. way over my head but very interesting. It's
in a context of a large organization doing huge software projects so I'm
trying to let it simmer in my brain to see what salient concepts I can
actually apply to my simple little world.
In that context and pursuant to your bringing up the topic of implementing
interfaces I've been contemplating the following questions
it is said that vb is not oo because no inheritance
defenders say but we have interfaces,
how different are those worlds
In my naivety, the difference I notice is with an inherited class I assume
you don't need to rewrite a method in a subclass that exists in the super
class, but in implements, you write the signature in the "superclass"
interface and then again write the implementation in the "subclass"
implementing that interface.
Using the object still seems very similar
oo
Superclass
Method Name....return name
Subclass as Superclass
....no method name here
using subclass..... subclass.Name....returns name
vb
Interface
Method Name...no implementation code
Subclass
Implements Interface
Method Name...Return Name...
using subclass..... subclass.Name....returns name
are there profound differences beyond how the "inherited properties" are
written that I'm missing??
,,,is that enough to spark a lively and heated discussion? :-)
Thanks again for your continuing generosity
Mark
Booch is hard reading (at least at first <g>) but required. You will also
want to add "Design Patterns" by Gamma, et al (aka the "Gang of Four" GOF),
"Refactoring" by Fowler, and "Object-Oriented Software Construction" by
Meyer. Go ahead and pick-up a pack of Post-um bookmarks while you are at it.
As you will be using them as general reference tools from here on out.
<smile>
"Microsoft Visual Basic Design Patterns" by Stamatakis is very useful if you
can find it.
The only thing "missing" is that there is a world of difference between the
concepts of OO and the implementation of OO.
To borrow from Stroustrup ...
A Class represents an idea, a concept. An Object a particular example of
that Class. Classes are used to construct Objects. Which simply means once
an object is 'instanced' it doesn't matter a hill of beans how we got there.
Interface inheritance merely means we have one object that supports mulitple
interfaces.
The separation of the dynamic realization of an OO concept from the
mechanics of implementing that concept is not easy at first for a programmer
that is used to structured or data-centric programming. (It is easier for
the newbie as he doesn't know any different. <g>) After all, most of us are
hands-on kind of people. We like to 'see' it.
Inheritance is generally over-stress in OOP articles. It is really a subset
of the broader concepts of generalization and polymorphism. ie, less a
'Pillar of OO' than a construction feature of a pillar. So don't get stuck
on "inheritance". A fact which is even more important with that, surprising
little noticed, feature of dotNet - Generic Coding or Parametric
Polymorphism. Which is the future of OOPLs.
-ralph
.
- Follow-Ups:
- Re: object as parameter
- From: MP
- Re: object as parameter
- References:
- object as parameter
- From: MP
- Re: object as parameter
- From: Michael C
- Re: object as parameter
- From: Ralph
- Re: object as parameter
- From: MP
- object as parameter
- Prev by Date: Re: Control that displays list and manage mouse-click?
- Next by Date: Re: object as parameter
- Previous by thread: Re: object as parameter
- Next by thread: Re: object as parameter
- Index(es):
Relevant Pages
|