12.07.2015 Views

Chapter 6 VB/Access Programming

Chapter 6 VB/Access Programming

Chapter 6 VB/Access Programming

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Chapter</strong> 6<strong>VB</strong>/<strong>Access</strong> <strong>Programming</strong>increased ‘user-friendliness’ of modern applications. However, from aprogrammer’s viewpoint, it adds complexity to the design of the application. As thesequence of events cannot be predicted, the application must make assumptionsabout the ‘state of the world’ when it executes. The programmer must structure theapplication so that these assumptions are always valid. For example, if anassumption is made that the user will have made an input to an entry field, the codemust ensure that input has been made before the event can occur. In suchcircumstances, a check must be included to ensure the data has been entered beforeallowing the event to proceed.The application shown in the figure, ‘Event-driven Procedural Application’ consistsof identical processes to the application shown in the previous figure, ‘TraditionalProcedural Application’. However in the event-driven application there aremultiple possible entry points and the user may choose any of these entry points atrandom. Each of the entry points represents an event.Event-Driven Procedural ApplicationEvent 12Event 21Opt io n 1MenuEvent 3 Event 4Opt ion 2Opt io n 3Page 73

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!