The University of Queensland Homepage
School of ITEE ITEE Main Website

 INFS3204 Practical 3

Practical guidelines:

Just to iterate:
  • Pracs are designed to introduce you to common programming concepts taught in this course.
  • Each prac consists of any number of tasks, which may be assessed for marks when completed.
  • Read the instructions given in the prac to see what should be the desired results. Sometimes hints may be given to guide you through the task, but for most of the time you're encouraged to research how to solve the problems yourself!
  • Don't hesitate to ask the tutor if you need help.
In this prac, we will be learning to use ADO.NET for reading and storing data to databases. Check your lecture slides for more details regarding ADO.NET.

There are 3 marks for this prac, allocated as follows:

  1. 1 mark for completing task 1.
  2. 2 marks for completing task 2.
This prac is due in Week 7, although you can ask your tutor to mark it if you finish early!

Task 1: Simple Quiz Editor

Marks:1
Objectives:
  • Creating an ASP.NET web application that utilizes ADO.NET for reading and writing to an Oracle database
  • Binding controls to a data source
  • Catching exceptions
Instructions: Follow the Flash video embedded below. It will no longer explain trivial actions, for example adding Web References, so go back to Prac 1 if you'd like to refresh your memory.

Note that in this flash, you need to download prac3.sql here.


Task 2: Create Account and Form Validation

Marks:2

Instructions: This prac will require you to create a basic login system that retrieves the username and password from a database.

Requirements:
  • A login page which accepts a username and password, and checks the entered details against details stored in the database. (The password should be masked during login).
  • If the user is successful logging in a 'welcome' page, which displays "Welcome user's name" will be shown.
  • An error message should be shown if the username or password is not found within the database.
  • Finally, a create user account page which accepts and validates the user's names, address, postcode and telephone number. When the create user account page is filled in and submitted, the details are entered into the database.

Note: A database is required for this prac.

That's it for Practical 3


Additional Exercises

Additional Task 1: Interaction with Database through web service

Instructions: For this task, you will need the database for storing of data. This web app will emphasize on the interaction between web services and the database. You are required to apply your database knowledge and research on how password could be hashed before storing it into the database. The requirements will be slightly similar as before but you will need to interact with the database.

Requirements:

  • There will be a login page.
  • There will be a create account page.
  • User will be able to create an account by submitting their username and password. (Note: User should not be able to create another account with the same username.)
  • User will have to do a hashing to their password before storing into the database. No clear text is to be stored in the database under the password column.
  • The database should have the following attributes: username and password. You can stored the data as varchar2.

Note: Database is required for this practical. You will need to create 2 web services (1 for login check and 1 to be used for encrypting and decrypting of the password) You will have to set up your oracle server account. Validations are compulsory for all parts of the practical. User are not allowed to key in empty field for both the username and password.


Additional Task 2: Interacting with email service.

Instructions: For this task, You will need a web service that will send an activation link to your email upon registering with the website. Similar to the previous practical, you will have to create a database for storing the information.

Requirements:
  • The user willl need to create a registration page. (Hint: You can use registration page found online for reference.)
  • The registration details have to be stored into the database.
  • After registration, the web service would automatically send an email to the newly registered user for confirmation.

Note: Some research is required to find out how to send an email. You can use the school smtp to do the relay.