Infot 1 - Chapter 2

You might also like

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

INFOT 1: INTEGRATIVE PROGRAMMING AND TECHNOLOGIES

MODULE 2: INTRODUCTION TO INTEGRATIVE PROGRAMMING AND


UNIVERSITY OF ANTIQUE
LIBERTAD CAMPUS TECHNOLOGIES

Chapter Objectives:

1. To discuss integrative programming.


2. To evaluate disparate technologies that organizations typically to communicate and work with each
other.

Integrative Programming and Technologies


This is a technique which enables dynamic website and application development through integration of
programming and mark up languages into one for example html with XML, JavaScript and CSS, XML with
PHP, C# with XML, XML with XSLT and so on to meet the interactive and specific dynamic end-user
requirements. Integrative programming deals with an integration approaches and techniques that connect
different components of IT infrastructure- people, applications, platforms, and databases to enable a secure,
intra and inter application collaboration. Integrative solutions enable an organization to integrate business
processes internally and externally with business partners to create dynamic environments that supports
current and evolving business requirements, thereby creating a global organization. Most of the applications
that run-in organizations hardly live in isolation. Whether the registrar application must interface with the
finance application, the human resource management application must connect to each other, it seems like
any application can be made better by integrating it with other applications.

Computer Language
Computer languages are the languages through which user can communicate with the computer by writing
program instructions. Generally, we use languages like English, Tagalog, Kiniray-a, etc., to make
communication between two persons. That means, when we want to make communication between two
persons we need a language through which persons can express their feelings. Similarly, when we want to
make communication between user and computer or between two or more computers we need a language
through which user can give information to computer that the computer can understand. When user wants
to give any instruction to the computer the user needs a specific language and that language is known as
computer language.

Types of languages:
We have three types of languages; these are:
 Low level language
 Middle level language
 High level language

Middle Level Language: Is


designed using some
special words known as mnemonic and when we compared it to low level language, machine level is easy to
understand. This is the only language that is directly understood by the computer. It does not need any
translator program. This kind of languages is called assembly language.

BSINFOTECH 2A, 2B & 2C ARIANNE MAE A.GALLARDO, MIT 1|Page


A.Y. 2022-2023 FIRST SEMESTER INSTRUCTOR I
INFOT 1: INTEGRATIVE PROGRAMMING AND TECHNOLOGIES
MODULE 2: INTRODUCTION TO INTEGRATIVE PROGRAMMING AND
UNIVERSITY OF ANTIQUE
LIBERTAD CAMPUS TECHNOLOGIES

Middle level language is a computer language in which the instructions are created using symbols such as
letters, digits and special characters.

Assembly language is an example of middle level language. In assembly language, we use predefined words
called mnemonics. Binary code instructions in low level language are replaced with mnemonics and operands
in middle level language. But computer cannot understand mnemonics, so a translator called Assembler is
needed to translate mnemonics into binary language.

Assembler is a translator which takes assembly code as input and produces machine code as output. It is
used to translate middle level language to low level language. That means, computer cannot understand
middle level language, so it needs to be translated into low level language to make it understandable by the
computer.

Low Level Languages


The low-level language (LLL) is designed using zeros (0) and ones (1), hence they are critical to understand.
Instructions given to the computer in 0’s and 1’s is known as binary language or machine language. Then
programmers found writing code in binary language seems to be, then they used an English like words to
write a program in order to understand and become easy and simple to code.
 Low Level language is the only language which can be understood by the computer, it is also known
as Machine Language.
 Machine language is also known as Machine Code.
 Binary Language is an example of low level language. The binary language contains only two symbols
1 & 0. All the instructions of binary language are written in the form of binary numbers 1's & 0's. A
computer can directly understand the binary language.
 As the CPU directly understands the binary language instructions, it does not require any translator.
CPU directly starts executing the binary language instructions, and takes very less time to execute the
instructions as it does not require any translation.
 Low level language is considered as the First Generation Language (1GL).

High level Language


These are designed using simple English like words. Because of this, they are very easy to understand. These
are machine independent languages, so they need to translator into machine level language.
 High level language is a computer language which can be understood by the users. High level
language is very similar to the human languages and have a set of grammar rules that are used to
make instructions more easily.
 Every high-level language has a set of predefined words known as Keywords and a set of rules known
as Syntax to create instructions.
 High level language is easier to understand for the users but the computer cannot understand it and
needs to be converted into low level language to make it understandable by the computer. Compiler
or interpreter is used to convert high level language to low level language.
 Languages like C, C++, Java, etc., are the examples of high level languages. All these programming
languages use human understandable language like English to write program instructions. These
instructions are converted to low level language by the compiler so that it can be understood by the
computer.

To convert HLL to LLL we have 3 types of translator, which are:


 Compiler
 Interpreter
 Assembler
BSINFOTECH 2A, 2B & 2C ARIANNE MAE A.GALLARDO, MIT 2|Page
A.Y. 2022-2023 FIRST SEMESTER INSTRUCTOR I
INFOT 1: INTEGRATIVE PROGRAMMING AND TECHNOLOGIES
MODULE 2: INTRODUCTION TO INTEGRATIVE PROGRAMMING AND
UNIVERSITY OF ANTIQUE
LIBERTAD CAMPUS TECHNOLOGIES

Compiler:
It converts the entire source code into object code (machine code) at once. Compilers are used to convert
HLL into Machine code format. A compiler is a computer program that transforms code written in a high-
level programming language into the machine code. It is a program which translates the human-readable
code to a language a computer processor understands (binary 1 and 0 bits). The computer processes the
machine code to perform the corresponding tasks.

