> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On
> Behalf Of Wangjammer5
> Sent: Thursday, December 20, 2001 2:57 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [Eap-list] Extract interface... issue
>
>
>
> > I see. This is another refactoring. It seems to be something like
> "Replace
> > Inheritance with Delagation". It's not supported yet, but we plan to
> > implement it in some near future.
>
> No I don't think so! I have no inheritance!!!!
IMO when you EXTRACT interface - you should have inheritance. Otherwise what
you do is "Clone interface", but I see the purpose of extract interface,
when you don't want to expose the full fuvctionality of your class to the
client, so you extract your interface and replace the needed refferences.
And for that purpose it works great.
> I haven't read the book "Refactoring" yet, but I will.
> However I don't
> think you should follow this publication as religiously as
> you seem to.
I haven't read it too, but i think that this is a really good book (as good
as Design Patterns of GoF). And this is not "religious following" when you
use something you learned the easy way. BTW look at the wikiwiki site for
more things about refactoring, patterns and etc.
> How about doing things that are intuitive and make sense, rather than
> adhering to a "standard" invented by a single person's book?
my intuition may differ from your intuition, right? For me idea as is now is
pretty intuitive..
> I didn't even consciously realise I was converting to
> delegation until I
> had to describe this problem - we don't always understand our
> own genius
> until after the fact ;-) So, with these convoluted
> complicated names for
> features, people may not understand them unless they have
> read this book.
> (In which case I hope you are getting royalties on sales)
It's a matter of communication - instead of saying
"i.e.-my-desired-result-was-just-to-take-methods-out-of-the-interface-into-a
-new-one,-and-not-change-the-"extends"-of-the-source-interface-at-all.I-am-u
sing-aggregation-in-the-interfaces,-instead-of-inheritance.-i.e.-I-also-adde
d-a-getExtractedInterface()-method-to-the-source-interface."
I prefer to refer to it as delegation - it's clear for me and at least for
the people with who I have to talk about programming, it's easy to get, it's
easy to remember. Or may be I sould say that
I'm-pressing-buttons-on-a-black-piece-of-plastic-connected-with-a-cable-to-m
y-calculating-machine instead of "I'm typing on the keyboard"
>
> For example, the current "Introduce Field" is counter-intuitive to me
> personally. Any normal person I think will assume from the
> name that this
> means you can highlight an undefined variable or an expression and
> convert it to a field of the class. Not so. I still can't
> work out how
> that feature works. Yes I've been told that it works according to the
> book's description of that refactoring, but what use is that
> to me? That
> doesn't make it intuitive.
take a look at http://www.refactoring.com/catalog/index.html
--D.
_______________________________________________
Eap-list mailing list
[EMAIL PROTECTED]
http://www.intellij.com/mailman/listinfo/eap-list