|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
VeriSign Code Signing Digital Certificates provides assurance to end users. Read about this and more in the free white paper: “How to Digitally Sign Downloadable Code for Secure Content Transfer.” Learn More! |
|
#1
|
|||
|
|||
|
What is a wrapper and what does it do?
I'm sure this is a really basic question but I'm a newbie. What is a wrapper and what does it do?
Thanks! |
|
#2
|
|||
|
|||
|
A wrapper typically refers to some piece of code that provides graphical user interface (GUI) elements to another piece of code. For example, you might have a page of dynamically-generated (via CF and SQL Server) information. You typically would want this information to be "wrapped" with the look and feel of your site.
One approach to wrapping is to utilize a "Head" and a "Foot", which are included before and after (respectively) a CF page is processed. The Head can be included as part of the Application.cfm, while the Foot can be called with the OnRequestEnd.cfm. Wrapping in this way allows for scalable creation of a nearly limitless number of pages, while ensuring a consistent look and feel. I'm sure there are other definitions, but this is the one I'm most commonly exposed to. |
|
#3
|
|||
|
|||
|
A wrapper is a piece of code that wraps or abstracts the use of another piece of code. For example, say you wrote a set of Java classes to handle temperature conversion. Now you want to use these in your ColdFusion application. But you don't want any of your CF developers to worry about how the Java classes are implemented, or even require them to know that Java classes are being used at all. You could write a CFC that uses the Java classes, and then all of your developers would just use your CFC. Your CFC is a "wrapper" for the Java classes.
This idea is often used with the Facade and Adapter design patterns.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > What is a wrapper and what does it do? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|