Skip to content Skip to navigation

Connexions

You are here: Home » Content » Software Library

Navigation

Content Actions

  • Download module PDF
  • Add to ...
    Add the module to:
    • My Favorites
    • A lens
    • An external social bookmarking service
    • My Favorites (What is 'My Favorites'?)
      'My Favorites' is a special kind of lens which you can use to bookmark modules and collections directly in Connexions. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need a Connexions account to use 'My Favorites'.
    • A lens (What is a lens?)

      Definition of a lens

      Lenses

      A lens is a custom view of Connexions content. You can think of it as a fancy kind of list that will let you see Connexions through the eyes of organizations and people you trust.

      What is in a lens?

      Lens makers point to Connexions materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

      Who can create a lens?

      Any individual Connexions member, a community, or a respected organization.

    • External bookmarks
  • E-mail the authors

Recently Viewed

Software Library

Module by: adrian valenzuela, CJ Ganier

Summary: A software library is a set of software functions used by an application program.

What is a software library?

By now, you have probably written some C, so you should probably be familiar with the idea of writing helper functions. In many respects any function you call from inside the main() function is a helper to main. However, in general, a helper function is a function that isn't meant to be called from outside the file its in; instead, it helps by allowing the programmer to break larger functions into manageable bites and to control code you need to repeat from a single place in the file. A helper function is generally intended to be called from a specific file or function in the program, and it may contain specific details useful only to a certain situation. Another rule of thumb is that a helper function should not be included in the header file of a program.

Other functions are meant to be called from anywhere in the program or to be called by any arbitrary program that cares to use them. For organizational purposes, it is a good idea to sort these functions into groups related by the purpose of the functions. A group of functions so grouped by purpose is generally called a library. A similar concept is the "application program interface" or API. This is generally the name given to libraries published by the makers of a programming language, operating system, or large programming utility. The API libraries are called interfaces because only the method headers are provided instead of the entire source code. Providing the source code to an interface would allow the user to modify the library or to exploit the specific way it was programmed. The advantage of only providing the headers is that it allows the maintainer of the operating system, language, or utility to update the API more easily without breaking a customer's existing code.

For an example of a good API specification you can visit http://java.sun.com/ or http://java.sun.com/j2se/1.3/docs/api/index.html and follow the links to the specifications of the java language library. What you will see is a reference to various libraries of interfaces. Each interface comes with a list of functions. Each function's behavior is explained along with the parameters and return value. Similar library definitions can be found for C in guides to the C programming language.

Comments, questions, feedback, criticisms?

Send feedback