Download presentation
Presentation is loading. Please wait.
1
Scott Stocker November 18, 2002
Core System vs. Tools Scott Stocker November 18, 2002
2
Our Object Model <Object>.java <ObjectController>.java
fields map to database fields get and set methods for each field toDTLObject method <ObjectController>.java Methods to get, create, save, remove object in DB Other static methods to use/manipulate object <ObjectSQL>.java SQL query strings used in preparedStatements to interact with the database
3
Core Objects Person, Nexus, Tool, Content Nexus Person Tool Content
4
Nexus Object Nexus.java, NexusController.java, NexusSQL.java
Represents a course, a section, a department, etc. Important to grouping of people, tools, and content. Parent/Child relationship (parentID) Cross-listed courses (referenceID) Nexus attributes hashtable (nexus_attribute table) NexusType (course, section, department, etc). Term (Fall 2002, Winter 2003, etc).
5
Person Object Person.java, PersonController.java, PersonSQL.java
Represents a user in CourseWork Role guest, student, enrolled student, TA, grader, designer, instructor, course admin. Role list can be modified or extended. Person attributes hashtable (person_attribute table) Person password (person_password table) Psession used to keep track of user’s login session. PersonNexus used to keep track of person’s membership in Nexus. combination of personID, nexusID, roleID.
6
Tool Object Tool.java, ToolController.java, ToolSQL.java
A tool that shows up in the navigation bar Path to tool stored as relative URL ToolNexus Allows tools to be turned on/off for a Nexus. Determines which tools show up in the navbar.
7
Content Object A single piece of content that is used in a Nexus.
Content.java, ContentController.java, ContentSQL.java Referenced by URL and/or filepath. No ContentNexus object. Removed in v2.1 because it proved to be more problematic than useful.
8
“Common” package edu.stanford.coursework.common
Other common elements of system besides core objects. BaseServlet.java All CourseWork servlets extend BaseServlet Provides access to DB connection Checks if user is authenticated and logged in. SessionController.java Controls HttpSession HttpSession used to cache user info Presence of “person.personID” in session indicates that user is logged in. MimeType – mimeTypes used by Content object. NavTrail – “breadcrumb” trail displayed on every page. TextController – some text parsing functions (text2HTML, etc).
9
Tool Model Two servlets – student view and admin view
Eg, Announcements.java and AdminAnnouncements.java edu.stanford.coursework.<toolname> package. Uses same object model as core object DTL Templates Database tables
10
Tool Servlet common elements
Extends BaseServlet Sets DTL template for HTML rendering Init() method contains an authList vector which contains the roles that are allowed to use this servlet. This is the minimum simple authorization check that is always done. Checks that user is authenticated and authorized before proceeding Provides access to a DB connection (via BaseServlet). Provides error display mechanism. (not in v2.1) Plans to create a BaseTool.java abstract class which does much of this setup so that this code is not repeated in each Tool class.
11
Current Tools CourseHome Announcements Syllabus Schedule
CourseMaterials Assignments Discussion Grades Event Sign Up (added in v3.0)
12
CourseWork Documentation Site
Javadocs Database Schemas DTL Javadocs and instructions 3rd party packages used by CourseWork (oreilly, etc)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.