Server-Side Web Programming

Assessment 3
Server-Side Web Programming
CSE2ICX Internet Client Engineering
2 © Didasko 2019. All rights reserved. 2
Before you begin
Objectives
This is an individual assignment. Students are not permitted to work in a group when writing this
assignment.
Copying and Plagiarism
This is an individual assignment. Students are not permitted to work in a group when writing this
assignment. Plagiarism is the submission of another person’s work in a manner that gives the
impression that the work is their own. La Trobe University treats plagiarism seriously. When detected,
penalties are strictly imposed.
Further information can be found on
https://www.latrobe.edu.au/students/admin/academic-integrity
Submission Guidelines
Your assignment submission should be typed, not written/drawn by hand.
Submit the electronic copy of your assignment through the subject LMS.
Submission after the deadline will incur a penalty of 5% of the available assignment mark per day
capped at 5 days. No assignment will be accepted after 5 days. If you have encountered difficulties
that lead to late submission or no submission, you should apply for special consideration.

© Didasko 2019. All rights reserved. 3
Contents
Server-Side Web Programming ………………………………………………………………………………………… 1
CSE2ICX Internet Client Engineering ………………………………………………………………………….. 1
Before you begin ……………………………………………………………………………………………………………. 2
Objectives ………………………………………………………………………………………………………………….. 2
Copying and Plagiarism ……………………………………………………………………………………………….. 2
Submission Guidelines …………………………………………………………………………………………………. 2
Background ………………………………………………………………………………………………………………… 4
Task 1: Home (index.aspx) …………………………………………………………………………………………… 4
Task 2: Add record (add.aspx) ………………………………………………………………………………………. 4
Task 3: Invoice (invoice.aspx and print.aspx) …………………………………………………………………… 4
Task 4: Stocktake (stocktake.aspx) ………………………………………………………………………………… 6
Task 5: Chart (chart.aspx) …………………………………………………………………………………………….. 7
Task 6: Organisation ……………………………………………………………………………………………………. 7
Task 7: Layout ……………………………………………………………………………………………………………. 8
Task 8: Navigation ………………………………………………………………………………………………………. 8
Task 9: Presentation ……………………………………………………………………………………………………. 8
Task 10: Code …………………………………………………………………………………………………………….. 9
Submission ………………………………………………………………………………………………………………… 9
Assessment marking criteria …………………………………………………………………………………………. 9

4 © Didasko 2019. All rights reserved. 4
Background
You have been approached to create two storefront websites for a storefront in Brisbane. Your choice will be
the same choice you made as per your Assignment 1 and 2 works. You must create the websites to be as
realistic as possible for a normal organisation.
The organisation has requested two websites: A public website with information about the organisation and an
internal website that members of the organisation will use for day-to-day management. For
assignment 3, you
are now tasked to create the
internal website.
This assignment is part of a running scenario for all assignments in this subject, where the Brisbane storefront
will continue to be your client. Please also refresh your memory regarding the additional background information
provided previously in Assignments 1 and 2.
The tasks of this assignment are organised as follows. Tasks 1-5 first describe the functional requirements of
the website, regarding what each of the web pages will do. Then Tasks 6-10 describe the non-functional
requirements regarding the behaviour of all parts of your solution. Note that some of the non-functional
requirements have similarities to Assignment 2, so please read these carefully in particular.
Task 1: Home (index.aspx)
The home page is the entry point for the website. As this is the first page that will be viewed by the
staff, it should be designed in an attractive manner.
The home page includes a GridView control that has a list of Purchases. The data will be taken from
a XML data file and populated in the grid via the data binding technique. The fields will be for the
following data: id, full name, email address, product name, unit price, quantity. Note that the value
of the id field must always be unique. A sample data file with dummy data can be downloaded from
where you obtained this assignment document. You must include a copy of the data file in your
submission. You must also demonstrate your familiarity in working with the data file format by
modifying and/or extending the data.
The home page also includes a Label control with a one-sentence summary about the following:
number of “big orders” (i.e.: quantity of 10 or more). Your data file should therefore have a mixture
of records to make this output meaningful.
Task 2: Add record (add.aspx)
This page is a form that allows the user to make changes to the XML data file by adding records
one at a time. An appropriate form field is given for each field of the record. Regarding the id field,
this is omitted, and instead your solution determines what the new id will be at the end.
Validation must be implemented in all form fields. In addition, a submit button will save the new data
to the data file. The contents of a label will indicate a success message when done.
Task 3: Invoice (invoice.aspx and print.aspx)
This feature will allow administrators to prepare a printable invoice. It is divided into two pages:
invoice.aspx and print.aspx.
invoice.aspx page:
This page collects details about the invoice items. The form is designed to accept 3 rows of data for
the invoice. A mock-up of the interface is below:

