Newer
Older
labs / tiddlers / content / labs / lab06 / _Labs_06_Project Tasks.tid
created: 20200702091026430
modified: 20200707005526287
section: 7
tags: lab06 lab
title: /Labs/06/Project Tasks
type: text/vnd.tiddlywiki

Milestone 2 is due at the end of next week (Friday 27<sup>th</sup> August at 5:00pm).

This week's lab does contribute towards milestone 2, however next week's lab (lab 7) is part of milestone 3, so does not count towards milestone 2.

Also note that Mark is going senile and forgot to include the testing from milestone 1 in his marking schedule (for the second year in a row).  We will now mark the milestone 1 tests as part of milestone 2.  If you did not complete the testing for milestone 1 then you now have an opportunity to complete it and still get marks for it.

!! Input Validation

Add input validation to the rest of your product fields as shown in this lab.  All of the important string fields should not allow null, or blank values.  All numbers should not allow null values, or negative numbers.

What we are aiming for is that a user should not be able to cause an exception stack trace to appear in the output console by either entering incorrect values or just not entering values at all into the fields on your user interface.

Thoroughly test your system to see if there is any way that the user can cause an exception stack trace to appear in the output console that doesn't also cause a pop-up message to appear, or otherwise break the system.  If you have done a good job of the validation an pop-up error handling there should be no way to crash your system without at least an error message box being displayed to the user.  In a production system the user will not see an output console so will never see any printed stack traces or error messages --- message boxes are your primary mechanism for warning users when an error has occurred.

Note that you will sometimes see both a pop-up message box and an exception stack trace in the output pane.  This is because the `DaoExceptionMapper` class is explicitly logging the exceptions for the cases that we consider may be caused by bugs.  This should only happen in fairly extreme situations though (such as the database being closed while the application is running) --- there shouldn't be exception stack traces being displayed under normal usage (such as a user entering bad input).

!! Sequence Diagrams

As per section [[4.4.2|https://isgb.otago.ac.nz/info202/shared/project/raw/master/output/info202_project.html#%2FMilestones%201%20%26%202%2FMilestone%202]] of the project specification, you need to create UML sequence diagrams for the delete, search by ID, and filter by category use cases.

Since you now have a database-backed DAO, your diagrams should include the database and the SQL statements that are executed in response to DAO methods.

Each use case should be in a different diagram and stored in a separate PUML file inside your project's diagrams folder.

To give you an idea of what we are expecting, the following is an example of what the 'add new product' diagram looks like now that we have a database, and DAO injection (click for the source):

<a target="_blank" href="https://isgb.otago.ac.nz/plantuml/uml/RLJDJXin4BxxAKRqa4Gf2EYFAeGe55gr5MbH8svSlEj9iDYrjxONI2kadligF49lF4gVfEFnEjj03icEnzyty_aRxnxw85rewqg80VYmg1323Seh3y52BQzeUOcWj9mxMOE4IeT0cDew18TIoQ92uQ-qQMG4_1G0Kwuo3KwNuNnoIfbljZNgs3g33bxH-enQwb8tqeGpgPGsSzZPvdnQx5AiS2RRAdom9apr3uITbx4qVc_Hb3WDwD26HOFS4I32kf1GZD_DAvRJL58Rpjo9z3kHGHRIvmg3TD3K5Ghh58bL5ZqO6yY9K5uombXNomfAMrddOLYqyxUZv-0jpFGj0RJdQk-OVnn1yEpepVRsYzVSzau8MGPAddigBpsqz1HDxmTix4r8wKRSgwFaftiJD6tQfm3sz__--ZqZxv6U1mUFy6VEghOCxvMcfaoYKLPsdcWfNiDJqbwOJFwi2droz3MnfILgjq54og-XbpBWtBh5n2gigD1Krqs5fze7pYJnCLgbDQbitvc1NRPJRACfgQNA0zpuk7jXyZYJp4A8agvdmAXOH0vi7h3wFNYuBwtnmL7HXpzY2OnkBf5ixGfqIEHHnCU9PSXuJA2oqYMzBuCZfU0Bta0dVj1BO9i5rumgUCdKXtiwoh85nSiktPYMekSOZfEh6lrmH8Utut7yPqZ1rJnMI4OfybaR2l8OOEPidNqK3aFh3D2BH3iEFLttd2kN7NfNU4p_oU74EkchgXd6gjg61eMV0jP-s3SO2KPiRcPIZBArNPazG4ClUdy550QfAm_QqCU9FZajdT7MZJM4yu_fAxEPocli1vAjwENc3clEbTpZsgdba_4aywb3D_bXLstqQ3xQK96GrEU6mwsjhH5SowgbBmqlX2h82sAoDqWwx29V8N68Hj77-Xy0">{{/Labs/06/images/Save Product Sequence Diagram}}</a>