- Type
- Highlighted handout
- Course
- CS411 Visual Programming
- Size
- PDF 4.7 MB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extensionSign in with the extension for 30 a day.
Preview text
Text from pages 4, 5, 6 of 228. Download the file for all 228 pages.
Chapter 1
Lecture 1
This course is about graphical user interfaces and the event-driven model as applied to desktop, web, and mobile applications. It uses a ground up approach from what you already know.
The pre-requisites are C++ programming and data structures. I will introduce any new languages and concepts we are going to use.
This is a hands-on course. We will use in-class examples and you should focus on completing programming assignments to understand the material.
We will primarily use 2 books in this course. “Event processing in action” and “Windows resentation foundationunleashed”. The first one is authored by Opher Etzion and Peter Niblett and is one of the very fewbooks on event processing. Event processing is often taught as a side-concept, but we will focus on it in this course. The other book is by Adam Nathan. It is about Windows presentation foundation or WPF in short. We use it as our gui example with C#. We will introduce C# concepts and WPF concepts. They are not a pre-requisite for this course.
Later in the course, we will touch event-driven programming in the browser, in particular made possible by techniques called AJAX. Again not a pre-requisite. I will introduce all the concepts in class. Towards the very end, we will discuss event driven programming on mobiles. Again no pre-requisite. I will introduce all the tools involved.
So what is Visual Programming and what you will learn in this course. Its primarily event driven concepts and application of these concepts on GUI programs on desktop, web, and mobile.
Here is our first example:
Using namespace std;
Int main()
Char a; Do { A = cin.get(); Cout << a; } while (a!='x'); Return 0;
Let’s compile and run using the commands
G++ -o example1 example1.cc ./example1
Our second example Int main()
Char a = '-'; Do {
A = f.get();
F.close(); } while (a!='x'); Return 0;
Let’s compile and run it. There are a few issues like busy wait etc. But we’ll leave them on a side for now.
So why we saw these two very basic examples. Well, they were both very easy to write. With an OR.
Int main()
Char a = '-', b; Do {
B = std::cin.get();
A = f.get();
F.close();
Return 0;
I.e. We react to either of the two actions. Here is how we can do it.
Int main()
Char a = ’-’, b; Do {
B = std::cin.get();
A = f.get(); F.close();
Return 0;
Or we could re-factor it into a cleaner version.
Int main()
Char a = '-', b; Do {
Return 0;
Return 0;
F.close();
Return 0;
So what are the pros and cons of the re-factored approach. We do one thing at a time (more focused approach). Blocking is a huge issue. Nothing is parallel. The key idea is that once you understand the approach, it scales really well to a large number of things you want to respond to.
Next time we’ll define events, event loops, and different terms in the event driven model.
Related CS411 files
All CS411 files →- CS411 Final Term Solved File 1 by Team Hadi Final term PDF 1.1 MB
- CS411 Quiz 1 Lectures 1-10 by Lucky Quiz PDF 1.7 MB
- CS411 Highlighted Handouts by VUBWN Highlighted PDF 12.7 MB
- CS411 Official Handouts Official handout PDF 4.9 MB Free
- CS411 Highlighted Handouts by MAS All Rounder Highlighted PDF 5.6 MB
- CS411 Highlighted Handouts by Sawera Ch Highlighted PDF 13.6 MB
Get more out of VUBuddy, for free
- Unlimited downloads
- The explanation behind every MCQ answer
- Study offline on slow data
- 30 downloads a day instead of 3
- Sign in and buy Pro Semester here
One Pro Semester membership works in both the extension and the app.