A compiler should comply with the syntax rule of that programming language in which it is written. However,
the compiler is only a program and cannot fix errors found in that program. So, if you make a mistake, you
need to make changes in the syntax of your program. Otherwise, it will not compile

Interpreter:
It converts source code into object code in line-by-line format. It also used to convert HLL into understandable
machine code.

An interpreter is a computer program, which coverts each high-level program statement into the machine
code. This includes source code, pre-compiled code, and scripts. Both compiler and interpreters do the same
job which is converting higher level programming language to machine code. However, a compiler will
convert the code into machine code (create an exe) before program run. Interpreters convert code into
machine code when the program is run.

Key Difference
 Compiler transforms code written in a high-level programming language into the machine code, at
once, before program runs, whereas an Interpreter covert each high-level program statement, one by
one, into the machine code, during program run.
 Compiled code runs faster while interpreted code runs slower.

BSINFOTECH 2A, 2B & 2C ARIANNE MAE A.GALLARDO, MIT 3|Page


A.Y. 2022-2023 FIRST SEMESTER INSTRUCTOR I
INFOT 1: INTEGRATIVE PROGRAMMING AND TECHNOLOGIES
MODULE 2: INTRODUCTION TO INTEGRATIVE PROGRAMMING AND
UNIVERSITY OF ANTIQUE
LIBERTAD CAMPUS TECHNOLOGIES

 Compiler displays all errors after compilation, on the other hand, the Interpreter displays errors of
each line one by one.
 Compiler is based on translation linking-loading model, whereas Interpreter is based on Interpretation
Method.
 Compiler takes an entire program whereas the Interpreter takes a single line of code.

Difference between Compiler and Interpreter


Basis of difference Compiler Interpreter
Programming Steps  Create the program.  Create the Program
 Compile will parse or  No linking of files or
analyses all of the machine code generation
language statements for  Source statements
its correctness. If incorrect, executed line by line
throws an error DURING Execution
 If no error, the compiler
will convert source code to
machine code.
 It links different code files
into a runnable program
(known as exe)
 Run the Program

Advantage  The program code is  Interpreters are easier to


already translated into use, especially for
machine code. Thus, it beginners.
code execution time is
less.
Disadvantage  You can't change the  Interpreted programs can
program without going run on computers that
back to the source code. have the corresponding
interpreter.

Machine code  Store machine language  Not saving machine code


as machine code on the at all.
disk
Running time  Compiled code run faster  Interpreted code run
slower

Model  It is based on language  It is based on


translation linking-loading Interpretation Method
model.
Program generation  Generates output  Do not generate output
program (in the form of program. So they evaluate
exe) which can be run the source program at
independently from the every time during
original program. execution.

BSINFOTECH 2A, 2B & 2C ARIANNE MAE A.GALLARDO, MIT 4|Page


A.Y. 2022-2023 FIRST SEMESTER INSTRUCTOR I
INFOT 1: INTEGRATIVE PROGRAMMING AND TECHNOLOGIES
MODULE 2: INTRODUCTION TO INTEGRATIVE PROGRAMMING AND
UNIVERSITY OF ANTIQUE
LIBERTAD CAMPUS TECHNOLOGIES

Execution  Program execution is  Program Execution is a


separate from the part of Interpretation
compilation. It performed process, so it is performed
only after the entire line by line.
output program is
compiled.
Memory requirement  Target program execute  The interpreter exists in
independently and do not the memory during
require the compiler in the interpretation.
memory.
Best suited for  Bounded to the specific  For web environments,
target machine and where load times are
cannot be ported. C and important. Due to all the
C++ are a most popular a exhaustive analysis is
programming language done, compiles take
which uses compilation relatively larger time to
model. compile even small code
that may not be run
multiple times. In such
cases, interpreters are
better.

Code Optimization  The compiler sees the  Interpreters see code line
entire code upfront. by line, and thus
Hence, they perform lots optimizations are not as
of optimizations that robust as compilers.
make code run faster.
Dynamic Typing  Difficult to implement as  Interpreted languages
compilers cannot predict support Dynamic Typing.
what happens at turn time.
Usage  It is best suited for the  It is best suited for the
Production Environment. program and
development
environment.

Error execution  Compiler displays all  The interpreter reads a


errors and warning at the single statement and
compilation time. shows the error if any. You
Therefore, you can't run must correct the error to
the program without interpret next line.
fixing errors.
Input  It takes an entire program.  It takes a single line of
code.

Output  Compliers generates  Interpreter never generate


intermediate machine any intermediate machine
code. code.

BSINFOTECH 2A, 2B & 2C ARIANNE MAE A.GALLARDO, MIT 5|Page


A.Y. 2022-2023 FIRST SEMESTER INSTRUCTOR I
INFOT 1: INTEGRATIVE PROGRAMMING AND TECHNOLOGIES
MODULE 2: INTRODUCTION TO INTEGRATIVE PROGRAMMING AND
UNIVERSITY OF ANTIQUE
LIBERTAD CAMPUS TECHNOLOGIES

Errors  Display all errors after,  Displays all errors of each


compilation, all at the line one by one.
same time.
Pertaining Programming  C, C++, C#, Scala, Java all  PHP, Perl, Ruby uses an
languages use complier. interpreter.

Assembler:
It is used to convert assembly level language (low level) into machine level language.

An assembler is a program that takes basic computer instructions and converts them into a pattern of bits
that the computer's processor can use to perform its basic operations. Some people call these instructions
assembler language and others use the term assembly language.

How it works:
 Most computers come with a specified set of very basic instructions that correspond to the basic
