SIT 103 Introduction L1
SIT 103 Introduction L1
VISUAL PROGRAMMING
Pre-requisites: SCS101
J. Kamiri
Department of Information Technology
Preamble
• Most people are familiar with the existing tasks the computer can
perform.
• You have also learnt the basics of programming in SCS 101.
• You were exposed on how to command computers to perform various
tasks.
• i.e software-instructions you write to command computers to perform
actions and make decisions that controls computer hardware.
• In this unit you will go a step further and learn how to develop
windows application that have a Graphical User Interface (G.U.I).
• This unit uses Event-driven and object-oriented programming
paradigms.
Programming Concepts (Refresher)
• Program-it is a sequence of instructions, statements, and series of
codes that instruct a computer to perform certain tasks.
• Programmer-this is a person who writes computer programs
• Programming-This is the act of writing, coding, testing and running a
series of instructions to perform a certain task.
• Programming language-This is an organized collection of symbols
with syntax and semantics to prepare computer programs.
• Modules-smaller programs units, also known as subsets of a program
Programming Paradigms (Refresher)
• A programming paradigm is an approach to solving programming
problems
• A programming paradigm may consist of many programming
languages.
• Programming paradigms are the result of people’s ideas about how
programs should be constructed
• A programming language can belong to more than one paradigm
• They include: Procedural/sequential, Object-oriented, Event-
Oriented, Functional, Scripting, modular
Programming Paradigms (Refresher) Cont.
Imperative/procedural/sequential paradigm
• Designs a program that follows a series of instructions in a sequential
manner.
• i.e it follows top-bottom approach in program execution.
• Example C programming
Functional Programming:
• In this paradigm, a program consists of functions and uses functions in a
similar way as used in mathematics
• Execution involves functions calling one another.
• Example FOTRAN
Programming Paradigms (Refresher) Cont.
Scripting:
• Scripting is a very “high” level of programming which glues together different
programs.
• Scripts are written in presence of core programming language, though they are
different from the core programming language
• They are mostly used in website development and mobile application
development. Example: JavaScript is used to make a website to be responsive.
Modular:
• Divides the program into sections known as modules, each module is developed
independent of one another then the modules are integrated to create the final
program.
• Majority of programming especially event-driven and OOP apply modular
approach
Programming Paradigms (Refresher) Cont.
Object-Oriented Programming
• This paradigm uses classes and objects.
• It has other concepts such as inheritance, polymorphism,
encapsulation, etc. Example, Java, C++, Python, Visual Basic
Event-driven Programming
• Programming that is based on user events such as clicking a button,
hoovering a mouse, etc. These user actions are called events
• Mainly uses a Graphical user Interface (GUI)
• Example; Visual Basic programming, Java
Introduction to Visual Basic.Net
• Visual Basic is a third-generation event-driven and Object-Oriented
programming language first released by Microsoft in 1991. It evolved
from the earlier Disk Operating System(DOS) version called BASIC.
• BASIC means Beginners' All-purpose Symbolic Instruction Code.
• Since then Microsoft has released many versions of Visual Basic, from
Visual Basic 1.0 to the final version Visual Basic 6.0.
• Visual Basic is a user-friendly programming language designed for
beginners, and it enables anyone to develop GUI window applications
easily.
Cont.
• In 2002, Microsoft released Visual Basic.NET(VB.NET) to replace
Visual Basic 6.
• Thereafter, Microsoft declared VB6 a legacy programming language in
2008.
• Fortunately, Microsoft still provides some form of support for VB6.
• VB.NET embraces concepts of Object-Oriented programming and
implements them using Event-driven programming.
The .NET framework
• .NET is a software framework that is designed and developed by
Microsoft. The first version of the .Net framework was 1.0 which
came in the year 2002.
• It is a virtual machine for compiling and executing programs written in
different languages like C#, VB.Net, etc.
• .Net is used to develop Form-based applications for windows, phone
applications, and Web-based applications.
• The framework supports more than 60 programming languages which
include: C#, F#, VB.NET, J#, VC++, JScript.NET, APL, COBOL, Perl,
Oberon, ML, Pascal, Eiffel, Smalltalk, etc.
The .NET framework Components
1. CLR (Common Language Runtime)
• CLR is the basic and Virtual Machine component of the .NET
Framework.
• It is the run-time environment in the .NET Framework that runs the
codes and helps in making the development process easier by
providing various services such as:
• remoting, thread management, memory management, robustness, etc.
• It acts as an interface between the framework and operating system.
• Basically, it is responsible for managing the execution of .NET programs
regardless of the .NET programming language.
• Moreover, it provides security, type-safety, interoperability, and
portablility.
CLR Procedure of Converting Source Code to Machine Code