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

Posted on 2009-12-21
Last Modified: 2013-12-29
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)?
Question by:akromyk4
    LVL 51

    Expert Comment

    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)"some output file)

    LVL 14

    Accepted Solution

    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*
    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

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Configure a Local PHP Interpreter for Phpstorm 2 54
    count11 challenge 6 34
    json format text only 4 50
    HashMap Vs TreeMap 12 32
    Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
    Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
    This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now