© Didasko 2019. All rights reserved. 5
Some notes about the interface:



Full name of invoicee: Must be no longer than 50 characters to be valid. Required.
Item name: Must be no longer than 100 characters to be valid.
Unit price and quantity: Text boxes that must be validated to receive non-negative
numbers only. A maximum of “1000.00” is allowed for unit price and a maximum of “100” is
allowed for quantity.
Submit: Validates the form and submits the form if valid. User is taken to the print.aspx
page after submission.

The interface must also have appropriate validation controls and a ValidationSummary control at
the end. Validation for individual inputs will be sufficient, and you may omit validation for whole rows
of inputs in combination. A mock-up of the interface showing these is below:
Note that if the provided validation rules are not suitable for your particular organisation, then you
may negotiate changes with an academic. Common sense will generally prevail. Note the changes
in the “notes” part of your submission on the LMS.
print.aspx page:
6 © Didasko 2019. All rights reserved. 6
This is the “destination” page after the form is submitted. This page will be a print-friendly version of
the invoice form with simple labels and totals. All non-essential header, navigation and footer page
components are omitted for print-friendliness. The invoice must include the name and contact details
of the organisation at the top. A mock-up of the remaining output format is below:
Task 4: Stocktake (stocktake.aspx)
This page allows administrators to take a general stock inventory for any day-to-day items related
to the organisation. Examples could be food, beverages, consumables, stationery, equipment, etc.
The stocktake form will allow the user to enter up to three rows of items. The form will be “preloaded” with dummy data to
simulate taking the data from a data source.
The stocktake form also has a text input for the “reorder level”. The reorder level is the level that the
stock must be replenished to. Only stock that has dipped below the reorder level needs to be
replenished back to the reorder level.
A mock-up of the interface is below:
Some notes about the interface:

Reorder level: Read only. Default 10. Modified with “-“ and “+” buttons. Range is 0 to
1000. Additionally performs the function of the “Calculate” button (see below).
Item name: Must be no longer than 100 characters to be valid.

© Didasko 2019. All rights reserved. 7

Stock quantity and unit price: Required. Text boxes that must be validated to receive
non-negative numbers only. A maximum of “1000.00” is allowed for unit price and a
maximum of “100” is allowed for stock quantity. May be set to zero to indicate unused
rows.
Reorder quantity, subtotal and total: Derived data in labels.
Calculate: Validates the form and recomputes calculations (if valid).

