AppTrac Programmer Guide

From Humanitarian FOSS Summer Institute 2009

Jump to: navigation, search

Back to AppTrac page

AppTrac Programmer Guide


The following is a guide to the code of AppTrac, to provide anyone interested in viewing or changing the sourcecode per their rights in the LGPL. This guide will explain how the code works, what certain files refer to, and what entails the database information.

Basics

App-Trac is written using Java's Spring framework, specifically the Model View Controller framework. There are two AppTrac packages. One is the server side package, containing all information necessary to run only the web application of AppTrac. This does not include the kiosk functionality. The other package is the client side, which is the package that runs on the client machines, and uses the server side classes and views. It contains the kiosk and application-loading functionality of AppTrac. The server side package is simply named 'Apptrac', and the client side is 'clientapptrac'.

This is a diagram of the overall architecture of App-Trac:

Image:apptracArchitecture.png


See UML diagrams.

Database Tables

  • at_core_activity_type
This table contains static information about what activity the user is currently involved in. This includes a field for an auto-incrementing id number and the activity type, which currently consists of Login, Logout, weblinks, Load Application, and Close Application. This is part of the tracking system.
  • at_core_application
This holds information about the applications AppTrac will load and track. It includes an auto-incrementing id number, the application name, and the path to the application's executable file on the local client machine. This is very important: the path needs to be the same for all client machines that use the same database. Be careful adding these, and remember little things like spaces!
  • at_core_class
This table contains all pertinent information about classes except for the days of the week on which they occur. The class name, teacher id, and when the class starts and ends. The information about the days is contained in the next table, due to the way in which information about the days is retrieved. Because there can be more than one day of the week a class can occur, it was easier to make a different table to handle this.
  • at_core_class_day
As mentioned above, information about the class days is contained in here. The class id is stored - possibly multiple times - depending on the number of days the class occurs. Also contained is the day id, which refers to a static table with string representations of days in it.
  • at_core_class_full
This is not a real table in the database: it is a view, which takes from different tables to provide an easy glance at class information. It has the following information: the teacher name and id, the class name, and start and end times of the class.
  • at_core_class_rosters
Like at_core_class_full, this is a view, not a real table. It also provides information about classes at a quick glance. This contains rosters of students in the classes. The student's full name, class id and student id are all provided.
  • at_core_class_student
Information about students in classes is kept here. It contains the class id and student id (which is just a user id pulled from users with an access level of student).
  • at_core_clocked
This table relates to the volunteer clock-in functionality of AppTrac. Volunteers who are currently clocked in are stored in here, using their user id numbers. This provides an easy way to display which volunteers are currently 'on duty'.
  • at_core_day
This is a static table that contains string representations of days of the week, used for reference to class information. It has eight rows of data, one for each day of the week (using a day id and the day as a string), and one for 'not applicable'.
  • at_core_images
This table provides an id for, and url path to, the different images used as avatars in the program.
  • at_core_time
This table provides necessary information for generating time reports. It contains the following data: user id, a time stamp, the activity type and activity id.
  • at_core_user
All user information is contained in this table. For AppTrac's purposes, this only includes the user's full name, access level, type (which is more relevant to student users, as it contains what type of student they are: Basic Literacy (BL), English for Speakers of Other Languages (ESOL) and Computer Lab (CL)), the password (if applicable: students do not generally have passwords), and the user's image, or avatar.
  • at_core_usertype
This static table gives the user type, as mentioned above: the user is either a non-student, BL, ESOL, or CL student.
  • at_core_weblinks
This table contains all necessary information about the weblinks in use by AppTrac and LVGH. It contains the same information for each link as the LVGH website does: type, level, theme, name, and url.

Views: JSP

All views are contained in JSP files stored under the 'jsp' folder in the 'Apptrac' package.

They are mostly self-explanatory. Any file that has an 'add' before it contains a form to add the following type of information. 'edit' does very similar functionality to adding, but it updates the DB instead of simply adding to it. Note that not every field must be filled in for the form to run properly. 'remove' is even simpler, and provides a form for removing something.