machine operations that the computer can perform. For example, a "Load" instruction causes the
processor to move a string of bits from a location in the processor's memory to a special holding
place called a register. Assuming the processor has at least eight registers, each numbered, the
following instruction would move the value (string of bits of a certain length) at memory location 3000
into the holding place called register 8:
L 8,3000
 The programmer can write a program using a sequence of these assembler instructions.
 This sequence of assembler instructions, known as the source code or source program, is then
specified to the assembler program when that program is started.
 The assembler program takes each program statement in the source program and generates a
corresponding bit stream or pattern (a series of 0's and 1's of a given length).
 The output of the assembler program is called the object code or object program relative to the input
source program. The sequence of 0's and 1's that constitute the object program is sometimes called
machine code.
 The object program can then be run (or executed) whenever desired.

In the earliest computers, programmers actually wrote programs in machine code, but assembler languages
or instruction sets were soon developed to speed up programming. Today, assembler programming is used
only where very efficient control over processor operations is needed. It requires knowledge of a particular
computer's instruction set, however. Historically, most programs have been written in "higher-level"
languages such as COBOL, FORTRAN, PL/I, and C. These languages are easier to learn and faster to write
programs with than assembler language. The program that processes the source code written in these
languages is called a compiler. Like the assembler, a compiler takes higher-level language statements and
reduces them to machine code.

Compilation Vs. Interpretation


An Interpreter is a Translator

BSINFOTECH 2A, 2B & 2C ARIANNE MAE A.GALLARDO, MIT 6|Page


A.Y. 2022-2023 FIRST SEMESTER INSTRUCTOR I
INFOT 1: INTEGRATIVE PROGRAMMING AND TECHNOLOGIES
MODULE 2: INTRODUCTION TO INTEGRATIVE PROGRAMMING AND
UNIVERSITY OF ANTIQUE
LIBERTAD CAMPUS TECHNOLOGIES

Examples of translators:
 Compilers - translates high level code to low level code, e.g. Java -> JVM
 Assemblers - translates assembly language code to machine code, e.g. x86as -> x86
 High-level translators - translates code from one PL to another, e.g. Java -> C
 Decompilers - translates low-level code to high-level code, e.g. Java JVM bytecode -> Java

High Level / Low Level


Table 3: How decompilers translates low-level code to high-level code
Low High
Machine Readable Human Readable
Binary: 011011 Grammar: if let, while, for
executable Not executable
Knows about hardware Does not know about hardware
The compiler translates the entire program before it is run.

 A compiler can be compared to taking a foreign movie and first sub-titling it and then being able to
watch it again and again
 While an interpreter is like having a translator at the UN translate each line of a delegate’s speech in
real time.
 The interpreters translate a line at a time while the program is being run.

BSINFOTECH 2A, 2B & 2C ARIANNE MAE A.GALLARDO, MIT 7|Page


A.Y. 2022-2023 FIRST SEMESTER INSTRUCTOR I
INFOT 1: INTEGRATIVE PROGRAMMING AND TECHNOLOGIES
MODULE 2: INTRODUCTION TO INTEGRATIVE PROGRAMMING AND
UNIVERSITY OF ANTIQUE
LIBERTAD CAMPUS TECHNOLOGIES

Phases of Compiler
The compilation process is a sequence of various phases. Each phase takes input from its previous stage, has
its own representation of source program, and feeds its output to the next phase of the compiler. Let us
understand the phases of a compiler.

BSINFOTECH 2A, 2B & 2C ARIANNE MAE A.GALLARDO, MIT 8|Page


A.Y. 2022-2023 FIRST SEMESTER INSTRUCTOR I
INFOT 1: INTEGRATIVE PROGRAMMING AND TECHNOLOGIES
MODULE 2: INTRODUCTION TO INTEGRATIVE PROGRAMMING AND
UNIVERSITY OF ANTIQUE
LIBERTAD CAMPUS TECHNOLOGIES

Lexical Analysis
The first phase of scanner works as a text scanner. This phase scans the source code as a stream of characters
and converts it into meaningful lexemes. Lexical analyzer represents these lexemes in the form of tokens as:

˂token-name,attribute-value˃

Syntax Analysis
The next phase is called the syntax analysis or parsing. It takes the token produced by lexical analysis as input
and generates a parse tree (or syntax tree). In this phase, token arrangements are checked against the source
code grammar, i.e. the parser checks if the expression made by the tokens is syntactically correct.

Semantic Analysis
Semantic analysis checks whether the parse tree constructed follows the rules of language. For example,
assignment of values is between compatible data types, and adding string to an integer. Also, the semantic
analyzer keeps track of identifiers, their types and expressions; whether identifiers are declared before use or
not etc. The semantic analyzer produces an annotated syntax tree as an output.

Intermediate Code Generation


After semantic analysis the compiler generates an intermediate code of the source code for the target
machine. It represents a program for some abstract machine. It is in between the high-level language and the
machine language. This intermediate code should be generated in such a way that it makes it easier to be
translated into the target machine code.

Code Optimization
The next phase does code optimization of the intermediate code. Optimization can be assumed as something
that removes unnecessary code lines, and arranges the sequence of statements in order to speed up the
program execution without wasting resources (CPU, memory).

Code Generation
In this phase, the code generator takes the optimized representation of the intermediate code and maps it
to the target machine language. The code generator translates the intermediate code into a sequence of
(generally) re-locatable machine code. Sequence of instructions of machine code performs the task as the
intermediate code would do.

Symbol Table
It is a data-structure maintained throughout all the phases of a compiler. All the identifier's names along with
their types are stored here. The symbol table makes it easier for the compiler to quickly search the identifier
record and retrieve it. The symbol table is also used for scope management.

