[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 240
  • Last Modified:

What is a framework/namespace/libraries in respect to any language? How much can you do without one?

Years ago I took two java courses where I was exposed to such things as variables, constants, loops, functions, methods, methods, and objects, but now years later  I am trying to learn about other languages and I am confused about how it ties into what I was doing back then.

For example, I remember using "System.out.println();" to display something in java, but what was that command calling? A function, method, namespace, framework, library? I have no idea what that command was doing after I typed it.

Then I remember taking a C/C++ course where the professor showed us how we can create our own things to call or use pre-existing ones. But what was I calling or importing to begin with, a library?

What are these frameworks, namespace, and libraries? How limited would I be without them? How do they relate to each other and how are they different? What am I channeling when I use different languages (and I don't just mean C/C++ and Java, but all of these other popular languages as well)?
1 Solution
HainKurtSr. System AnalystCommented:
if you only need basic functioanlity come with the language you dont need extra libraries frameworks etc... for example you want to work with image files, you can write 1000s of lines of code to open, do some thing on the image and save using standart features of a language... but if you use a library written for this one, you just include/import/use/reference this in your app and write a few lines of code like

image myimg = new image("path to image file)
myimg.resize(400, 600)
myimg.save("some output file)

Language like java and C and C++ have what is called a "standrad library". It is part of the language definition, e.g. printf().
You might recall form C/C++ #include'ing stdio (standard io) or stdlib (standard library).

In java you have packages, such as java.io.*
These are part of the standard API (application programmer interface) and are sometimes just referred to as *the Java API*.

There are third party APIs/libraries. For example I might want to work with PDF files using the iText API. It comes in a .jar file iText-version.jar. That's the "library" file which contains the implementation--and the interfaces, but soemtimes you will see interface and implementation separated.

In java we need these .jar library files at runtime. Similarly for native C/C++ apps I might need on Windows a .dll (dynamic link library) or on *nix a .so (shared object)  C/C++ applications can also be statically linked which means you don't need the library file at runtime, it is all linked into your executable at build time.

Namespaces are just a way of preventing name collisions. Java uses "packages" for this, similar concepts exist in other languages.
I might have a class Foo in com.mycompany.Foo and you might have the same class but in com.yourcompany.Foo. We can then use java's "import" statement to tell it which Foo we are referring to.


Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now