Skip to content
VUBuddy

CS411 Highlighted Handouts by VUBuddy

Visual Programming PDF 4.7 MBUpdated 23 Oct 2026
Highlighted handout CS411 Highlighted Handouts by VUBuddy PDF 4.7 MB
vubuddy.com
Type
Highlighted handout
Course
CS411 Visual Programming
Size
PDF 4.7 MB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 4.7 MB

You get 3 free files a day on the website. Add the Chrome extension for 30 a day.

Unlimited downloads in the Android app Get it free on Google Play

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.

All CS411 files →
CS411 Visual Programming All CS411 handouts, past papers, quizzes and MCQs in one place. Open course page

Get more out of VUBuddy, for free

Android app Free on Google Play
  • Unlimited downloads
  • The explanation behind every MCQ answer
  • Study offline on slow data
Get the Android app
Chrome extension Free on the Chrome Web Store
  • 30 downloads a day instead of 3
  • Sign in and buy Pro Semester here
Add to Chrome

One Pro Semester membership works in both the extension and the app.