Advantages of Interpreted Languages


 Programs can immediately be executed without the requirement of compiling first
 Potentially has lower memory footprint because no Object Code is created
 Supports portability if interpreter is installed on different platforms
 Starts executing immediately (no compilation phase)
 Source Code can be more easily changed between program executions because there is no
compilation step in between.

BSINFOTECH 2A, 2B & 2C ARIANNE MAE A.GALLARDO, MIT 9|Page


A.Y. 2022-2023 FIRST SEMESTER INSTRUCTOR I
INFOT 1: INTEGRATIVE PROGRAMMING AND TECHNOLOGIES
MODULE 2: INTRODUCTION TO INTEGRATIVE PROGRAMMING AND
UNIVERSITY OF ANTIQUE
LIBERTAD CAMPUS TECHNOLOGIES

Interpreter
An Interpreter directly executes instructions written in a programming or scripting language without
previously converting them to an object code or machine code. Examples of interpreted languages are Perl,
Python and Matlab.

Following are some interesting facts about interpreters and compilers.

1) Both compilers and interpreters convert source code (text files) into tokens, both may generate a parse
tree, and both may generate immediate instructions. The basic difference is that a compiler system, including
a (built in or separate) linker, generates a stand-alone machine code program, while an interpreter system
instead performs the actions described by the high level program.

2) Once a program is compiled, its source code is not useful for running the code. For interpreted programs,
the source code is needed to run the program every time.

3) In general, interpreted programs run slower than the compiled programs.

Java programs are first compiled to an intermediate form, then interpreted by the interpreter.

Pure Interpretation Process

 No translation
 Immediate feedback about errors
 Slower execution
 Often requires more space
 Used mainly for scripting languages

BSINFOTECH 2A, 2B & 2C ARIANNE MAE A.GALLARDO, MIT 10 | P a g e


A.Y. 2022-2023 FIRST SEMESTER INSTRUCTOR I
INFOT 1: INTEGRATIVE PROGRAMMING AND TECHNOLOGIES
MODULE 2: INTRODUCTION TO INTEGRATIVE PROGRAMMING AND
UNIVERSITY OF ANTIQUE
LIBERTAD CAMPUS TECHNOLOGIES

 A compromise between compilers and pure interpreters


 A high-level language program is translated to an intermediate language that allows easy
interpretation
 Faster than pure interpretation

What Is This Development Environment?


 In computer programming and software development, the development environment is the set of
processes and programming tools used to create the program or software product.
 This is where the software is developed. In some situations this could be the developer’s desktop, in
other situations this would be a server shared by several developers working together on the same
project.
 This environment is rapidly updated and contains the most recent version of the application.

Why do we care about this?


 This environment should resemble the production environment as much as possible to prevent issues
were the software acts differently on production.
 New features can be developed without interfering with a live system.
BSINFOTECH 2A, 2B & 2C ARIANNE MAE A.GALLARDO, MIT 11 | P a g e
A.Y. 2022-2023 FIRST SEMESTER INSTRUCTOR I
INFOT 1: INTEGRATIVE PROGRAMMING AND TECHNOLOGIES
MODULE 2: INTRODUCTION TO INTEGRATIVE PROGRAMMING AND
UNIVERSITY OF ANTIQUE
LIBERTAD CAMPUS TECHNOLOGIES

 We want to avoid any development on live to prevent downtime. Once code is stable we can push
the changes live.
 Mistakes happen: One of the biggest advantages is when using virtual machines. Backups can be
made before major changes and be resorted at any time.
 When using virtual machines, it can be easily shared with another developer to continue development
on.

Difference between framework vs Library vs IDE vs API vs SDK vs Toolkits


An IDE is an Integrated Development Environment - a suped-up text editor with additional support for
developing (such as forms designers, resource editors, etc), compiling and debugging applications. e.g
Eclipse, Visual Studio.

A Library is a chunk of code that you can call from your own code, to help you do things more quickly/easily.
For example, a Bitmap Processing library will provide facilities for loading and manipulating bitmap images,
saving you having to write all that code for yourself. Typically a library will only offer one area of functionality
(processing images or operating on zip files)

An API (Application Programming Interface) is a term meaning the functions/methods in a library that you
can call to ask it to do things for you - the interface to the library.

An SDK (Software Development Kit) is a library or group of libraries (often with extra tool applications, data
files and sample code) that aid you in developing code that uses a particular system (e.g. extension code for
using features of an operating system (Windows SDK), drawing 3D graphics via a particular system (DirectX
SDK), writing addins to extend other applications (Office SDK), or writing code to make a device like an
Arduino or a mobile phone do what you want). An SDK will still usually have a single focus.

A toolkit is like an SDK - it's a group of tools (and often code libraries) that you can use to make it easier to
access a device or system... Though perhaps with more focus on providing tools and applications than on just
code libraries.

A framework is a big library or group of libraries that provides many services (rather than perhaps only one
focused ability as most libraries/SDKs do). For example, .NET provides an application framework - it makes it
easier to use most (if not all) of the disparate services you need (e.g. Windows, graphics, printing,
communications, etc.) to write a vast range of applications - so one "library" provides support for pretty much
everything you need to do. Often a framework supplies a complete base on which you build your own code,
rather than you building an application that consumes library code to do parts of its work.

3.1 IDE (Integrated Development Environment)


