Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Where I work, employees use a third-party desktop program for their clients. This program saves data to a flat file. My colleague wants to write a Java program that uploads that flat file to a remote server, opens the desktop program when the flat file is downloaded from a Web site, and checks if the desktop program is running or not by looking at the Windows processes.

He keeps calling this helper/utility program a "wrapper." But it doesn't wrap anything! I tried to clear it up with him, but he said, "Well, I call it a wrapper." He now has everyone in the company calling it a "wrapper." What would you call it? I say that it's a helper program or utility program.

share|improve this question
1  
Sounds like a more appropriate term would be something like a "Sentinel/Watcher" program. –  Agent_9191 Nov 3 '10 at 6:13
    
Sounds like your coworker could be summarized as an asshat :P That definitely doesn't sound like what I would call a wrapper at all. A wrapper should stand between the existing application and some external force. At the very least he is ignorant of correct terminology... –  Rig Feb 19 '12 at 16:41
    
'Tis but thy name that is my enemy; / Thou art thyself, though not a Montague. / What's Montague? it is nor hand, nor foot, / Nor arm, nor face, nor any other part / Belonging to a man. O, be some other name! / What's in a name? that which we call a rose / By any other name would smell as sweet; / So Romeo would, were he not Romeo call'd, / Retain that dear perfection which he owes / Without that title. Romeo, doff thy name, / And for that name which is no part of thee / Take all myself. –  Thomas Eding Apr 5 '12 at 8:29
add comment

8 Answers

I don't think there's an official definition! In my mind, a wrapper program is a program that, in general, starts before the wrapped program starts, and exits no earlier than after the wrapped program exits. A wrapper program would probably also manage the lifetime of the wrapped program (start it for you, stop it for you.)

I recommend against arguing too much over the names of things, though. The important thing is to design software that works well. Sometimes belaboring terminology can aid in this goal; sometimes it is a hobgoblin.

share|improve this answer
3  
"The beginning of wisdom is to call things by their right names." --Confucius. Names are important, they give us a language to communicate with one another in meaningful ways.They can be argued about too much though--I agree with that. –  Jonathan Henson Dec 21 '11 at 3:57
1  
"Don't take me seriously." --Confucius. Quotes are important, they give us a language to communicate with one another in meaningful ways.They can be argued about too much though--I agree with that. –  Thomas Eding Apr 5 '12 at 8:36
add comment

Terminology is not that important unless it is used incorrectly and creates confusion. In this case, should another program which is an wrapper program be introduced to the users, they will become confused because they will see two programs described the same way, but with different functionality.

An example - A "classic" of this I've seen over and over again in development teams is where someone starts writing stub or fake classes for testing purposes. But calls them "mocks", even using the word "mock" in the class names. I.e. MockOfExternalThing. There is nothing wrong with this except that when someone else comes along and needs to use an actual mocking framework such as EasyMock or Mockito. Now the programmers cannot tell what they are dealing with. Worse yet, developers who have not used any mocking frameworks before get completely confused about the term mock and what it means.

So in your case I'd not worry too much about the other guy using the term wrapper, if and only if you think it's unlikely that the users will be presented with something else that works differently, yet uses the same term.

share|improve this answer
add comment

If he cannot explain why he calls this a "wrapper program", then he used this word intuitively without thinking to much about the name. Names are sound and smoke - do not argue about the names of things.

share|improve this answer
add comment

Sounds to me like a service, not a wrapper. Services are these vigil little creatures that watch from afar for specific conditions to leap into the fray and handle some odd job. I think service is technically a keyword reserved by Microsoft Windows, though so was the term 'thread' until it was used in a broader context. So feel free to adapt that word. At least it's more accurate than wrapper.

share|improve this answer
    
daemon would be the *nix version –  jk. Apr 5 '12 at 7:40
add comment

A wrapper is a layer, code portion, stuff which encapsulate the inside logic of the final task or processus.

We can say there's two main types of wrappers :

  • abstraction wrappers : the principle is to hide/abstract the final task to be as least bound to it as possible (ie. the wrapper caller don't need to know the final task logic).

  • engine/controller wrappers : they are used to add a specific or context logic which cannot -or is not supposed to- be done by the final task.

Note that a wrapper can achieve this two goals as well.

It can be used in many cases but about a program, a wrapper program is a "program launcher". Its main goal is to launch the child program.

It may pass some context parameters to the child program, handle pre-launch and after-launch steps, restart/shutdown it etc...

It can launch the child program as a new process or as an inner process but the wrapper program execution is directly linked to the child program execution : if the wrapper stops, the child program stops.

To compare to a third-party client, a third-party client don't care about the child program process. It is there to maintain the child program files/configuration/stuff but is not responsible of its execution even if it may launch it.

share|improve this answer
add comment

A "wrapper" is whatever sales, management, or marketing wants to call it. Have you seen the new commercials touting Windows as "the cloud?" That's right, you get your own "little cloud" right there on the desktop...

share|improve this answer
add comment

I've always viewed wrappers as generally small programs that do pre and post processing for some other program or procedure. So typically the wrapper will be the one making the call to the program it is wrapping.

Examples for why you might do this:

  • It allows you to programmatically set up the environment conditions for the program being called so that they will always be in a form that makes the wrapped program happy.

  • It effectively allows you to mask the calling of the wrapped program, should you desire to, from the user's eyes.

share|improve this answer
add comment

If it's explained in layman terms, which non-techie people can understand, there won't be any problem.

From my understanding, a wrapper program is wrapped around a standard program to handle the sophisticated or restrictive steps for the end users as in a customized program that maybe adhere to company policies.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.