The interface must also have appropriate validation controls and a ValidationSummary control at
the end. A mock-up of the interface showing these is below:
Note that if the provided validation rules are not suitable for your particular organisation, then you
may negotiate changes with an academic. Common sense will generally prevail. Note the changes
in the “notes” part of your submission on the LMS.
Task 5: Chart (chart.aspx)
This page includes an ASP.NET Chart control to model data for the organisation with the Chart Type
is set to Line. The data will model the total earnings for last 5 years.
You only need to populate the chart with static data. I.e.: You are not expected to perform any data
binding. It does not matter if your data does not automatically update to remain consistent with any
other page in the site.
The chart must be given attention to detail for its presentation, including all components that you
may expect for this type of chart: title, axis labels, data labels.
Task 6: Organisation
The following organisational aspects must be put in place for your solution:
(1) Programming language:
The website will be a server-side website using ASP.NET for the web forms and C# for the codebehind functionality. Other language combinations will not be accepted (such as Visual Basic for the
code-behind functionality). Some HTML and CSS may also be used where appropriate.
(2) Third-party components:
8 © Didasko 2019. All rights reserved. 8
The website will be hand-coded by yourself. Therefore, you may not include any third-party
components except for those mentioned in the assignment.
(3) Images:
Even though this “internal” website for Assignment 3 is not public-facing, we still expect you to use
images in your website design. Store the images in a subfolder called “images”. Note that the
website cannot use copyrighted images. To avoid this problem, you are welcome to use images with
an open licence. You can get these from
free image websites or by performing an image search on
your search engine with a “usage rights” filter set to “labelled for reuse” (or equivalent). Maintain a
list of references in a file called
references.txt in your solution with the name, author, location and
access date of the images. You may reuse images from Assignment 2, provided these also follow
the conventions above.
(4) Integrated development environment:
The website must be built using Visual Studio 2017.
(5) Template:
The website will be built from scratch beginning with an empty folder. Follow these steps:
a) Create a new folder called
xxx_cse2icx_assignment3, where xxx is your student ID.
b) Open Visual Studio 2017. Select “File” -> “Open” -> “Website…” and select the new folder.
c) Select “File” -> “Close Solution” immediately. This will prompt you to save a solution file (*.sln
suffix). This must be saved in your new folder. Close Visual Studio 2017.
d) Double-click on the solution file to open Visual Studio 2017 and your solution again. Continue
to use this method for opening your solution going forward for convenience.
e) You are now ready to go. Add your project assets next.
Task 7: Layout
The body of the website pages must be organised to include distinct header, navigation, main and
footer semantic tags with the following content:
1. Header: Site name and branding.
2. Navigation: Navigation bar.
3. Main: This is the main content of each page.
4. Footer: Copyright statement.
Task 8: Navigation
The navigation bar appears on every page of the website and contains the following aspects:
1. The navigation bar has links to the five main pages of the website (Tasks 1-5).
2. Each navigation item must be the same size.
3. The link for the current page is disabled and has a different colour/appearance.
4. The links for the non-current pages have a different colour/appearance when hovering.
5. The navigation bar is responsive, meaning that the menu options gracefully wrap to the next
line when they cannot all fit horizontally on the screen.
Mock-up examples are as per Assignment 2.
Task 9: Presentation
The presentation of the website will largely be controlled by CSS with the following aspects:
1. All CSS code will be stored in a site-wide style file called
styles.css and referenced on each
web page.
2. The styling will include a variety of styling for layout.
3. The styling will include a variety of styling for content.

© Didasko 2019. All rights reserved. 9
4. The presentation will endeavour to give the site a contemporary appearance, including HTML
version 5 and CSS version 3 where practical.
A good way to test presentation is to perform cross-browser testing. I.e.: View your website in a
range of popular web browsers and check that the presentation is consistent.
Task 10: Code
This task will award marks according to the quality of your code according to these aspects:
1. Code indentation is consistent with one level of indentation per block.
2. All ASP, C# and CSS file types each use some comments (<%– comment –%>, <!–
comment –>, /* comment */ or // comment as appropriate, minimum of 3 per file type).
3. The Visual Studio 2017 Error List reports zero errors and zero warnings.
Extra: Although marks are not allocated, it is also good practice for code to consistently use bestpractice casing (lowercase, camelCase, TitleCase as needed).
Submission
When you have completed, submit your answers via the link on the Learning Portal. You must submit
the following archive:
a) Zip your Visual Studio 2017 solution folder to a file called
xxx_cse2icx_assignment3.zip,
where xxx is your student number. Take care to zip your solution folder rather than the
contents of the folder to avoid a
tarbomb effect. The following files will be expected in your
folder:
o ASP.NET 6: One file for each of Tasks 1-5 plus print.aspx (Task 3).
o C# 2: Data model classes used with serialisation code (Tasks 1-2).
o XML1: data file (Tasks 1-2).
o Subfolder: “images” subfolder with graphic assets (Task 6c).
o Text file: references.txt for image references (Task 6c).
o Solution file: xxx_cse2icx_assignment3.sln.
o Web.config: Visual Studio may generate this file, which you can leave alone.
Note: The Learning Portal will impose a 20mb limit for uploading your files. You will need to make changes to
your submission if you exceed this limit. A common reason for exceeding this limit is including unscaled
photographs. Another common reason is including unnecessary assembly files in your Visual Studio solution.
Refer to Task 7 on creating your Visual Studio 2017 solution to avoid unnecessary assemblies. The only
assembly we anticipate is Newtonsoft.JSON and only if a JSON data file is in use.
Assessment marking criteria
The marks for this assignment will be awarded as per the following marking rubric:

Task Marks Description Total
1 0 The home page design could be improved. 7
1 The home page design was attractive.
0 The data file was not provided.
1 The data file was provided.
0 The data file did not have valid changes.
1 The data file was validly modified and/or extended.
0 The code-behind was poor.
1 The code-behind could be improved.

10 © Didasko 2019. All rights reserved. 10