Overview
An integrated development environment (IDE) is a software application that provides comprehensive facilities
to computer programmers for software development. An IDE normally consists of a source code editor, build
automation tools, and a debugger. Most modern IDEs have intelligent code completion. Some IDEs contain
a compiler, interpreter, or both. The boundary between an integrated development environment and other
parts of the broader software development environment is not well-defined. Sometimes a version control
system, or various tools to simplify the construction of a graphical user interface (GUI), are integrated. Many
modern IDEs also have a class browser, an object browser, and a class hierarchy diagram, for use in object-
oriented software development.

BSINFOTECH 2A, 2B & 2C ARIANNE MAE A.GALLARDO, MIT 12 | P a g e


A.Y. 2022-2023 FIRST SEMESTER INSTRUCTOR I
INFOT 1: INTEGRATIVE PROGRAMMING AND TECHNOLOGIES
MODULE 2: INTRODUCTION TO INTEGRATIVE PROGRAMMING AND
UNIVERSITY OF ANTIQUE
LIBERTAD CAMPUS TECHNOLOGIES

High-level language programs are usually written (coded) as ASCII text into a source code file. A unique file
extension (Examples: .asm .c .cpp .java .js .py) is used to identify it as a source code file. As you might guess
for our examples – Assembly, “C”, “C++”, Java, JavaScript, and Python, however, they are just ASCII text files
(other text files usually use the extension of .txt). The source code produced by the programmer must be
converted to an executable machine code file specifically for the computer’s CPU (usually an Intel or Intel-
compatible CPU within today’s world of computers). There are several steps in getting a program from its
source code stage to running the program on your computer. Historically, we had to use several software
programs (a text editor, a compiler, a linker, and operating system commands) to make the conversion and
run our program. However, today all those software programs with their associated tasks have been
integrated into one program. However, this one program is really many software items that create an
environment used by programmers to develop software. Thus the name: Integrated Development
Environment or IDE.

Programs written in a high-level language are either directly executed by some kind of interpreter or
converted into machine code by a compiler (and assembler and linker) for the CPU to execute. JavaScript,
Perl, Python, and Ruby are examples of interpreted programming languages. C, C++, C#, Java, and Swift are
examples of compiled programming languages. The following figure shows the progression of activity in an
IDE as a programmer enters the source code and then directs the IDE to compile and run the program.

Upon starting the IDE software the programmer usually indicates the file he or she wants to open for editing
as source code. As they make changes they might either do a “save as” or “save”. When they have finished
entering the source code, they usually direct the IDE to “compile & run” the program. The IDE does the
following steps:
1. If there are any unsaved changes to the source code file it has the test editor save the changes.
2. The compiler opens the source code file and does its first step which is executing the pre-processor
compiler directives and other steps needed to get the file ready for the second step. The #include will
insert header files into the code at this point. If it encounters an error, it stops the process and returns

BSINFOTECH 2A, 2B & 2C ARIANNE MAE A.GALLARDO, MIT 13 | P a g e


A.Y. 2022-2023 FIRST SEMESTER INSTRUCTOR I
INFOT 1: INTEGRATIVE PROGRAMMING AND TECHNOLOGIES
MODULE 2: INTRODUCTION TO INTEGRATIVE PROGRAMMING AND
UNIVERSITY OF ANTIQUE
LIBERTAD CAMPUS TECHNOLOGIES

the user to the source code file within the text editor with an error message. If no problems
encountered it saves the source code to a temporary file called a translation unit.
3. The compiler opens the translation unit file and does its second step which is converting the
programming language code to machine instructions for the CPU, a data area, and a list of items to
be resolved by the linker. Any problems encountered (usually a syntax or violation of the programming
language rules) stops the process and returns the user to the source code file within the text editor
with an error message. If no problems encountered it saves the machine instructions, data area, and
linker resolution list as an object file.
4. The linker opens the program object file and links it with the library object files as needed. Unless all
linker items are resolved, the process stops and returns the user to the source code file within the text
editor with an error message. If no problems encountered it saves the linked objects as an executable
file.
The IDE directs the operating system’s program called the loader to load the executable file into the
computer’s memory and have the Central Processing Unit (CPU) start processing the instructions. As the user
interacts with the program, entering test data, he or she might discover that the outputs are not correct.
These types of errors are called logic errors and would require the user to return to the source code to change
the algorithm.

Resolving Errors
Despite our best efforts at becoming perfect programmers, we will create errors. Solving these errors is known
as debugging your program. The three types of errors in the order that they occur are:
 Compiler
 Linker
 Logic
There are two types of compiler errors; pre-processor (1st step) and conversion (2nd step). A review of Figure
1 above shows the four arrows returning to the source code so that the programmer can correct the mistake.
During the conversion (2nd step) the compiler might give a warning message which in some cases may not
be a problem to worry about. For example: Data type demotion may be exactly what you want your program
to do, but most compilers give a warning message.
Warnings don’t stop the compiling process but as their name implies, they should be reviewed.

The next three figures show IDE monitor interaction for the Bloodshed Dev-C++ 5 compiler/IDE.

BSINFOTECH 2A, 2B & 2C ARIANNE MAE A.GALLARDO, MIT 14 | P a g e


A.Y. 2022-2023 FIRST SEMESTER INSTRUCTOR I
INFOT 1: INTEGRATIVE PROGRAMMING AND TECHNOLOGIES
MODULE 2: INTRODUCTION TO INTEGRATIVE PROGRAMMING AND
UNIVERSITY OF ANTIQUE
LIBERTAD CAMPUS TECHNOLOGIES

BSINFOTECH 2A, 2B & 2C ARIANNE MAE A.GALLARDO, MIT 15 | P a g e


A.Y. 2022-2023 FIRST SEMESTER INSTRUCTOR I
INFOT 1: INTEGRATIVE PROGRAMMING AND TECHNOLOGIES
MODULE 2: INTRODUCTION TO INTEGRATIVE PROGRAMMING AND
UNIVERSITY OF ANTIQUE
LIBERTAD CAMPUS TECHNOLOGIES

