UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.

34
UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi

Transcript of UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.

Page 1: UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.

UOFS Information System

Version 0.9

Yaodong BiCopyright 2009, Yaodong Bi

Page 2: UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.

Software Requirements

Page 3: UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.

Requirements - Steps

1. System definition2. Identify actors3. Identify use cases for each actor4. Define business packages5. Assign use cases to packages

Page 4: UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.

System Definition

UOFS maintains information about courses, students, and faculty.

Registrar’s office decides what courses to be offered and who the instructor is.

A student can register for and drop courses and view the grades

Faculty file students’ grades for the courses he/she teaches.

All users are required to sign in before using the system.

All users can sign up and edit their account info.

Page 5: UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.

Actors and Use Cases

Register Course

Student RegistrarFaculty

Actors

Delete User

Add Course

Delete CourseDrop Course

View Grade

Add Grade

Log out

Edit Acct

Sign in

Sign up

Shared by All Actors

Page 6: UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.

Three Business Packages

User Account Management– Manage (CRUD) user accounts

Catalog Management– Manage the catalog (add/delete courses)

Grade Management– Manage course registration– Manage grades

Packages are determined based on the data each package is responsible for.

Page 7: UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.

Catalog Management

Grade Management

Business Packages & Use Cases

Register Course

Add Course

Delete Course

Drop Course

View Grade

Add Grade

User Acct Management

Sign in

Log out

Edit Acct

Delete User

Sign up

Page 8: UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.

Software Design

Page 9: UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.

Design - Steps

1. Each business package to a Java package2. Each package has an Entity Manager which

takes care of business logic.3. Each entity manager access its entities from

DB4. Each use case has a dispatcher which

takes care of presentation logic/flow5. Each use case has multiple input/output

forms which are the user interface.

Page 10: UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.

Package Name

Package Notations

Dispatchers

EntityManager

Entity Classes

Boundary Classes

Each package contains Control Classes

An entity manager: responsible for the business logic

A dispatcher for each use case: responsible for presentation logic of the use case. Dispatcher defines interfaces for boundary classes.

Boundary classes for UI Entity classes: entities that are

CRUDed by the package

Page 11: UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.

User Acct Management

User Acct Management Package

SignupDispatcher

LogoutDispatcher

EditAcctDispatcher

DeleteUserDispatcher

UserAcctManager

StudentFaculty User

SigninForm

SigninDispatcher

SignupForm DeleteUserFormEditAcctForm

Page 12: UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.

Catalog Management

Catalog Management Package

AddCourseDispatcher DeleteCourseDispatcher

CatalogManager

Course

AddCourseForm DeleteCourseForm

Page 13: UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.

Grade Management

Grade Management Package

DropCourseDispatcher AddGradeDispatcher

ViewGradeDispatcher

GradeManager

Grade

RegisterCourseForm

RegisterCourseDispatcher

DropCourseForm

ViewGradeForm

AddCourseForm

Page 14: UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.

Database Design

Page 15: UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.

Class Diagram: Entity Classes

Student Faculty

Course

User

0..15

1..5Grade

take

teach1..5

1..1

Registrar

Page 16: UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.

Database Tables

16

Account

idfname lname

Course

id title instructor

Grade

sid cid grade

unameaddress passwd type

Note:Uname & passwd of User are for login purpose

Page 17: UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.

Detailed Design

Page 18: UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.

Detailed Design - Steps

1. Define System Start home2. For each actor

1. Define a user home2. Map all of its use cases to command buttons

3. For each use case1. Identify all input forms and display2. Identify user commands on each form3. Dispatcher as click listener for command buttons4. Dispatcher controls the interaction to user

4. Design RPC

Page 19: UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.

System Start Home

Display a welcome message and allows the user to log in or sign up

May display other commands readily available to users before they log in

After a user is successfully logged in, its user home is display.

UofsIS System Start Home contains Sign in use case Sign up use case After a user sign in/sign up, his User Home is

displayed Mapped to UofsIS.java

Page 20: UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.

SystemStartHome

System Start Home & Dispatchers

Sign up

Sign In

Catalog Management

Grade Management

User Acct Management

SignupDispatcher.begin()

SigninDispatcher.begin()

Command Button

System Start Home

Sign up

Sign In

Use Cases mapped to Buttons

Page 21: UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.

User Homes

Each user has a User Home The User Home is displayed after the user logs in The User Home contains all use cases of the user Each use case is represented as a command, for

example, like a button. When the user selects a command, clicking the

button, the user home calls the dispatcher of the use case to start the use case.

The User Home may also contain context data, for example, a shopping cart.

The User Home may be accessed by all the dispatchers of the use cases of the user.

Page 22: UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.

Student Home Registrar Home

Faculty Home

User Homes & Use Cases

Register Course Add Course

Delete CourseDrop Course

View Grade

Add Grade

Log out

Edit Acct

Delete User

Edit Acct