2 The code-behind was done well: file reading, deserialisation and data
binding.
0 The data grid data was not rendered.
1 The data grid data was rendered.
0 The label summary was incomplete.
1 The label summary code and output were correct.
2 0 The form controls were incomplete. 7
1 The form controls need improvement.
2 The form controls were complete.
0 The form control validation was incomplete.
1 The form control validation needs improvement.
2 The form control validation was complete.
0 The form did not submit correctly.
1 The form submits correctly.
0 The data was serialised and saved incorrectly.
1 The data was serialised and saved with errors.
2 The data was serialised and saved correctly.
3 0 The form controls were incomplete. 7
1 The form controls need improvement.
2 The form controls were complete.
0 The form control validation was incomplete.
1 The form control validation needs improvement.
2 The form control validation was complete.
0 The form did not submit correctly.
1 The form submits correctly.
0 The printable invoice data had errors.
1 The printable invoice data was correct.
0 The printable invoice presentation needs improvement.
1 The printable invoice was well presented.
4 0 The form controls were incomplete. 8
1 The form controls need improvement.
2 The form controls were complete.
0 The form control validation was incomplete.
1 The form control validation needs improvement.
2 The form control validation was complete.
0 The increment/decrement buttons did not behave correctly.
1 The increment/decrement buttons behaved correctly.
0 The calculate button did not behave correctly.
1 The calculate button behaved correctly.
0 The stocktake calculations were incorrect.
1 The stocktake calculations were correct in part.
2 The stocktake calculations were correct.
5 0 The chart data was poor. 5
1 The chart data could be improved.
2 The chart data was good.
0 The chart components were poor.
1 The chart components could be improved.
2 The chart components were good.
0 The chart presentation was unsatisfactory.
1 The chart presentation was satisfactory.
6 0 Image references were incomplete. 1
1 A list of image references correctly acknowledged the name, author,
location and access date of the third-party images.

© Didasko 2019. All rights reserved. 11

7 0 The header areas were incomplete. 8
1 The header areas could be improved.
2 A header area was included on all pages with the site name and branding.
0 The navigation areas were incomplete.
1 The navigation areas could be improved.
2 A navigation area was included on all pages with a navigation bar.
0 The main areas were incomplete.
1 The main areas could be improved.
2 A main area was included on all pages with the main content.
0 The footer areas were incomplete.
1 The footer areas could be improved.
2 A footer area was included on all pages with the copyright statement.
8 0 The navigation bar consistency was poor. 9
1 The navigation bar consistency could be improved.
2 The navigation bar links to the 5 main pages were on all pages.
0 Each navigation item was not the same size.
1 Each navigation item was the same size.
0 The navigation item for the current page was not always disabled.
1 The navigation item for the current page was always disabled.
0 The links for the non-current pages did not have a different
colour/appearance when hovering.
1 The links for the non-current pages had a different colour/appearance
when hovering.
0 The navigation bar responsive component was incomplete.
1 The navigation bar responsive component needs improvement.
2 The navigation bar was responsive, meaning that the menu options
gracefully wrapped to the next line when they cannot all fit horizontally on
the screen.
0 The navigation bar links did not go to the correct locations.
1 The navigation bar links sometimes went to the correct locations.
2 The navigation bar links always went to the correct locations.
9 0 All CSS code was not stored in a site-wide style file. 8
1 All CSS code was stored in a site-wide style file.
0 The style file was not correctly referenced on each web page.
1 The style file was correctly referenced on each web page.
0 The styling for layout was poor.
1 The styling for layout could be improved.
2 The styling included a variety of good styling for layout.
0 The styling for content was poor.
1 The styling for content could be improved.
2 The styling included a variety of good styling for content.
0 The presentation was poor.
1 The presentation could be improved.
2 The presentation gave the site a contemporary appearance, including
HTML version 5 and CSS version 3 where practical.
10 0 Indentation was poor. 10
1 Indentation could be improved.
2 Indentation only needs minor improvement.
3 Code indentation was consistent with one level of indentation per block.
0 ASP file commenting was poor.
1 ASP file commenting was good (minimum of 3).
0 C# file commenting was poor.
1 C# file commenting was good (minimum of 3).

12 © Didasko 2019. All rights reserved. 12

0 CSS file commenting was poor.
1 CSS file commenting was good (minimum of 3).
0 The Error List reported 5+ errors.
1 The Error List reported 1-4 errors.
2 The Error List reported 0 errors.
0 The Error List reported 5+ warnings.
1 The Error List reported 1-4 warnings.
2 The Error List reported 0 warnings.
0 Feedback will also be given regarding submission timeliness, length and
format. Penalties may apply.
0
Total available marks 70