Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

1.

5 SYSTEM SOFTWARE AHMED THAKUR

1.5.3 LIBRARY PROGRAMS

 Show an understanding that software under development is often constructed using existing
code from program libraries

Library programs are collections of compiled routines which are shared by multiple programs, such
as the printing function.

Or

Libraries are a collection of ready-made sub-routines that can be called by programs executing
within the host operating system.

Library programs contain code and data that provide services to other programs such as interface
(look and feel), printing, network code and even the graphic engines of computer games. If you
have ever wondered why all Microsoft Office programs have the same look and feel, that is because
they are using the same graphical user interface libraries. For computer games a developer might
not have the time and budget to write a new graphics engine so they often buy graphical libraries
to speed up development, this will allow them to quickly develop a good looking game that runs on
the desired hardware. For example Battlefield 3 and Need for Speed both use the
same Frostbite engine.

Most programming languages have a standard set of libraries that can be used, offering code to
handle input/output, graphics and specialist maths functions. You can also create your own custom
libraries and when you start to write lots of programs with similar functionality you'll find them very
useful.

 Describe the benefit to the developer of software constructed using library files, including
Dynamic Link Library (DLL) fi les

Libraries are a collection of ready-made sub-routines that can be called by programs executing
within the host operating system.

For example, someone programing in the Windows operating system can call 'Dynamic Link Libraries'
or DLL for short. These libraries contain sub-routines written to carry out a common task in the Windows
environment. For example a 'Save As' routine where the user of your program needs to save their
work as a file. All you need to do in your program is to call the appropriate DLL sub-routine with the
correct parameters and the 'Save As' dialogue box appears.

A utility called a 'loader' loads the subroutine into memory then another utility called a 'linker' links
the code into the relevant part of the main program.

Pros and Cons


Dynamic Link Libraries have the advantage of making your execution (exe) file smaller as their code
is only called into memory when one of their sub routines needs to run.

Dynamic Link Libraries can be written by anyone so it allows people to share code within a host
operating system. But in reality most DLLs used are those that come with the operating system.

The disadvantage of dynamic link libraries is if they change over time. The way an exe file calls a
particular sub-routine might not be correct any more. So the program appears broken when in fact
it is down to the current DLL being different to the original version.

Other libraries
Other operating systems such as Unix and Linux also make heavy use of libraries, especially in the
graphical user interface where hundreds / thousands of hours of coding time has been spent making
a pleasant user interface to the system. For example GNOME and the KDE desktop environments.

COMPUTER SCIENCE https://www.facebook.com/groups/OAComputers/


ahmed_thakur@hotmail.com, 0300-8268885 Page 1
9608
1.5 SYSTEM SOFTWARE AHMED THAKUR

1.5.3 LIBRARY PROGRAMS

 Draw on experience of the writing of programs which include library routines

Below is an example of how you might import libraries into VB.NET:

'imports the libraries allowing a program to send emails


Imports System.Net.Mail

'imports the libraries allowing a program to draw in 2D


Imports System.Drawing.Drawing2D

Another example of calling System Libraries in VB.NET

COMPUTER SCIENCE https://www.facebook.com/groups/OAComputers/


ahmed_thakur@hotmail.com, 0300-8268885 Page 2
9608
1.5 SYSTEM SOFTWARE AHMED THAKUR

1.5.3 LIBRARY PROGRAMS

COMPUTER SCIENCE https://www.facebook.com/groups/OAComputers/


ahmed_thakur@hotmail.com, 0300-8268885 Page 3
9608

You might also like