Here are explanations of the files with filenames that are less clear:

  • addclass.jsp: Creates a new classes with the designated teachers, class time and require days.
  • addstudent.jsp: This from assigns a student to a classes by the day class name and the day they meet.
  • addweblink.jsp: Used to create new links for approved website that will be used for different learning objectives. Web Linkings are created under several themes and levels.
  • adduser.jsp: Creates a new user to Apptrac, requiring necessary information to create a personal account.
  • admin.jsp: The administrator screen. It includes 2 other menu jsp files, which provide links to all of the administrator abilities, such as managing users, classes, weblinks, and reports.
  • applicationSelector.jsp: Essentially all that the student sees. It has a list of all applications and a button for loading them. Also web links are available for use that will open in a separate web browser.
  • classcontrol.jsp: Class control manages the menu which access level can add, delete and edit a class.
  • classmenu.jsp: Class menu, displays that appropriate links for class menu given the set restrictions by class control.
  • custom.jsp: To be implemented in the future. Would contain links for a custom-made user with custom access.
  • editclass.jsp: Important feature implemented to correct or update information pertaining a class, teacher, time and days.
  • edituser.jsp: Important feature implemented to correct or update information pertaining a name, avatar, password, access and student level.
  • editweblink: Important feature implemented to correct or update information pertaining a url, name, type and level.
  • hints.jsp: contains an option to turn on hints for the admin, and what those hints are for each field.
  • loadApp.jsp: a simple page displaying words 'LoadingApplication' while the user waits for the application selected to load.
  • links.jsp: This page was create by LVGH, which direct users information pertaining to the Literacy Volunteers of Greater Hartford.
  • listoflinks.jsp: Create by LVGH, select all list or urls that are used by learning using a web browser.
  • loadingApps.jsp: Loading Apps in the page used for loading appropriate programs in Apptrac.
  • login.jsp: This is the log in for AppTrac were information is needed depending on access level.
  • menu.jsp: Holds the menu options for certificated access level users.
  • removerclass.jsp: This form is used for a easy front end way to remove a any class.
  • removeuser.jsp: This form is used for a easy front end approach to remove inactive users.
  • removestudent.jsp: This form is used for a easy front end way to remove specific students from any class.
  • removeweblinks.jsp: This is a front end form to remove invalid web links.
  • reportcontrol.jsp: Generates a report control panel in which you may be able to select important reports given the specific level of access.
  • reports.jsp: A selectable user interface in which different reports can be generated.
  • reportmenu.jsp: Report panel menu that is access level sensitive which is used to report sensitive information.
  • sidemenu.jsp contains only an option to logout at the bottom of each side menu on control pages.
  • staff.jsp: This page will be accessible to staff only, that meet the access level requirement to view certain in formation.
  • students.jsp: This page is for students logged in to AppTrac
  • studentweblinks.jsp: Student web links created by LVGH, give a students accessible web links that can be used for learning
  • usercontrol.jsp: User control manages which access level can add, delete and edit a user.
  • usermenu.jsp: User menu, displays that appropriate links for user menu given the set restrictions by user control.
  • viewclass.jsp: View class, displays a full list of all classes with teachers, date, time, and students enrolled.
  • viewreport.jsp: View reports is the form used to display all generated reports and can also be exported to Microsoft excel.
  • viewuser.jsp: View user displays all user currently registered in Apptrac, access level is checked for the permission.
  • volunteer.jsp: Volunteer page is the page that shows up for a volunteers once the have logged into Apptrac.
  • webcontrol.jsp: Web control manages the menu which access level can add, delete and edit a web link.
  • weblinkmenu.jsp: Web link menu, displays that appropriate links for web link menu given the set restrictions by web control.
  • weblinks_listoflinks.html: contains formatting and links to web links
  • weblinks.jsp: Web links is a directory of links that can be browsed and opened in a internet browser.
  • wrong.jsp: This page is displayed to users when they is a error trying to log into appTrac, whether it is a invalid user id or password


(more to come...)


Back to AppTrac page

Personal tools