Programme |
Diploma in Computing |
Unit Number and Title |
Unit 20 Event Driven Programming Solutions |
QFC Level |
Level 4 |
Unit Code |
H/601/0453 |
Principles of Event Driven Programming: Event-driven programming is a programming approach in which events decide the flow of program execution. For example when a user performs a mouse click, press a key on keyboard or interact with the system with any other input method.
An event-driven web application detect events as they occur and then call appropriate event-handling procedures to generate the results desired by the user.
The previous era of programming uses interrupt-driven programming to generate results on command-line environments such as DOS or embedded systems (where the application is implemented as firmware).
Event-driven programs can be written in any programming language, but Visual Basic is specifically designed to facilitate event-driven programming. It also provide an integrated development environment (IDE) {Visual Studio} which helps developers in writing code and provide variety of built-in objects and controls.
Characteristics of Event Driven Programming:
Features of Event Driven Programming:
M3 Present and communicate appropriate finding in a standard technical format when submitting this report to the club president.
Report for club president:
After a thorough study of application requirements for “The Creative Computing Club”, we found that, we have to develop a GUI based application for the club. This application provide functionality for three kind of user.
To develop such application we have to select a programming paradigm which is best for current application. There are many programming styles for application development such as procedural programming, event driven programming and object oriented programming etc.
After deep study of each programming paradigm we decided that Event driven programming will be the perfect solution for the application. Event driven programming is suitable for such applications which performs actions based on user actions (events).
Since proposed application is a GUI application and it performs tasks according to the user actions. Event driven programming is best choice for the application.
To develop an event driven programming solution we have to define an event scheduler which receives all events and pass the control to event specific handler.
Technologies to be used for the application:
Proposed design of the application using event driven programming
Since we are developing an application for Creative Computing Club we prepared user interface design for our application.
Our design in visual studio is as follows:
Design of login screen:
Presenter Details Form:
(Figure : Presenter Details Form)
1.Complete interface of visual studio
(Figure: Visual Studio Complete interface)
2.Solution Explorer: It provides functionality to manage all project files. It shows a tree structure which enables users to add, delete or rename files to their projects.
(Figure : Solution Explorer)
3.Editor Area: This is the main working area for the user. It provides two interfaces Design and Code.
In Design interface user can see application’s running time interface. He can add or adjust other components using mouse.
In Code interface application shows application code to the user.
(Figure : Editor Area)
4.Toolbox: Toolbox area provides screen controls for the application. It is very useful with Design Interface of Editor Area. User can drag controls from here and add them directly to the application interface.
(Figure: Toolbox)
5.Toolbar: It provides few useful shortcuts to work with visual studio, like opening new project, save project, run project, debug project etc.
(Figure: Toolbar)
M2 Identify and apply strategies to find appropriate design solutions to your application. Include all design documentations listed in briefing note for Task2.
Strategies for designing the application (User Use Case & Application Flow diagrams)
During the study phase of the application we have found that there are three types of users in the application:
Following diagram shows tasks of these users in the application.
(Figure: User Case Diagram for all users of the application)
After defining the tasks for each user we have designed the flow of application. This application flow describes how modules of our application work together to achieve a specific goal.
(Figure: Application Flow Diagram)
Take responsibility for managing and organizing all the activities in your project. Refer to briefing note for Task 2
Project Plan: After deep study of the application we have defined user roles and application flow between modules we are now assured that this application is feasible and we it fulfill all tasks as stated in assignment.
We have made a project plan, which defines various phases of our application development and estimated time for each phase.
Following figure represents our project plan:
(Figure: Project Plan)
Get assignment help from full time dedicated experts of Locus assignments.
Call us: +44 – 7497 786 317Implementation of Event Driven Programming Solution: After designing the interfaces we have implemented the event driven solution for our design. We have written event driven solution in Visual Basic (VB.Net).
Our Event driven solution uses control structures to determine part of code to execute.
First of all application displays a login dialog to the user. Here user can logged in the application.
After login user can perform tasks. All application tasks can be performed via event driven menus.
Application screens for event driven menus are as follows:
Management Menu: This menu is used to manage presenters and users of the application.
Results Menu: This menu is used to manage results of a presenter. This menu is also used to view certificates of any presenter.
(Figure: Results Menu)
By using these event driven menus users of this application can perform their tasks.
Implementation of Event Handling: By using event driven menus user can access all parts of the application. All features of the application can be accessed via these menus.
All other features of the application can accessed using different event driven forms. These event driven forms provide user interface of the application and provide event based functionality as well.
Some event driven forms for the application are as follows:
Login Form:
(Figure: Login Form)
Delete Presenter Form
(Figure: Delete Presenter Form)
Add User Form
(Figure: Add User Form)
Delete User form:
(Figure: Delete User Form)
Add Presentation Form
(Figure Add Presentation Form)
Schedule Presentation Form
(Figure: Schedule Presentation Form)
Identification of Error Opportunities and Handling them: All users perform their tasks via event driven forms. These forms display visual interface for user input and process input data entered by the user. We encountered many input and logical errors.
While development process we have encountered following errors and have provided implementation for solving them.
Empty values on login screen: First error which we have encountered was at login screen. Here user provides his username, password and role. Login functionality was working well if user provides proper values. But if user leave form fields blank and try to login then application was generating an error in the background. To provide proper functionality our application must notify users about invalid input. So we check for empty values at login time if it found application will display a message box to the user.
(Figure: Message box for blank values at login screen)
Invalid User Name: At login screen if user specify an invalid username and password, the application denies the login request. Previously application was displaying login message on the console. This console message was irrelevant to the desktop application user. Now I have update the application to display a message box for invalid username and password.
Error checking for invalid UserName: While adding a new presenter, administrator has to specify his login details. Login username for all users must be unique for login functionality. If any specified username already exists application displays a message box to notify users that username already exists.
Date check while scheduling presentations: As per the assignment, while scheduling presentations, next presentation date can only be scheduled after two weeks of previous presentation. We have checked all possibilities of errors for applying this constraint.
(Figure: Date Schedule Message while scheduling presentations)
Maximum Allowed Presentations: As per the assignment, any presenter can give only four presentations. We have checked all error possibility for adding more than four presentations for a presenter.
(Figure: Error message while adding more than four presentations)
Design of application using IDE with Screen Templates: We have used all features of the Integrated Development Environment (IDE) provided by the visual studio.
Interface Builder of visual studio is used to design all visual interface for the application. Interface Builder provide drag and drop functionality to create user interface.
Auto Event Binding is used to bind event handlers with the form controls.
IntelliSense and Code Completion feature of visual studio is helped us to write control structures for event driven programming.
Interface designed with the help of visual studio IDE is as follows:
Login Form:
Presenter Screen:
Add User Screen:
Presentation Dates Screen:
Add Marks Screen:
M2 Your report must include range of methods updating your system.
Methods for updating the system: We have added functionality to edit and delete information for the user and presenter. Admin can perform update and delete operations on the data of presenters and their scheduling information.
Following forms provide update and delete functionality:
Form for presenter information edit:
(Figure: Edit Presenter form)
Form for presenter entry delete:
(Figure: Update User Form)
User entry delete form:
(Figure: Presentation schedule for Add, Edit and Remove)
(Figure: Delete Presentation date)
Critical Review and Test of developed Event Driven Programming: After developing the proposed event driven programming solution for the application we have reviewed all form for expected results.
Our review report are as follows:
Login Form: Login form is displaying as splash screen at application startup. All users must have passed through through login form to use the application. After reviewing the login form we found that all event handlers are working fine for the login form.
Presenter Form: Presenter from is used to add a presenter user in the application. Here user can register new presenter, edit existing presenter and delete existing presenter. After reviewing the presenter form we found that all event handlers are working fine for the form.
User Form: User form is used to add new user (Clerk) in the application. Here user can register new presenter, edit existing presenter and delete existing presenter. After reviewing the presenter form we found that all event handlers are working for the form.
Presentation Dates Form: Presentation dates form is use to add presentation dates for the club. It is used to set schedule of presentations with dates. It provides functionality to add, edit and remove presentation dates. It is also displaying a list of all presentation dates scheduled for presentations. After review we found that all event handlers are working for the form.
Presentation Schedule Form: This form provides functionality to schedule presentation dates for a presenter. This form provides a list box (List of presentation dates) using which presentation schedule of a presenter can be specified. User can only set four presentation dates for a particular presenter. After review we found that all event handlers are working for the form.
Add Marks Form: This form provides functionality to add marks for all presentations of a presenter. As per the assignment instructions we have provided 4 scores for each presenter and entered marks can’t be more than 25. After review we found that all event handler and error checking are working for form.
Analysis of actual test results against expected results
After critical review and test of event driven functionality we have made some test cases to be sure that all major buttons are working properly or not.
After these test cases we can be sure that our application can handle all input errors and can produce effective output.
We have made following test cases for the application:
S.N. |
Testing Criteria |
Expected Result |
Actual result |
1 |
Login Button Check on Login screen |
1. Display error message for invalid login 2. If username and password is valid then logged-in user into the application. |
1. Displaying message on invalid data or invalid username and passwords. 2. If username and password is valid then providing access of the application to the user. |
2 |
Register Button on presenter form |
Display Register Presenter dialog to the user. |
It is displaying Register presenter dialog to the user |
3 |
Edit button on presenter form. |
Provide editable access to the user for selected presenter. |
It is providing editable access to the user for selected presenter. |
4 |
Delete Button on presenter form |
Delete selected presenter. |
It is deleting selected presenter |
5 |
Add, Edit and Remove Button on Users Form |
1. Add button displays add user screen. 2. Edit Button provides editable access for selected user. 3. Remove Button removes selected user. |
1. It is displaying add user screen. 2. Providing editable access to selected user. 3. Removing selected user. |
6 |
Schedule Presentation Form |
Provide functionality for selection of at most 4 presentation dates. |
Providing functionality for selection of at most 4 presentation dates. |
Feedback and Recommendation: During the evaluation of this application is thoroughly tested and executed for various input and test cases. After evaluation we found that all of its features are according to the criteria given in the assignment and all features are working properly.
There is some minor suggestions from our tutor regarding form validation, I have corrected that after it there was no negative feedback.
User Documentation: Here is the step-by-step instructions for using the application:
(Figure: Login Interface)
Here user can login in the application. While login user must specify his role (User Type).
(Figure: Interface after login)
Manage Menu: It provides all management tasks for the application.
Presentations Menu: It provides all tasks related to the presentations.
Results Menu: It provides options for managing and display of marks of presenters.
Here click on register button to register new presenter.
To edit an existing user select username form the left hand side list and click on “Edit” button.
To delete a presenter select username from left hand side list and click on “delete” button.
Application displays a form to add/edit/delete users.
Click on “Add” button to add new user.
To edit an existing user select his name from left hand side list and click on “Edit” button.
To Delete the user select username from left hand side list and click on “Delete” button.
Following dialog is displayed to the user.
Here user can “Add”, “Edit” or “Remove” presentation dates.
Following dialog is displayed to the user.
Here user can select presenter name from a drop down list and select his presentation dates.
User can select at most 4 presentation dates for a presenter.
Following form is displayed to the user:
Here user can view schedule of any presenter by selecting presenter name from drop down list.
Following form is displayed to the user:
Here marks of any presenter can be added or updated. Presenters can be selected from top drop down list.
Following form is displayed to the user:
here marks of any presenter can be viewed by selecting presenter name from drop down list.
Following dialog is displayed to the user:
Here a list of all certificates will be displayed to the user. User can also filter certificates by category (Gold, Bronze and Silver) from drop down list.
D1. Discuss why certain events are more suited for activating certain functions than others and provide 3 examples of specific events you will use for specific functions related to the case study.
Function specific events
We have applied event driven programming on every module of this application. We have used several events to provide just in time validation (Validate values while receiving input).
We have used just in time validation in Add Marks form.
As per assignment instructions we have following constraints while adding marks
We have applied TextChange Event on the form fields to validate user input data while receiving input values.
We have displayed Message Boxes to notify users for invalid values.
Error Message when presentation marks are greater than 25.
Error Message for invalid value such as a sting.
D3. Produce a self evaluation on what went well or wrong with this assignment and how you did resolved problems in your programming You must also explain how you would develop the application further if you had more time and resources available
Self Evaluation: While developing this project we have faced minor problems in data validation and user authentication and event driven programming. But all of these problems are solved with the help of our tutor and reference books.
We can further develop this application with more enhanced visual features like option to add image for all presenters, their poster for presentation and use of icons in the application menus and button if we have more time.
Event driven programming [Online]. [Accessed on 6 January 2015]. Available on world wide web: <http://en.wikipedia.org/wiki/Event-driven_programming>
Eventdriven programming [Online]. [Accessed on 5 January 2015]. Available on world wide web: <http://www.technologyuk.net/computing/software_development/event_driven_programming.shtml>
Key features ofevent driven programming [Online]. [Accessed on 7 January 2015]. Available on world wide web: <http://reece-burrows-media.blogspot.in/2013/11/key-features-of-event-driven-programming.html>
Eventdriven programming [Online]. [Accessed on 6 January 2015]. Available on world wide web: <http://c2.com/cgi/wiki?EventDrivenProgramming>
Getting Started with Visual Basic [Online]. [Accessedon 5 January 2015]. Available on world wide web: <http://msdn.microsoft.com/en-us/library/dd492171.aspx>
Microsoft Visual Studio 2013 Tutorials [Online]. [Accessedon 7 January 2015]. Available on world wide web: <https://www.youtube.com/watch?v=uV1ck35qiG8>
VB .Net Tutorials [Online]. [Accessedon 5 January 2015]. Available on world wide web: <http://www.tutorialspoint.com/vb.net/>
VB .Net – How to start programming [Online]. [Accessedon 6 January 2015]. Available on world wide web: <http://howtostartprogramming.com/vb-net/>
Use Case Diagram [Online]. [Accessedon 7 January 2015]. Available on world wide web: <http://en.wikipedia.org/wiki/Use_Case_Diagram>
Details
Other Assignments
Related Solution
Other Solution