Assignment 4. Registration

Goals

The goal with the fourth assignment is to continue to work with the code-base from assignment 2, and increase the number of requirements. More requirements means more complexity both techologically and code-wise. As in A2 we are focusing on security, error handling, and user feedback.

Rules

If you failed A2 you may use my code from A2 https://github.com/dntoll/1DV608/tree/master/Assignments/Assignment_2/solution to start from. It fulfills all the base requirements and extra requirements.

Examiner sets the degree using the following:

  • Minimum requirements must all be fulfilled
  • Requirement fulfillment
  • Code quality
  • MVC implementation

The set of minimum requirements for approved is:

  • Solution has been submitted before the deadline
  • Code should be available on a public git repository.
  • The application must be deployed on a public web server, the server must be available to the examiner for the rest of the course.
  • The Assignment is done individually! You are not allowed to copy or take solutions from others.
  • No code is copied from others, student has worked alone
  • No external code except the code given in task, no libraries are used
  • No javascript is used
  • HTML follows web standards
  • Application can be tested with the automated test application.
  • Code has one single page (index.php)
  • Your solution will/may be shared with other students after the deadline.

Requirement fulfillment

  • All mandatory test-cases MUST be successful
  • The more testcases that are fullfilled, the better
  • Test-cases should be fullfill the manual tests
  • The application is well tested even outside of the explicit tests
  • Application works as the example implementation

Code Quality

  • Code MUST be object oriented.
  • Code looks good
  • Errors are handled well (assert and exceptions)
  • Code Repository is presented well on git (eg. README.md )
  • Dependencies are explicit or encapsulated
    • No string dependencies, uses strategies to avoid them
  • Avoid complexity

MVC implementation

  • Code is separated into Model View Controller components
    • No dependencies from Model to Controller or View
    • No dependencies from View to Controller
    • Only use $_GET, $_POST, $_COOKIES etc in View-classes
    • No output generation in Model or Controller
    • No View responsibilities in Model or Controller
    • No Model responsibilities in View or Controller
    • No Controller responsibilities in View or Model

Task 1. Explore requirements, example application, and test-cases.

The requirements of the application is written below and consists of four use-cases.

Use Cases from A2 New Use Cases

For each of the use-cases there are a number of test-cases. The test cases are given in the following format.

  • Input, steps to do. In some cases another test-case, if so do the input steps of that test-case.
  • Output, things you should observe or not observe if the test-case is successful.
  • Image, an image of the result after Input steps are done.

Testing of the application requires two different browsers, and a tool to manipulate cookies, like "firebug".

Mandatory Test Cases, These are the requirements everyones solutions must fullfill all of. Mandatory Test Cases from A2, Your solution must still fulfill the TC from A2!.

Extra Test Cases for higher grades The extra TCs for higher grades still applies from A2.

Test Application. This is an example solution for assignment 4. It fulfills all the test-cases above.

Automated tests Application. This is an automated acceptance test system to speed up the testing process.

Task 2. Copy the code and get your servers set up.

Now its time to implement the requirements using use-cases and test-cases.

Make a release to a public web server

In order to hand in this project you must have a public web-server that is online 24-7. There are many possible solutions

  • you could host yourself if you have a public IP-adress and wants to keep a server up and running
  • you could buy hosting from a web-hotel
  • you could use a free hosting such as http://www.000webhost.com/ (PHP 5.2)

Test your release

  • Transfer your files to the server, for example by FTP, SFTP, or git.
  • Browse to the server and make sure you see the output of the PHP-scripts
  • Go to http://csquiz.lnu.se:83/ and enter your server adress with your user-id
    • press Check
    • you should get a "Estimated score on assignment: 5%." and a LOT of errors

Task 3. Implement the requirements.

  • while (you have requirements to implement)
    • Implement a requirement
    • Test locally using the manual test-cases
    • Commit and push to repository
  • Release code to server
    • Go to http://csquiz.lnu.se:83/ and enter your server adress with your user-id
    • Fix problems locally, then release to server and retest

Assignment submission

Welcome to CoursePress

en utav Linnéuniversitets lärplattformar. Som inloggad student kan du kommunicera, hålla koll på dina kurser och mycket mer. Du som är gäst kan nå de flesta kurser och dess innehåll utan att logga in.

Läs mer lärplattformar vid Linnéuniversitetet

Student account

To log in you need a student account at Linnaeus University.

Read more about collecting your account

Log in LNU