In a software portability context, what is the difference between these three concepts?
For example, I want to use the ncurses library, the original ncurses library is written in C, but my application is being written in C++, and then I found "ncurses wrapper", "bindings to ncurses", and "ncurses port". Which one should I use?
What are the pros and cons of each one?
A wrapper is a bit of code that sits on top of other code to recycle it's functionality but with a different interface. This usually implies an interface written in the same language. It should also be noted that sometimes people will say wrapper when what they technically mean is a binding (myself included).
A port binding is the configuration information that determines where and how a message will be sent or received. Depending on its type, a port binding might refer to physical locations, pipelines, or other orchestrations.
In computer programming, to bind is to make an association between two or more programming objects or value items for some scope of time and place.
Wrappers can be individual software components, independent software products, software architectures, classes in object-oriented programming, or frameworks. If you want to use functions or code blocks of another programming language within a program, you can encapsulate them using a wrapper.
A wrapper is a bit of code that sits on top of other code to recycle it's functionality but with a different interface. This usually implies an interface written in the same language. It should also be noted that sometimes people will say wrapper when what they technically mean is a binding (myself included).
Pros:
Cons:
A binding is another bit of code that sits on top of other code to recycle it's functionality except this time bindings are written in a language different than the thing they bind. A notable example is PyQt which is the python binding for QT.
Pros:
Cons:
A Port is when you translate some code to work in a different environment. Common analogies include games that come out for say... XBox and are later released for PS3.
Pros:
Cons:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With