
Web Site Project
1621ICT— Web Technologies
School of ICT Griffith University Trimester 1, 2021
Part A (10%) is due at the end of Week 6 (5pm Friday 23rd April)
Part B (20%) is due at the end of Week 11 with demonstrations to be conducted in your week 12 workshop. (5pm Sunday 30th May)
Assignment Description
This assignment tests your ability to design and develop a website using a combination of HTML, CSS and PHP. In Part A, you will need to produce the design for a website for a fictitious client. Your client could be a small local business, a government agency, a volunteer organisation or any other entity that needs an online presence. Use of an existing real business or organisation is not appropriate for this assignment. The aim of the website is to facilitate your client’s online needs which you should describe in your design document. In Part B, you must develop the website as per your design document. The implementation should make use of the technologies discussed and taught in this course over the semester, and should be hosted on the ELF platform. You will demonstrate your finished product to your tutor in the week 12 lab classes.
It is important to note that submission of this assignment is a requirement for passing the course.
Submission Requirements
Part A of your assignment must be submitted online via L@G under the assessment page. A single Word document is preferred, though a PDF file is also acceptable. Other formats are not allowed. The filename for your document should start with your student number and be named sensibly. For example:
s1234567_PartA_Design.docx
You will be required to present Part B of your assignment in your week 12 lab classes. You will also need to download the source files from ELF and upload them as a zip file to L@G before the due date. To obtain your files, log in to ELF via an SFTP client (WinSCP / FileZilla). You can then download the files and zip them up (include your student number in the zip file name – example below) and upload it to the submission link on L@G.
s1234567_PartB_Site.zip
Part B – Web Site Implementation (20%)
You are required to implement the website you designed in part A. If you make significant deviations from the design, you should provide a justification on why the design was not followed as an additional document.
While this assignment is designed to allow you to express your interests and creativity, there are some minimum requirements that must be met.
To achieve full marks, your website must include all of the following:
- A minimum of 5 pages (including the landing/home page)
- Demonstrate an understanding of HTML tags by including at least 1 of each of the following:
- Images
- Lists
- Tables
- A Navigation menu / Navigation bar
- External CSS files for layout – please note you cannot use any CSS frameworks in your site.
- Use a provided SQL database to retrieve and display some data to the user.
- A form for entering data into the database or database searching – you may choose which you wish to do.
Use of pre-created HTML templates is not allowed and will be easily detectable. Please refer to the Academic Misconduct policy under the assessment section of the website.
In addition to the above site requirements, your website will also be assessed for:
- Use of external stylesheets
- Correct formatting of HTML
- Correct formatting of CSS
- Appropriate layout and navigation
- Consistent ‘look and feel’
Database Usage
Set Up
On the assignment page, you will find a prebuilt database file that uses SQLLite. SQLite is a software library that implements a self-contained, server-less, zero-configuration, transactional SQL database engine. It is installed on your workspace by default.
The provided database (attached) includes 3 tables; Customers, Events and Products. These are filled with some simple data that you can retrieve and display on your website. The default tables are provided below, and the scripts used to create them are provided as an attachment.
To use the provided database, you will need to upload the 1621ICT.db file to your ELF workspace inside your Assignment folder.
Use
There are 3 main steps involved in querying a database and displaying results on a web page;
- Connect to the database
- Query the database using PHP & SQL
- Present the results using PHP and HTML
The code to perform the first 2 steps is provided in the form of 3 pre-written php functions located in the file queryDb.php provided on the assignment page on L@G – 1 function per provided table; getCustomers() getProducts() and getEvents();. You will need to place this file in your assignment directory along with the database file.
Each of these functions has an OPTIONAL argument that will allow you to search the table for a specific record. The search will operate on the entire table, so for example, you could use getCustomers(“Jones”) and this would search the FIRSTNAME, LASTNAME, ADDRESS and PHONE of the Customer for the term “Jones”. If you provide no search term, all the records will be returned. The index to each row of the array will be the column name listed on the previous page:
Customers (CUSTID, FIRSTNAME, LASTNAME, ADDRESS, PHONE)
Etc.
In addition to retrieving data from a database, queryDb.php also contains 3 functions for adding an entry: addCustomer(), addProduct() and addEvent().
Each of these functions has 4 parameters – the 4 non primary key fields in each table. There is NO DATA SANITATION performed – the 4 values provided to the function will be placed in a simple SQL query. For example,
addCustomer(‘Sgt.’, ‘Robocop’, ‘Police station’, ‘000’); will execute the SQL:
INSERT INTO TABLE CUSTOMERS (FIRSTNAME, LASTNAME, ADDRESS, PHONE) VALUES
(‘Sgt.’, ‘Robocop’, ‘Police station’, ‘000’);
and the database will automatically assign a CUSTID to the new record. This is obviously not best practice in real-world applications due to security issues and SQL injection, but for the purposes of this course, will suffice.
Requirements
At a minimum, you need to use your knowledge of PHP and HTML to display the data from one of these tables on your web page in a sensible manner using the provided PHP functions in queryDb.php. You will also need to use a form to either search the database for a specific record or use a form to allow new data to be added to the database. Both of these options can be achieved using the provided functions. Bonus marks will be awarded for designing your own tables and/or php functions to interact with the database.
Remember to include the queryDb.php file by writing the line require_once “queryDb.php”;
inside a <?php?> script in your file.
Modifying the database
For students wishing to create their own tables or modify the existing ones, you can look at and modify the SQL_DB_CreateScript.sql used to generate the provided db. You will need to make adjustments/write your own queryDb.php to work with any modified tables. This is not a requirement for the course/assignment, but your tutor may be able help you do this. You could use https://sqliteonline.com/ as an online interface to create an sqlite database file or download the SQLiteStudio tool https://sqlitestudio.pl/
