The Artima Developer Community
Sponsored Link

Java Buzz Forum
Restoring the "Delegate" Concept To Java

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Scott Delap

Posts: 1154
Nickname: scottdelap
Registered: Sep, 2004

Client / Server application developer.
Restoring the "Delegate" Concept To Java Posted: Apr 11, 2005 6:54 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Scott Delap.
Original Post: Restoring the "Delegate" Concept To Java
Feed Title: ClientJava.com
Feed URL: http://www.clientjava.com/archives/wireless_mobile.rdf
Feed Description: Client/Desktop Related Java Development
Latest Java Buzz Posts
Latest Java Buzz Posts by Scott Delap
Latest Posts From ClientJava.com

Advertisement

If you are brave enough to fight through the ad jungle that is JDJ, there is an article on creating method delegates in Java. I'm not sure I see a lot of usefulness to this technique myself. As the author points out, this is not compile time safe. The quick creation of listeners is interesting as is being able to execute a method in a variety of manners by changing how you execute the delegate. I still think I'd rather see a structure created for asynchronous versus synchronous application events than to simply wrap a method and let something else execute it.

Restoring the "Delegate" Concept To Java
Back in October 1996, in an attempt to eliminate the need for this bloated syntax, Microsoft introduced an object-oriented method pointer into J++ called a "delegate." Sun Microsystems, citing the delegate as language pollution, sued Microsoft a year later for violating its Java license agreement. Had the delegate become part of Java, would Swing programming be easier? Could that technique have solved many of the Swing threading headaches that we're faced with today?

Read: Restoring the "Delegate" Concept To Java

Topic: Concurrent Fun Previous Topic   Next Topic Topic: BeJUG - Skin Look And Feel, slides in PDF

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use