Key Terms
Compiler - Converts source code to object code.
Debugging - The process of removing errors from a program. 1) compiler 2) linker 3) logic
Linker - Connects or links object files into an executable file.
Loader - Part of the operating system that loads executable files into memory and directs the CPU to start
running the program.
Pre-processor - The first step the compiler does in converting source code to object code.
Text editor - A software program for creating and editing ASCII text files.
Warning - A compiler alert that there might be a problem.

3.2 Library
A library is a group of functions, classes, or other resources that can be made available to programs that need
already implemented entities without the need to know how these functions, classes, or resources were
created or how they function. A library makes it easy for a programmer to use functions, classes, and resources
etc. created by another person or company and trust that this external source is reliable and efficient. Some
unique features related to libraries are –
 A library is created and functions like a normal regular program, using functions or other resources
and communicating with other programs.
 To implement its functionality, a library contains functions that other programs would need to
complete their functionality.
 At the same time, a library may use some functions that other programs would not need.
 The program that uses the library, are also called the clients of the library.

There are two types of functions you will create or include in your libraries –
 An internal function is one used only by the library itself and clients of the library will not need access
to these functions.
 External functions are those that can be accessed by the clients of the library
BSINFOTECH 2A, 2B & 2C ARIANNE MAE A.GALLARDO, MIT 16 | P a g e
A.Y. 2022-2023 FIRST SEMESTER INSTRUCTOR I
INFOT 1: INTEGRATIVE PROGRAMMING AND TECHNOLOGIES
MODULE 2: INTRODUCTION TO INTEGRATIVE PROGRAMMING AND
UNIVERSITY OF ANTIQUE
LIBERTAD CAMPUS TECHNOLOGIES

There are two broad categories of libraries you will deal with in your programs –
 Static libraries
 Dynamic libraries

Static Library
A static library is a file that contains functions, classes, or resources that an external program can use to
complement its functionality. To use a library, the programmer has to create a link to it. The project can be a
console application, a Win32 or an MFC application. The library file has the lib extension

Dynamic Library
A Win32 DLL is a library that can be made available to programs that run on a Microsoft Windows computer.
As a normal library, it is made of functions and/or other resources grouped in a file.

The DLL abbreviation stands for Dynamic Link Library. This means that, as opposed to a static library, a DLL
allows the programmer to decide on when and how other applications will be linked to this type of library.

For example, a DLL allows difference applications to use its library as they see fit and as necessary. In fact,
applications created on different programming environments can use functions or resources stored in one
particular DLL. For this reason, an application dynamically links to the library

3.3 SDK (Software Development Kit)


 A complete kit of software development tools for a specific platform. This “kit” can include all sorts of
things such as: Libraries, APIs, IDEs, Documentation, etc. For example, the Android SDK, which provides
everything you may need for Android development.
 An SDK will still usually have a single focus.

Example:
 extension code for using features of an operating system (Windows SDK)
 drawing 3D graphics via a particular system (DirectX SDK)
 writing add-ins to extend other applications (Office SDK)
 writing applications for mobile phones (Android SDK).

3.4 Toolkit
 is like an SDK - it's a group of tools (and often code libraries) that you can use to make it easier to
access a device or system. Though perhaps with more focus on providing tools and applications than
on just code libraries.
 Tiny apps for quick use, often GUIs.

3.5 Framework
 a generic structure that provides a skeleton architecture with which specific software can be
implemented. The abstraction allows for common design patterns to be easily reused while still
allowing the specific details to be left to the developers.
 may be manifested as functions and classes that necessarily need to be implemented. It is a big library
or group of libraries that provides many services (rather than perhaps only one focused ability as most
libraries/SDKs do).

Example:
 the Java Swing Framework provides the functionality and structure for Java GUI programming; it can
be used for whatever GUI programming you may need to do.

BSINFOTECH 2A, 2B & 2C ARIANNE MAE A.GALLARDO, MIT 17 | P a g e


A.Y. 2022-2023 FIRST SEMESTER INSTRUCTOR I
INFOT 1: INTEGRATIVE PROGRAMMING AND TECHNOLOGIES
MODULE 2: INTRODUCTION TO INTEGRATIVE PROGRAMMING AND
UNIVERSITY OF ANTIQUE
LIBERTAD CAMPUS TECHNOLOGIES

 Model-View-Controller Framework that describes in very abstract terms the three main parts of a
common web application.
 .NET Framework provides an application framework - it makes it easier to use most (if not all) of the
disparate services you need (e.g. Windows, graphics, printing, communications, etc.) to write a vast
range of applications - so one "library" provides support for pretty much everything you need to do

API-Application Programming Interface


An Application Programming Interface (API) contains software building tools, subroutine definitions as well
as communication protocols that facilitate interaction between systems. An API may be for a database system,
operating system, computer hardware or a web-based system.

An Application Programming Interface makes it simpler to use certain technologies to build applications for
the programmers. API can include specifications for data structures, variables, routines, object classes, remote
calls etc.

A diagram that shows the API in the system is as follows –

Uses of Application Programming Interfaces


API’s are useful in many scenarios. Some of these are given in detail as follows −

Operating Systems
The interface between an operating system and an application is specified with an API. For example- Posix
has API’s that can convert an application written for one POSIX Operating System to one that can be used on
another POSIX operating system.

Libraries and Frameworks


