UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.
-
Upload
homer-greene -
Category
Documents
-
view
217 -
download
1
Transcript of UOFS Information System Version 0.9 Yaodong Bi Copyright 2009, Yaodong Bi.
UOFS Information System
Version 0.9
Yaodong BiCopyright 2009, Yaodong Bi
Software Requirements
Requirements - Steps
1. System definition2. Identify actors3. Identify use cases for each actor4. Define business packages5. Assign use cases to packages
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.
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
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.
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
Software Design
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.
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
User Acct Management
User Acct Management Package
SignupDispatcher
LogoutDispatcher
EditAcctDispatcher
DeleteUserDispatcher
UserAcctManager
StudentFaculty User
SigninForm
SigninDispatcher
SignupForm DeleteUserFormEditAcctForm
Catalog Management
Catalog Management Package
AddCourseDispatcher DeleteCourseDispatcher
CatalogManager
Course
AddCourseForm DeleteCourseForm
Grade Management
Grade Management Package
DropCourseDispatcher AddGradeDispatcher
ViewGradeDispatcher
GradeManager
Grade
RegisterCourseForm
RegisterCourseDispatcher
DropCourseForm
ViewGradeForm
AddCourseForm
Database Design
Class Diagram: Entity Classes
Student Faculty
Course
User
0..15
1..5Grade
take
teach1..5
1..1
Registrar
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
Detailed Design
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
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
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
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.
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
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()
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
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
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
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
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.
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.
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
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
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
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
The End!