Edit Acct

Log out

Log out

Command Button

Use case

Use Cases mapped to Buttons

Page 23: UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.

StudentHome

User Home Hierarchy

Register Course

Drop Course

View Grade

Log out

Edit Acct

FacultyHome

Add Grade

Log out

Edit Acct

RegistrarHome

Delete User

Add Course

Delete Course

Log out

Edit Acct

UserHome

setUserWelcome()onClick()

Page 24: UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.

StudentHome

Student Commands & Dispatchers

Register Course

Drop Course

View Grade

Log out

Edit Acct

CatalogManagement

GradeManagement

RegisterCourseDispathcer.begin()

DropCourseDispatcher.begin()

ViewGradeDispatcher.begin()

UserAcctManagement

LogoutDispatcher.begin()

EditAcctDispatcher.begin()

Command Button

When a command button

Is clicked, its use case is started

Page 25: UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.

FacultyHome

Faculty Commands & Dispatchers

Add Grade

Log out

Edit Acct

CatalogManagement

GradeManagement

AddGradeDispatcher.begin()

UserAcctManagement

LogoutDispatcher.begin()

EditAcctDispatcher.begin()

Command Button

When a command button

Is clicked, its use case is started

Page 26: UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.

RegistrarHome

Registrar Commands & Dispatchers

Delete User

Add Course

Delete Course

Log out

Edit Acct

CatalogManagement

GradeManagement

AddCourseDispatcher.begin()

DeleteCourseDispatcher.begin()

UserAcctManagement

LogoutDispatcher.begin()

EditAcctDispatcher.begin()

DeleteUserDispatcher.begin()

Command Button

When a command button

Is clicked, its use case is started

Page 27: UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.

User Homes Package

UserHomes

StudentHome

SystemStartupHome

RegistrarHome

FacultyHome

Add Grade

Log out

Edit Acct

CatalogManagement

GradeManagement

AddGradeDispatcher.begin()

UserAcctManagement

LogoutDispatcher.begin()

EditAcctDispatcher.begin()

Only Command buttons of Faculty Home are shown

Page 28: UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.

Dispatchers Design

Each dispatcher is associated with a sequence of input forms and displays of the use case

Each form and display may contain widgets. Those widgets (e.g., buttons) represents user commands in the

use case. For example, a Click event on a button may mean the user wants to submit data on the form.

A dispatcher is also the event handler for the possible events generated from the widgets in the use case.

Each button has a title which is used by the dispatcher to determine which button was clicked

When an event is received, the dispatcher determines what should be the response and display it back to the user.

Page 29: UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.

Dispatchers Design: EditAcct Use Case

When the use case starts, EditAcctForm.java is executed to display the current info (by its dispatcher’s begin())

User enters info and then click the Submit button, EditAcctDispatcher.onClick() is called

The onClick() determines Submit was the sender of the event (sender.getTitle() = “Submit”), it calls the UserAcctManager to update the user info in DB using RPC

If info successfully updated, onSucess() of the RPC displays notification in a NotificationWindow.java with a Close button.

EditAcctDispatcher is the ClickListerner of the Close button, so when it is clicked, the dispatcher determined its title is CloseOnSuccess, it terminates the use case by displaying the User Home.

If update failed, onFailure() displays an error message in a NotificationWindow with a Close button

The dispatcher is also the ClickListener this Close button, and its title is CloseOnFailure. It terminates the use case by display the User Home.

Page 30: UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.

Dispatchers Design: EditAcct Use Case

EditAcctDispatcher

UserAcctManagerNotificationWindow

EditAcctForm

student StudentHome

EditAcctbegin

display

submitonClick

display

update

display - onSuccess

closeonClick

RPC details are not displayed here.

getUser

Page 31: UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.

31

Web Server

Web ServerUserAcctManager

GradeManager

CatalogManager

UserAcctManagerProxy

GradeManagerProxy

CatalogManagerProxy

Web Browser

Client Web Browsers

Entity Manager – RPC Implementation

UserAcctManagerImpl

GradeManagerImpl

CatalogManagerImpl

Proxy packages contain all callback routines

Page 32: UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.

GradeManagement

CatalogManagement

UserAcctManagement

Web Server & DB Server

32

Database Server server8.cs.uofs.edu

User

Course

Grade

UserAcctManagerImpl

GradeManagerImpl

CatalogManagerImpl

UserAcctManagerDAL

GradeManagerDAL

CatalogManagerDAL

Web ServerHeineken or host

Pg

SQ

LM

an

ag

er

JD

BC

JDB

C

DAL’s map Java objects to DB tables

db

DB

Ma

na

ge

r

Page 33: UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.

Other Packages

Common

Exceptions

GUIWidgets

NotFoundException

OperationButton

NotificationWindow

More Custom Widgets

Exceptions shared by all packages

Custom widgets shared by all dispatchers

Packages and component shared by all packages

Page 34: UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.

The End!