Please join us at the new JavaWorld Q&A Forums. Your existing login will work there. The discussions here are now read-only.


JavaWorld Talkback >> 960283

Pages: 1
Anonymous
Unregistered




Needless Fluff
      #23129 - 10/26/05 05:30 PM

Why, oh why did the author need to get bogged down in discussing Swing, drag-n-drop and Servlets? The so-called "technique" could have and should have been presented without the distraction of an underlying, unrelated "system".

The author is correct in that the technique is not true multiple inheritance. I would say it's not even simulated multiple inheritance since instances of SendMessageServlet are not instances of MessageClient.

At any rate, JavaWorld is just as guilty for letting this article appear on its site. This used to be the premier site for Java technical information. Now it's a garbage bin.


Post Extras: Print Post   Remind Me!   Notify Moderator  
fire
Unregistered




Re: Needless Fluff [Re: Anonymous]
      #23175 - 10/28/05 07:23 AM

This technique is widely discussed, e.g. in Thinking in Java as a work-around for the case that you want to add extra behaviours from some interfaces/classes to an existing class, whose superclass cannot be changed.

For beginners (or even programmers with experiences of a few years) it is still a good lesson. Don't be too critical, ;-)


Post Extras: Print Post   Remind Me!   Notify Moderator  
Anonymous
Unregistered




Re: Needless Fluff [Re: fire]
      #32584 - 06/02/06 01:28 AM

I must say that I agree with the first post (the anonymous) one, for "Needless fluff". First the author of the article starts by saying that we will see "multiple" inheritance with a Swing example, which should have something easy to digest, but then it jumps to a much more complicated example. To say the least, this is confusing. Moreover the example provided doesn't make a clear statement why multiple inheritance is required in this case (not to mention that, as the first poster said, the example provided doesn't simulate the MI too much). In my opinion this trick, with using inner classes, is just a simple variation for the solution provided by most Java books when it comes to multiple inheritance: use a local reference to the other class, and let delegation do the magic.

Post Extras: Print Post   Remind Me!   Notify Moderator  
mastermind
stranger


Reged: 07/15/05
Posts: 1
Re: Needless Fluff [Re: Anonymous]
      #37749 - 10/04/06 01:49 AM

very true...

Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 1 anonymous users are browsing this forum.

Moderator:   

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 4745

Rate this topic

Jump to

Contact us JavaWorld

Powered by UBB.threads™ 6.5.5