Many members tend to joke about pointers in Java are called references (in other words, the pointers are the references)
API
Framework
Wrapper
Library
The terminology becomes vaguer by the day.
I wouldn't call a C++ library that merely wraps C functions an API, but that's just me. When you think about it, it's mostly just abstraction and you can choose where to draw the line. I draw the line when the code base is less written in the native language, mostly external calls.
Boost library, might have certain pure-C++ libraries that would be worthy of the title API.
They could have written all those C API's in pure C++, so they'd be C++ API's, but for C compatibility reasons that's not the case. They are C API's available in C/C++, not C++ API's only available in C++.
At the same time I tend to think of API's being the lowest level interface, interacting with an unavailable feature such as communication with hardware (opengl) or operating system (win32) in it's native language (C).
Frameworks/wrappers being the one's that simplify (eg abstract) those API's.
Libraries being a collection of frameworks/wrappers.
Warning: Have doubt in anything I post.
GCC 4.5, Boost 1.40, Code::Blocks 8.02, Ubuntu 9.10 010001000110000101100101
According to wikipedia, the definitions are as follows:
Framework:
MFC fits in this category.A software framework, in computer programming, is an abstraction in which common code providing generic functionality can be selectively overridden or specialized by user code providing specific functionality.
Frameworks are similar to software libraries in that they are reuseable abstractions of code wrapped in a well-defined API. Unlike libraries, however, the overall program's flow of control is not dictated by the caller, but by the framework. This inversion of control is the distinguishing feature of software frameworks.
Library:
Thus a library would be the file(s) in which the code is stored, framework or API or wrapper.In computer science, a library is a collection of subroutines or classes used to develop software. Libraries contain code and data that provide services to independent programs. This allows code and data to be shared and changed in a modular fashion. Some executables are both standalone programs and libraries, but most libraries are not executables. Executables and libraries make references known as links to each other through the process known as linking, which is typically done by a linker.
Most modern operating systems (OS) provide libraries that implement the majority of system services. Such libraries have commoditized the services a modern application expects an OS to provide. As such, most code used by modern applications is provided in these libraries.
API:
dotNet would fit in this category. But it is language-independent and not C++ api.An application programming interface (API) is a set of functions, procedures, methods or classes that an operating system, library or service provides to support requests made by computer programs.[1]
* Language-dependent APIs are available only in a particular programming language. They utilize the syntax and elements of the programming language to make the API convenient to use in this particular context.
* Language-independent APIs are written in a way that means they can be called from several programming languages. This is a desired feature for a service-style API which is not bound to a particular process or system and is available as a remote procedure call.
Unfortunately, wikipedia provided no good definitions of wrappers.
I've read the definitions. I'm sure people who disagree with you have as well. I don't disagree. I do notice that they become skewed and mix matched often, according to my own perception. It's all perception. Well, not all, but a little.
Warning: Have doubt in anything I post.
GCC 4.5, Boost 1.40, Code::Blocks 8.02, Ubuntu 9.10 010001000110000101100101
Right, but what I'm saying is how you understand what those definitions mean will not be the same as the person beside you.
Well, it is called the .NET Framework, so there you go. Language-independant library more like it.
Can you name one language-independant API? That seems like a tough feat by those definitions. Seems like by the time they become language-independant, they are frameworks for existing language-dependant API's, and thus are called language-independant frameworks or libraries. Some type of DLL library that doesn't wrap could be a language-independant API perhaps? Technically not language-dependant, and still forms the core features, if you can call it the procedures from C, C++, C#, python, etc.
Warning: Have doubt in anything I post.
GCC 4.5, Boost 1.40, Code::Blocks 8.02, Ubuntu 9.10 010001000110000101100101
Yeah, I got it. You kindly pointed that out with your previous reply...
Well, now that I think of it - seeing as it runs within a managed environment, framework would probably be a better definition for it, yes.Well, it is called the .NET Framework, so there you go. Language-independent library more like it.
But a library is the actual file where the code is stored.
It is subjective, but I would call it a framework, then.
Nope, this I cannot, seeing as I know very few APIs in general.Can you name one language-independant API? That seems like a tough feat by those definitions. Seems like by the time they become language-independant, they are frameworks for existing language-dependant API's, and thus are called language-independant frameworks or libraries. Some type of DLL library that doesn't wrap could be a language-independant API perhaps? Technically not language-dependant, and still forms the core features, if you can call it the procedures from C, C++, C#, python, etc.
Well if that were true, then why do they call this a NullPointerException?
I guess from a literal standpoint, Java references aren't actually pointers, since you can't treat them at memory addresses, but they aren't real references either. They're some weird thing in between pointers & references.
As for this API debate... The term API simply stands for Application Programming Interface, so just about anything that you would normally put in a header file would qualify as an API. A function or class definition is an API -- period. So the MFC header files are API's for the MFC library (i.e. the .lib & .dll files).
Last edited by cpjust; 11-01-2008 at 04:39 PM.
"I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008
"the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010
java sucks i ll study after C >> C++>>asm >> maybe mysql oracle after that
Java does not suck. It is in-fact very nice, you'll have no problem picking up Java if you know C.
The main differences are;
* Exception handling
* Weird for-loop syntax is possible (like for-each)
* OO
I'd say they're references, not pointers. For one there is no pointer arithmetic, although the developers of Java use the pointer/reference term interchangeably.
> And to be honest, I trust the JavaVM more than I trust the .NET framework.
So do I, not to mention the VM is portable
Oh and learning "asm" doesn't make you a hard-core hacker. At least it certainly doesn't get you the chicks.