Talk:Wrapper function

From Wikipedia, the free encyclopedia
Jump to: navigation, search
          This article is of interest to the following WikiProjects:
WikiProject Java (Rated Start-class, Low-importance)
WikiProject icon This article is within the scope of WikiProject Java, a collaborative effort to improve the coverage of Java on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Start-Class article Start  This article has been rated as Start-Class on the project's quality scale.
 Low  This article has been rated as Low-importance on the project's importance scale.
 
Note icon
This article has been automatically rated by a bot or other tool because one or more other projects use this class. Please ensure the assessment is correct before removing the |auto= parameter.
WikiProject Computing (Rated Start-class, Low-importance)
WikiProject icon This article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Start-Class article Start  This article has been rated as Start-Class on the project's quality scale.
 Low  This article has been rated as Low-importance on the project's importance scale.
 
WikiProject Computer science (Rated Start-class, Low-importance)
WikiProject icon This article is within the scope of WikiProject Computer science, a collaborative effort to improve the coverage of Computer science related articles on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Start-Class article Start  This article has been rated as Start-Class on the project's quality scale.
 Low  This article has been rated as Low-importance on the project's importance scale.
 

Merger proposal[edit]

Wrapper function and Adapter pattern should really be talking about the same thing. As it stands, Adapter pattern uses the concept of a Wrapper function while the latter details a lesser-used, but equally valid, application of wrapper functions. OrangeDog (talk) 01:01, 28 November 2008 (UTC)

I'm happy to defer to your judgement on the exact meaning of the two words, and hence the desirability of merging, since I don't know much about adapter patterns. At present this article seems (in my not-so-unbiased opinion) relatively layman-friendly, while adapter pattern is much more technical. Hopefully the result of any merge will achieve both, as well as making the relationship between the two clear. Olaf Davis | Talk 13:49, 28 November 2008 (UTC)

Again, noted that Delegation (programming) is also mostly talking about the same stuff. OrangeDog (talk) 15:16, 2 December 2008 (UTC)

I agree that what is currently here I would agree was Wrapping or Delegation, and is a form of the Adapter pattern at compile time. There is a different form of Adapter pattern used in eg Eclipse in which an adapter class is looked up at runtime, which is different from Wrapping or Delegation.--Ronslow (talk) 13:21, 12 December 2008 (UTC)

In the examples provided for this, wrapping/delegation is used in the Provider and Adapter classes. The word "wrap" is also used in the description. I think this shows wrapper functions are clearly linked to all kinds of adapter. OrangeDog (talk) 14:57, 12 December 2008 (UTC)

I respectfully disagree with this proposal. Wrapping other objects is a recurring theme in many design patterns, as delegation is encouraged over inheritance. Many people actually use Wrapper as a synonym for Decorator. (http://exciton.cs.rice.edu/JavaResources/DesignPatterns/DecoratorPattern.htm) Some people even use Wrapper when talking about the Facade design pattern. Personally I don't think "wrapper" helps clarify the intent of the Adapter pattern, or any other pattern. It does not add any value, and may even confuse. It may be useful when discussing the mechanics of the pattern: "it wraps another object". --Remko Popma —Preceding unsigned comment added by 210.239.48.141 (talk) 08:45, 16 December 2008 (UTC)

I think it might be a job for WikiProject Computing. Delegation (programming) now has 3 merge proposals. While the design patterns section of Wikipedia is pretty good overall, it misses some things. Meanwhile, pages about specific techniques are duplicating lots of information and causing confusion of precise terminology. OrangeDog (talk) 14:49, 16 December 2008 (UTC)

I also respectfully disagree with the proposal. My feelings are. The 'adapter' class that defines the expected interface maps the methods in that interface to those defined by a class that defines the interface that is to be adapted. In my feeling a 'wrapper' actually works like a cover. The intent of a wrapper is to manage the content. It does not to have to, but may, contains the methods provided by the class that is wrapped like a the Adapter will do. The wrapper is, active, while the adapter is, by definition, passive. They can not be interchanged! Excusses for my englisch. Lord Anubis, 23:41, 01 Januari 2009 —Preceding unsigned comment added by 82.95.218.199 (talk)

I think this is getting closer to a basis to work from. If distinctions can be drawn with proper references, then the articles in question can be disentangled and developed separately OrangeDog (talk) 22:59, 1 January 2009 (UTC)