Introduction to
Programming
Lecture Note – 1
Programming Fundamentals
Basics
Computer is merely a device that can perform many
tasks correctly and efficiently but has no I.Q.
So to solve a problem with the help of a computer we
must give it a sequence of commands/instructions to
perform certain tasks with the help of it.
Hence, we (the programmers) find a way to solve the
problem and represent that way using algorithm or
flowchart. Then we convert the algorithm/flowchart
into a computer program
Basics
An instruction is a single simple command, e.g.
y=x+5
check whether x is greater than 10
A computer program is a sequence of instructions
written in a programming language
A programming language is a language which is
acceptable (e.g. Bangla is not acceptable to an
Englishman) to a computer system i.e. using a
programming language we can give a computer
different instructions
Types of Programming Languages
Machine Language.
Assembly Language.
High-level Language.
We shall concentrate only on machine
language and high level language
Machine Language
A programming language, which can be directly
understood by a computer
It is normally written as strings of binary 1s and 0s
(remember: computer can only understand binary
numbers)
For example, the program to add two numbers and
store it in another number might look something
like the following:
10110011111001111001110000110100
A program written in machine language is stored in
an exe file (having .exe extension)
High Level Language
A programming language, which can’t be directly
understood by a computer but easily
understandable to human beings
For example, the instruction to store the value 5
into a container/storage in memory will be
something like:
X=5
Here, X is the name of the container where we are
storing that value
E.g. of high level language: C,C++,Visual Basic
(VB) etc.
Compiler
A high-level language program is translated
(converted) into equivalent machine language
program by a translator program which is called
the compiler
Program written in high level language
Compiler
Program written in machine language
Compiler
We shall learn VB language. The compiler that we
shall use for this purpose is Visual Studio 2005
Hence, to compile means to translate our VB
program to an exe file
Program written in VB (test.vb)
Compile
Program written in machine language (test.exe)
We want to learn ASP.NET
then why we bother about VB?
Networking Basics
Server: A Server is a computer program that
provides services used by other computer
programs. For example a web server serves up
web page upon request from a client
Client: A client is a computer program that
accesses a remote service on another computer
system, known as a server, via a network
(collection of interconnected computers)
Network
Types of web pages
Static
Dynamic
Static web page:
A static web page is a web page that always comprises the
same information in response to requests from all users. It
contains solely some UIs, no programming logic is
associated with the page. Such pages are generally
designed by solely HTML and has .html or .htm extension.
Dynamic web page
A web page that is composed by a program running on the
web server based on the request from the client.
Programming logics are associated with such pages.
E.g. upon login, different users will see different
welcome messages.
Such web pages may have .aspx, .jsp or .php
extension
We shall learn how to create such a dynamic web page
using ASP .NET technology (having .aspx extension)
ASP .NET
ASP.NET is a technology using which we can
create a single generic / dynamic page that
will be automatically modified by the server
according to the user input and the
programming logic inside the page
When we create a web page (test.aspx)
using ASP.NET, a VB file is automatically
created for that page (test.aspx.vb) which
contains the programming logic associated
with that page.
That’s why we need to learn VB
ASP .NET
.aspx file contains the design of the page and
.aspx.vb file contains the related
programming logic associated with different
controls (e.g. button, textbox etc.) in .aspx
file.