March 2, 2010

Code for GWT version of AC

Below is an open source version of the new Assignment Calculator written using the Google Web Toolkit (GWT). IF you would like to play with the code and/or help us out feel free to download it:

AssignmentCalculator-1.1.zip

The original student programmer has included these instructions. Warning! This is not for the faint of heart.

1.) Download Eclipse Classic. This will be the IDE in which to make changes, and compile the project.
http://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops/R-3.5.1-200909170800/eclipse-SDK-3.5.1-linux-gtk-x86_64.tar.gz

2.) Download the Google Web Toolkit SDK to a certain directory.
http://google-web-toolkit.googlecode.com/files/gwt-2.0.0.zip

3.) Start Eclipse, and install GWT plugin for Eclipse
http://code.google.com/eclipse/docs/download.html
Instructions are here:
http://code.google.com/eclipse/docs/install-eclipse-3.5.html

4.) In Eclipse, do an 'Import-->Existing project into workspace...-->' and then select the directory where you downloaded and unzipped the AssignmentCalculator-1.1.zip.

5.) Once the project is open, there are two files that need to be changed depending on how you want to run the application:
a.) src/edu/umn/lib/client/AssignmentCalculator.java lines 25 and 42: use the appropriate authentication class. The TestAuthentication basically signs into the system using fixed credentials that are located in the TestAuthentication.java file. If you want to use X500, then use the X500Authentication class. I refactoried it such that anyone else can just extend the Authentication class in order to implement their login/authentication system.
b.) src/edu/umn/lib/server/MysqlConnector.java line 20: change to point to the correct mysql database, with correct credentials.

6.) Compile the project:
click the GWT compile button GWT Compile Project button in the toolbar.

7.) Run the project from eclipse:
Right-click on the project name, then select 'Run As -> Web application'. A url will show up that you can use to test the app.

Posted by snackeru at 12:55 PM