Chapter 1. Requirements

Table of Contents

Entities
Use cases
Login
Home
Gadgets
Create gadget
Edit gadget
Users
User gadgets
Create user
Edit user
Logout
Concurrent access

Entities

Admin

The special system user with static attributes:

  • Username - string = "admin"

  • Password - string = "password"

User

A system user with attributes:

  • Username - not empty unique string with maximum length 20

  • Password - not empty string with maximum length 20

Gadget

A gadget for something ;-) with attributes:

  • Name - not empty unique string with maximum length 30

Tiers entities relationship:

Use cases

Login

Visitor enters username/password, submits form. If entered username/password are valid the system switchs visitor to logged-in user state.

Home

Precondition: user is logged in.

The system shows stats info: users online, users total, gadgets total.

Gadgets

Precondition: user is logged in.

  • User enters first letters of gadget name, clicks "Search". The system shows list of found gadgets.

  • User clicks "Show all". The system shows list of all gadgets.

  • If search results list has more than 10 records user can browse search results by pages.

  • User selects gadget checkboxes on the page, select a user in the drop-down, clicks "Reassign". The system reassigns selected gadgets to the selected user.

  • User clicks "delete gadget". The system deletes the corresponding gadget.

Create gadget

Precondition: user is logged in.

User enters gadget name, submits form. The system creates new gadget.

Edit gadget

Precondition: user is logged in.

User modifies gadget name, submits form. The system updates gadget.

Users

Precondition: user is logged in.

Admin can not be deleted.

  • User enters first letters of username, clicks "Search". The system shows list of found users.

  • User clicks "Show all". The system shows list of all users.

  • If search results list has more than 10 records user can browse search results by pages.

  • User clicks "delete user". The system deletes the corresponding user.

User gadgets

Precondition: user is logged in.

The system shows all gadgets owned by the selected user.

Create user

Precondition: user is logged in.

User enters username/password, submits form. The system creates new user.

Edit user

Precondition: user is logged in.

Admin can not be edited.

  • User enters only username, submits form. The system updates username of the selected user.

  • User enters username/password, submits form. The system updates username/password of the selected user.

Logout

Precondition: user is logged in.

User clicks "Logout". The system switchs user to visitor state.

Concurrent access

Number of concurrently user sessions is depended only of server hardware.

User should be logged out if it is deleted.

User/Visitor should not receive outdated system data/response if it is changed by another user.