Download presentation
Presentation is loading. Please wait.
Published byAllyson Ward Modified over 9 years ago
1
UOFS Information System Three-Tier Architecture (HTML-Servlets-JDBC-PostgreSQL) Version 0.6 Yaodong Bi Copyright 2005, Yaodong Bi
2
UOFS Information System UOFS maintains information about courses, students, and faculty. Course info includes course ID, course title, and instructor. Faculty info consists of faculty ID, faculty name, office, and phone. Student info has student ID, student name, and address. A student may take several courses and get a grade for each course. A course is taught by one faculty and one faculty may teach several courses.
3
Actors and Classes Entity Classes Student Faculty Course PersonSTakingCStudentFRMRegistrarFRMProfessorFRM Student Registrar Faculty Boundary Classes RegistrarMngr StudentServ ProfessorMngr Control Classes Actors RegistrarServ ProfessorServ StudentMngr
4
Class Interaction Diagram RegistrarFRMStudentFRMProfessorFRM StudentRegistrarFaculty RegistrarServStudentServProfessorServ Student Faculty Course Person 0..151..5 STakingC take 1 * teach RegistrarMngrStudentMngrProfessorMngr
5
UOFSIS Database Tables 5 Student idnameaddress Faculty idnameofficeaddress Course idtitleinstructor stakingc sidcidgrade
6
Class Design for Registrar 6 > RegistrarFRM Submit(request=“Get Student List”) Submit(request=“Get Course List”) Submit(request=“Get Faculty List”) Submit(request=“Add a Student”) Submit(request=“Add a Course”) Submit(request=“Add a Professor”) Registrar RegistrarMngr getCourses() getStudents() getFaculty() addStudent() addCourse() addFaculty() RegistrarServ init() doPost () displayCourses() displayStudents() displayFaculty() addCourse() addStudent() addFaculty() destroy() > RegistrarChk checkStudent() checkCourse() checkFaculty()
7
Deployment Diagram 7 Database Server server8.cs.uofs.edu Student Faculty Course STakingC PostgreSQL 7.0 JDBCJDBC StudentServRegistrarServProfessorServ StudentMngr RegistrarMngr FacultyMngr JDBCJDBC Apache Server Web Server heineken.cs.uofs.edu StudentChk FacultyChkRegistrarChk Web Browser Client StudentFRM ProfessorFRMRegistrarFRM
8
RegistrarFRM – Design 8 > RegistrarFRM text studentid text studentname text studentaddress text courseid text coursetitle text professorid text professorname text professoroffice text professorphone Submit(request=“Get Student List”) Submit(request=“Get Course List”) Submit(request=“Get Faculty List”) Submit(request=“Add a Student”) Submit(request=“Add a Course”) Submit(request=“Add a Professor”) Registrar RegistrarServ … > RegistrarChk checkStudent() checkCourse() checkFaculty()
9
RegistrarServ - Design 9 RegistrarServ PrintWriter out; HttpServletResponse response; HttpServletRequest request; RegistrarMngr mngr; void display( rows, hdr, title) void displayACK( op, txt) void init(ServletConfig config) void doPost (HttpServletRequest req, HttpServletResponse resp) void displayCourses() void displayStudents() void displayFaculty() void addCourse() void addStudent() void addFaculty() void destroy() HttpServlet … RegistrarFRM... Registrar RegistrarMngr … IOException … ServletException … SQLException … HTMLUtil …
10
RegistrarMngr - Design 10 RegistrarMngr DBManager dbm void addStudent(sid, nm, add) void addCourse(cid, ttl) void addFaculty(fid, nm, off, fone) Vector getCourses() Vector getStudents() Vector getFaculty() Void shutdown() RegistrarServ … SQLException … DBManager … PgSQLManager …
11
PgSQLManager - Design 11 PgSQLManager Connection db Statement st; RegistrarMngr … JDBC … SQLException … DBManager void makeConnection(url, dbName, userName, password) getRecord( sql) void executeSql( sql) void dbshutdown(); void finalize(); StudentMngr … ProfessorMngr …
12
HTMLUtil - Design HTMLUtil String makeHTMLTitle( title) String makeHTMLHeading( title, level) String makeHTMLImage( imageFile, width, height, alt, longDesc) String makeHTMLURL( url, text) String makeHTMLList( items, type) String makeHTMLDefinition( terms, definitions) String makeHTMLTable( dbm, sqlSelect, hdr, title) String makeHTMLSelect( dbm, sqlSelect, htmlSelectName, selected) String makeHTMLCheckbox( dbm, sqlSelect, htmlCheckboxName, clmnhdrs) String makeHTMLRadio( dbm, sqlSelect, htmlRadioName, clmnhdrs) String makeHTMLInput( dbm, sqlSelect, listName, listType, hdr) String htmlEncode( str) StudentServRegistrarServ DBManager … ProfessorServ
13
Package Diagram 13 db RegistrarMngr … StudentMngr … ProfessorMngr … PgSQLManager … web RegistrarServ … StudentServ … ProfessorServ … RegistrarFRM … StudentFRM … ProfessorFRM … util HTMLUtil … DBManager …
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.