Skip to content
Learnearn.uk » A Level Computer Science Home » Library Programs

Library Programs

External Libraries

External Libraries

Most software that programmers create rely on the use of external libraries to function, beyond the basic subset that is provided within the programming language itself. The libraries (in Python we call them modules) are usually imported when required. Some external libraries are come pre-installed, others must be downloaded and install prior to use.

Examples of  pre-installed external libraries in Python

  • DateTime  – Allows the use of date and time information
  • Os  – Allows low-level interaction with the Operating System.
  • Math – Maths functions like Cos/Sin
  • Random – Generate Pseudorandom numbers

Examples of downloadable libraries

  • Pygame – Create a 2D games in Python
  • PIL/PILLOW – Python Imaging Library – Allows the editing/creating of image files
  • MatPlotLib – More complicated graphical maths
  • OpenCV – Image recognition library

 

Dynamic Link Libraries

Dynamic Link Libraries

The Microsoft Windows operating system contains a number of in-built libraries that can be used by software engineers when developing software. These libraries are known as Dynamic Link Libraries.

Common DLLs in Windows

The File/Folder Open Dialogue Box

CIE Dynamic Link Libraries Tutorial A Level

 

Advantages & Disadvantages

Advantages of Library Files

  • Speed up software development process as you don’t have to re-engineer functionality that has already been implemented by others
  • Allows use of functionality that you may not be a specialist in
  • More consistent user experience throughout the operating system
  • More robust software as the module will have already been extensively tested by others

Disadvantages of Library Files

  • You don’t know what the library is doing – it could be doing something malicious or malfunctioning in some way.
  • You can’t update the library yourself if there is an issue – you have to wait for a fix to be implemented.
  • Some libraries have a large storage /memory / CPU overhead in comparison to custom code implementations.

 

Resources