Often API’s are related to software libraries. The API describes the behaviour of the system while the libraries
actually implement that behaviour. A single API can have multiple libraries as it can have many different
implementations. Sometimes, an API can be linked to a software framework as well. A framework is based on
many libraries that implement different API’s whose behaviour is built into the framework.

4.1 Web APIs

The application programming interfaces for web servers or web browsers are known as web API’s. These web
API’s can be server side or client side.

Server side web APIs have an interface that contains endpoints which lead to request response message
systems that are written in JSON or XML. Most of this is achieved using a HTTP web server. Client side web

BSINFOTECH 2A, 2B & 2C ARIANNE MAE A.GALLARDO, MIT 18 | P a g e


A.Y. 2022-2023 FIRST SEMESTER INSTRUCTOR I
INFOT 1: INTEGRATIVE PROGRAMMING AND TECHNOLOGIES
MODULE 2: INTRODUCTION TO INTEGRATIVE PROGRAMMING AND
UNIVERSITY OF ANTIQUE
LIBERTAD CAMPUS TECHNOLOGIES

API’s are used to extend the functionality of a web browser. Earlier they were in the form of plug-in browser
extensions but now JavaScript bindings are used.

Remote APIs
The remote application programming interfaces allow the programmers to manipulate remote resources.
Most remote API’s are required to maintain object abstraction in object oriented programming. This can be
done by executing a method call locally which then invokes the corresponding method call on a remote
object and gets the result locally as a return value.

Release policies for API


The policies for releasing API’s are private, partner and public. Details about these are given as follows −

Private release policies


The application programming interfaces released under this policy are for private internal use by the
company.

Partner release policies


The application programming interfaces released under this policy can be used by the company and its
specific business partners. This means that the companies can control the quality of the API, by monitoring
the apps which have access to it.

Public release policies


The application programming interfaces released under public release policies are freely available to the
public. Some examples of this are Microsoft Windows API, Apple’s Cocoa and Carbon API’s etc.

Main types of Web APIs


There are four main types of APIs:

Open APIs: Also known as Public API, there are no restrictions to access these types of APIs because they are
publicly available.

Partner APIs: A developer needs specific rights or licenses in order to access this type of API because they
are not available to the public.

Internal APIs: Also known as Private APIs, only internal systems expose this type of API. These are usually
designed for internal use within a company. The company uses this type of API among the different internal
teams to be able to improve its products and services.

Composite APIs: This type of API combines different data and service APIs. It is a sequence of tasks that run
synchronously as a result of the execution, and not at the request of a task. Its main uses are to speed up the
process of execution and improve the performance of the listeners in the web interfaces.

4.2 Web service APIs


Apart from the main web APIs, there are also web service APIs:
 SOAP
 XML-RPC
 JSON-RPC
 REST

BSINFOTECH 2A, 2B & 2C ARIANNE MAE A.GALLARDO, MIT 19 | P a g e


A.Y. 2022-2023 FIRST SEMESTER INSTRUCTOR I
INFOT 1: INTEGRATIVE PROGRAMMING AND TECHNOLOGIES
MODULE 2: INTRODUCTION TO INTEGRATIVE PROGRAMMING AND
UNIVERSITY OF ANTIQUE
LIBERTAD CAMPUS TECHNOLOGIES

A web service is a system or software that uses an address, i.e., URL on the World Wide Web, to provide access
to its services.

The following are the most common types of web service APIs:
SOAP (Simple Object Access Protocol): This is a protocol that uses XML as a format to transfer data. Its
main function is to define the structure of the messages and methods of communication. It also uses WSDL,
or Web Services Definition Language, in a machine-readable document to publish a definition of its interface.

XML-RPC: This is a protocol that uses a specific XML format to transfer data compared to SOAP that uses a
proprietary XML format. It is also older than SOAP. XML-RPC uses minimum bandwidth and is much simpler
than SOAP. Example

JSON-RPC: This protocol is similar to XML-RPC but instead of using XML format to transfer data it uses JSON.
Example

REST (Representational State Transfer): REST is not a protocol like the other web services, instead, it is a
set of architectural principles. The REST service needs to have certain characteristics, including simple
interfaces, which are resources identified easily within the request and manipulation of resources using the
interface.

What are the differences between SOAP and REST?


Table 5: differences between SOAP and REST
SOAP REST
It has strict rules and advanced security to follow. There are loose guidelines to follow allowing
developers to make recommendations easily
It is driven by Function It is driven by Data
It requires more Bandwidth It requires minimum Bandwidth

What are the differences between JSON and XML?


Table 6: differences between SOAP and REST
JSON XML
Supports only text and numbers. Supports various types of data for example text,
numbers, images, graphs, charts etc.
Focuses mainly on Data Focuses mainly on Document.
It has low security It has more security

BSINFOTECH 2A, 2B & 2C ARIANNE MAE A.GALLARDO, MIT 20 | P a g e


A.Y. 2022-2023 FIRST SEMESTER INSTRUCTOR I
INFOT 1: INTEGRATIVE PROGRAMMING AND TECHNOLOGIES
MODULE 2: INTRODUCTION TO INTEGRATIVE PROGRAMMING AND
UNIVERSITY OF ANTIQUE
LIBERTAD CAMPUS TECHNOLOGIES

Software Development Kit (SDK)

Software Development Kit (SDK) is basically a set of software development tools that allow developers to
create applications, software or frameworks.

Every mobile marketer has heard the acronym “SDK” bandied about in discussions with their product and
customer support teams. But how many marketers have actually asked: “What does SDK stand for?”

To shed light on the SDK meaning as well as show you how a mobile SDK could benefit your app.

In order to use a SDK, a developer needs an iOS SDK to build iOS apps, an Android toolkit for building Android
apps, Nordic SDK to build Bluetooth or wireless apps and a VMware SDK to enable integration with the
VMware platform.

