p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   VB.NET 2002/2003 Basics (http://p2p.wrox.com/forumdisplay.php?f=76)
-   -   Definition (http://p2p.wrox.com/showthread.php?t=34111)

Little Shell October 8th, 2005 04:03 PM

Definition
 
Could someone please help. I am new to programming and I often hear the term wrapper used to refer to a class or in one case it was used to refer to a copy of an array. WHAT IS A WRAPPER?

Any insight would be helpful!

Good Day,

Little Shell


Michael Bakaimani October 10th, 2005 08:18 AM

how do i develop a program that converts two world currencies and show fluctuation history in a graph


Jeff Mason October 10th, 2005 04:40 PM

Quote:

quote:Originally posted by Little Shell
WHAT IS A WRAPPER?
A wrapper class is a class which typically contains another class, thus "wrapping" the functionality of one class inside another. This is also called the "facade" design pattern.

It is used to perhaps hide some of the functionality of the contained class. The containing, or wrapper, class exposes only the functionality of the contained class that it needs to.

Sometimes, a wrapper is provided to simplify the interface to the contained class. For example, a class that sends an email might have properties and methods to separately set the sender, receiver, subject, and message body, and then send the message. To make interacting with this class easier, I might devise a wrapper class around an email object that exposes a single send method taking these values as parameters and "behind the scenes" creates the email class, sets all the properties as appropriate and sends the message. Thus, my class is much easier to use than the original email class, since I expose only a single method and I don't have to bother the user of the class with all the messy details of setting up and sending the email.

The entire .NET framework can be considered a wrapper around the WIN32 API...

Jeff Mason
Custom Apps, Inc.
www.custom-apps.com

Little Shell October 12th, 2005 07:34 AM

Jeff,

Thank you for your clear explanation; you've been a big help.

Little Shell



All times are GMT -4. The time now is 06:33 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.