Unit 14 Event-Driven Programming (P1, M1, D1)

Only available on StudyMode
  • Download(s) : 6320
  • Published : May 12, 2013
Open Document
Text Preview
Contents
P1 - Identify the key features of event driven programming such as events, event loops and event handlers2
P2 - Explain how development environment components (e.g. Solution Explorer, Forms, Toolbox, Code Editor, Debugger, and Property Window) simplify the development.3
M1 - Describe the features of an event driven language that make it suitable for creating a GUI5
D1 - Evaluate the suitability of event driven programs for non-graphical applications6
References7

P1 - Identify the key features of event driven programming such as events, event loops and event handlers

Events – An event occurs when the user interacts with a object. * Usually this means a mouse movement or click
* Keyboard actions are also events
An event is the outcome of an action. There are two important terms with respect to events. The event source and the event receiver. The object that raises the event is called event source and the object that responds to the event is called event receiver. (Research1)

Event loops – In computer science, the event loop, message dispatcher, message loop or message pump is a programming construct that waits for and dispatches events or messages in a program

Event handler – An event handler is a procedure in your code that determines what actions are performed when an event occurs, such as when the user clicks any button. When an event is raised, the event handler or handlers that receive the event are executed. Events can be assigned to multiple handlers, and the methods that handle specific events can be changed dynamically. You can also use the Windows Forms Designer to create event handlers.

P2 - Explain how development environment components (e.g. Solution Explorer, Forms, Toolbox, Code Editor, Debugger, and Property Window) simplify the development.

Solution Explorer is an area of the integrated development environment (IDE) that contains your solution and helps you manage your project files. The files are displayed in a hierarchical view. By default, Solution Explorer is located on the right side of the IDE. If Solution Explorer is not visible, you can click the View menu and then click Solution Explorer to open it.

A form contains all yours buttons, labels, checkboxes, combo boxes, labels and so on that are displayed when running program. Forms are used when creating GUI applications.

Toolbox Things like buttons, textboxes, and labels are all things that you can add to your Forms. They are known as Controls, and are kept in the Toolbox for ease of use.

Code Editor is a text editor that accommodates language services such as Visual Basic, Visual C++, and Visual C#. Code can be also can be run by compiler or be checked for error by running debugger. The code editor has features like syntax highlighting, code completion, code format.

Debugger can be used to run your program and check for errors. Debugger also can run your code line by line and highlight the lines which contain error in the code.

When an error is found, program warns user and also asks if user wants to load last successful build.

The code line with error is highlighted with a description of the error.

Property window allow you to modify the settings for specific controls in your form. For example: When putting button in your form you have to change in the settings the name of the button and settings like size, text and so on.

M1 - Describe the features of an event driven language that make it suitable for creating a GUI

The graphical user interface describes anything your application displays to the user. It is the primary way to interact with the user and allow him to interact with application. (Research2) GUI’s help users manage well in the operating system. This is because they help the user do actions without having to remember computer command lines. Event driven programs involve a graphical user interface...
tracking img