0% found this document useful (0 votes)
8 views14 pages

Lecture 07

Uploaded by

ishuwaraf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views14 pages

Lecture 07

Uploaded by

ishuwaraf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

VISUAL PROGRAMMING

T H A R I K A W E E R A KO O N - D C S

09/08/2025 COM323Α 1
VISUAL PROGRAMMING
CONCEPTS

09/08/2025 COM323Α 2
- a program is actually designed by manipulating graphical
representations (icons) or by a combination of icons and
textual information.
- two key branches: graphical interaction systems and visual
language systems
- This division is based upon how the graphics are used to build
the program. Systems where the user guides or instructs the
system in order to create the program are classified as
graphical interaction systems. Visual language systems
consist of systems in which icons, symbols, charts, or forms
are used to specify the program.

09/08/2025 COM323Α 3
Graphical Interaction Systems
- In graphical interaction systems, the sequence of user actions is
of vital importance since the system "learns" from the user
input. This category is more commonly, and perhaps, more aptly
coined programming by example
- In the majority of systems, a user is required to specify
everything about the program and the system is able to
remember the examples for later use. This type of system could
be described as "Do What I Did"
- Conversely, some systems attempt to infer the general program
structure after the user has provided a number of examples
which work through the algorithm. These systems could be
characterized by "Do What I Mean“and are often referred to as
09/08/2025 COM323Α 4

automatic programming, which has generally been an area of


Visual Language Systems
- Within this classification are systems using icons, symbols,
charts, and forms to specify the program. The spatial
arrangement of the symbols specifies the program. This
differentiates visual languages from graphical interaction
systems (programming by example), since, in graphical
interaction systems, the user interaction with the system is
important, and in visual languages, the arrangement of symbols
on the screen is important
- Visual languages are composed of a set of graphical symbols
which are constructed into "visual sentences with a given syntax
and semantics."

09/08/2025 COM323Α 5
Interrupt – driven Processing
1. Enable device, then

2. Proceed with ‘background’ processing until an interrupt is


received, at which point.
3. Save state (context – switch)

4. Respond to input

5. Restore state and go to step #2

09/08/2025 COM323Α 6
Event-driven Programming
- Event-driven programming is the standard approach to creating GUIs
- An event-driven program is object-oriented
- Object-oriented programming was originally development to implement
graphical objects within GUI operating systems.
- However, top-level control is expressed differently
- The user is the top-level loop
- Think of Word or a game program
- Every action in your program is a reaction to the user
- Decompose program in terms of “what will I do if the user does…”
- User inaction may trigger background actions (e.g, games)

09/08/2025 COM323Α 7
Reusability
- Building-block approach
- Central to the OOP concept
- Improves performance
- More reliable programs
- Avoids reinventing the wheel

- Reusability also helps in building more reliable and effective


systems.
- Because existing classes and components go through extensive
testing, debugging and performance tuning

09/08/2025 COM323Α 8
Designing a Program
- Critically important to design before beginning to code

- Doesn’t matter the size of the program, - design first!

09/08/2025 COM323Α 9
Program Planning Steps
1. Analyze – define the problem

2. Design – plan the solution to the problem

3. Design the interface – select the objects that will be used

4. Code – translate the algorithm into a programming language

5. Debug and Test – locate and remove any errors in the program

6. Complete the documentation – Internal and External

09/08/2025 COM323Α 10
Program Planning Steps
1. Analyze – define the problem

2. Design – plan the solution to the problem

3. Design the interface – select the objects that will be used

4. Code – translate the algorithm into a programming language

5. Debug and Test – locate and remove any errors in the program

6. Complete the documentation – Internal and External

09/08/2025 COM323Α 11
09/08/2025 COM323Α 12
Design Process Results
- Even for a small program, the design process should produce the following results:

1. A concise list of tasks to be performed by the program

2. Deadlines for components

3. Clarification of the dependence of one part of the program on another

4. The criteria for testing the program

09/08/2025 COM323Α 13
Visual Programming Benefits
- Provides the programmer with the ability to create graphical user interfaces (GUIs)

- Allows the programmer to write much less code

- Does not require the programmer to be a Windows expert

- Provides Rapid Application Development (RAD) – code can be developed faster and cheaper

09/08/2025 COM323Α 14

You might also like