Although SDKs are largely associated with native mobile apps, developers can use them in connection with
websites, set-top boxes and other digital platforms.

SDKs include documentation, application programming interfaces (APIs), code samples, libraries and
processes, as well as guides that developers can use and integrate into their apps. Developers can use SDKs
to build and maintain applications without having to write everything from scratch.

SDK stands for “Software Development Kit”, which is an exceptional way to think about a kit. Think about
placing together a standard car or plane. When assembling this model, a whole kit of different items is
needed, including the tools needed to put them together and the assembly instruction guide.

SDKs are the origination references for almost every program a modern user would interact with. Right from
the web browser to the video games you play at the end of the day, many were first built with an SDK, even
before an API was used to communicate with other applications.

A software development kit, or SDK, means a set of tools that allow developers to create software or apps for
a specific platform, operating system, computer system or device. For instance, developers interested in
creating virtual reality software for the Oculus Rift need access to the software development kit for that device
in order to do so.

This set of tools can be basically divided into 3 categories:

 Programming or operating system SDKs (iOS, Android, etc.)


 App maintenance SDKs
 Marketing SDKs

BSINFOTECH 2A, 2B & 2C ARIANNE MAE A.GALLARDO, MIT 21 | P a g e


A.Y. 2022-2023 FIRST SEMESTER INSTRUCTOR I
INFOT 1: INTEGRATIVE PROGRAMMING AND TECHNOLOGIES
MODULE 2: INTRODUCTION TO INTEGRATIVE PROGRAMMING AND
UNIVERSITY OF ANTIQUE
LIBERTAD CAMPUS TECHNOLOGIES

More specifically, SDKs include:

 Libraries or APIs – Pre-defined parts of code that permit developers to perform common
programming assignments on the platform.
 Integrated development environment (IDE) – One type of visual editor that assists developers in
designing layouts, graphical elements, such as text boxes and buttons. These are the most common
things in mobile software development toolkits. For example, Apple’s IDE, Xcode, contains a full-suite
package of software development tools that supports the developers to build software for macOS,
iOS, iPad, watchOS and tvOS. Same way, there are many IDE options for Android.
 Tools – Help developers to do tasks as debugging, creating, running and testing their applications.

SDKs help the developers to enhance the websites with more operationalities and make the process of
development easier as everything is prebuilt.

What Does a Software Development Kit Contain?


The actual contents of a software development kit vary from one kit to another and are based on the common
needs of developers attempting to build software for use on a particular system, device or based on a
particular software package. In some ways, SDKs resemble integrated development environments, but there
are a few differences.

A software development kit might include debugging facilities, as well as numerous other utilities. Those tools
are actually delivered through an integrated development environment (IDE) that is built into the SDK. So,
you can say that while most SDKs include an IDE, an IDE is not necessarily the same thing as an SDK.

A software development kit will also usually contain at least one API, but it may contain multiple APIs
depending on the kit in question. It should also offer documentation that instructs developers on how to use
the tools found within the kit

What’s the Difference between an SDK and an API?


Spend a little bit of time in the software development world and you’ll encounter plenty of confusing names
and acronyms that seem like they’re the same thing or might be used interchangeably, even though they’re
not the same thing. There can be some confusion in telling the difference between an SDK, and an API.

An SDK, or software development kit, may contain an API, or even more than one API. So, all SDKs are or have
APIs. However, not all APIs are SDKs. Think of it as being a question of comprehensiveness. An SDK includes
all the APIs needed to create an application for a specific platform or system. An API, on the other hand,
allows you to achieve just a single goal. As an example, the Java SDK includes all the tools needed to create
software for the Java platform. The Java API, on the other hand, is really just a collection of libraries of the
Java language.

We have an excellent example of the difference between an API and an SDK in the Facebook suite of solutions.
This suite gives tools for both active users and developers. Moreover, it includes both an API and SDK, each
with different functionalities and use cases.

When creating software or application, just remember:


 SDKs normally contain APIs, but APIs do not include SDKs.
 SDKs allow developers to build applications and act as the building blocks for software solutions.
 APIs facilitate the function of applications within the parameters of the SDK.

BSINFOTECH 2A, 2B & 2C ARIANNE MAE A.GALLARDO, MIT 22 | P a g e


A.Y. 2022-2023 FIRST SEMESTER INSTRUCTOR I
INFOT 1: INTEGRATIVE PROGRAMMING AND TECHNOLOGIES
MODULE 2: INTRODUCTION TO INTEGRATIVE PROGRAMMING AND
UNIVERSITY OF ANTIQUE
LIBERTAD CAMPUS TECHNOLOGIES

Why Do Developers Need SDKs?


By giving a helpful and consistent mobile experience customized to the users of the particular app, then one
can improve app retention and drive mobile functions. Whether your audience is employees, clients, or
gamers, you can guarantee that your app gains the advantages of having a strong SDK software to satisfy
your users’ needs.

So, why would a developer need a software development kit? Simply to create software that will operate
correctly on a particular platform or with a particular service. If the developer did not have access to the SDK,
this would not be possible. In fact, it would most likely be impossible to create software that would operate
at all in the environment in question. For instance, without access to the Android SDK, Android developers
would be unable to create apps that worked on Android phones and tablets.

Thus, SDKs serve a very important purpose and enable the creation of new software and apps.

BSINFOTECH 2A, 2B & 2C ARIANNE MAE A.GALLARDO, MIT 23 | P a g e


A.Y. 2022-2023 FIRST SEMESTER INSTRUCTOR I

You might also like