Wednesday, February 28, 2007

GWT client-side and server-side codes

Idid a search about using database in GWT. I figured that there are two types of codes: client-side and server-side.

client-side Java codes will be converted to Javascript that will be use by the web browser.

server-side Java codes will not be converted to Javascript. They will be compiled into servlets and process the data sent by clients.

In order for a browser to request data or services from the server, we must make some service interfaces according to the GWT standards. A good example of this is the article on using GWT, Apache derby, and tomcat to build an online ordering-pizza web application.

The problem is when I created the GWT project, there is not any directory called "server" (which should be in the src folder as stated by GWT tutorial) where I can store the server-side code. I will create this directory manually tomorrow, hopefully it will work.

Tuesday, February 27, 2007

Talk to Gary about the Database

I asked Gary what values would be expected by the tables in the database and how can I check the table contents. He told me that I can't run the "select * from [tableName]" which I have tried. For security issues, I can't query the Banner using this command. He showed me how to execute the stored procedure he gave me. He told me start with simple things first. He told me to just build a simple webapp that queries the database using the stored procudure given. After that I can elaborate more and it is possible that I will have to write some stored procudures to get what I need.

After I went home, I did some research on how connect to SQL server 2005 database from GWT. I didn't find sample code for it. Finally I think that maybe GWT only use the traditional way of Java database connection, which may similar to what I did for Traffobase last semester. I will try to do this tomorrow. Hope it will work.

Monday, February 26, 2007

Restructure the Project

In the root directory there are lots of jar files. Professor Johnson
suggested that these jar files can be moved to the lib directory. I
thought about this before and tried to do this but failed. When the GWT is
create by running the command projectCreator.cmd and
applicationCreator.cmd, the path to these jar files is set. Thus, after
the project is created, moving these jar files to somewhere else will give
a classpath error.

I hope there are other ways to fix the classpath problem. Must do a
research on this issue.

Database Queries

Gary gave me a sample stored procedure. But it is very hard to use this stored procudure without knowing the contents and data format of each table. I tried to execute the commands "Select * from [tableName] but got syntax error. I will ask Gary tomorrow how to check the contents of each table. Hopefully he won't be busy tomorrow.

Friday, February 23, 2007

Database Problems

The database that Gary created for me doesn't have any Store Procudures related to Class Availability. From his computer, we can see a SP for "Search by subject". But from my computer, we couldn't see it. Gary was so busy today, he had a project due today. Thus he could help me fix the problem.

For Ajax in GWT, I kept getting an error saying "resource not found in edu.hawaii.ClassAvailibility". I tried to revert to the previous version (that worked yesterday) from SVN but still couldn't solve it. Then I deleted the project folder from my computer and checked it out again. Then it worked. Thus, I guess SVN has a bug.

Thursday, February 22, 2007

Fixed GWT classpath

Each GWT is specific to a computer. In order to run a project on multiple computers in which all the directory path are different, we have to run the "projectCreator.cmd" and "applicationCreator.cmd" with the "overwrite" argument on the computer that the GWT will be installed.

I made an Ant task call setupgwt.xml to fix this problem.

Meeting With Gary

I met Gary today to fix a security problem. I couldn't connect to the database. We checked the file, set the port on my laptop to 10009.

However, when I went home, I figured out that there are no store procudures related to the database that I need. I will to ask Gary again tomorrow about the store procudure that I need and if possible let me see the tables in the database.

Tuesday, February 20, 2007

Monday Work

1. I installed SQL 2005 Management Studio but couldn't connect to the database. I will bring my Laptop to school tomorrow to ask Gary about this project.

2. I reconfigured the Google Project respository. I deleted almost everything since the last commit and added GWT framework to the project. This took 3.5 hours because of problems with the .svn folders.

Sunday, February 18, 2007

Meeting With Gary on Friday 02/16

I talked to Gary on Friday. To connect to the database, all we need is the username, password and the SQL management console.

Also I asked him if GWT is a good tool for the project. He said it sounds good. He has never used it before. He showed me some of his Ajax application that he created using plain Javascript.

And I also showed him our Google Project. He was happy with it. He didn't know about the Google Project before.

Saturday Work: Dependent Drop-down List

I looked at GWT Kitchensink example. I think it is not hard to make dependent drop-down lists. It just needs some event listeners. At this point I can do the dependent drop down list with hard coded information.

Need to do some research about how GWT gets data from the database.

Friday, February 16, 2007

Thursday Work

I did a search on GWT today. GWT makes it easier for us to build an Ajax webapp. However, the way it organizes the file is kind of messy. The good things about GWT are:

1. Write Java code, then GWT will compile this the JavaScript for us.
2. Be able to debug and run Junit tests within Eclipse.

Thus, I decided to use GWT for our project.

Thursday, February 15, 2007

Wednesday Work

I read about Ajax today. Now I don't know if Ajax is a good technology for this project.

What Ajax can do for this project:
- The application responds to user input without loading a whole page again.
- We can load the information a head of time, then responds to user input using the data loaded locally. For example, when a user selects the ICS subjects, all ICS courses (include all information) are loaded in the background, but only the Course title are displayed. Then when the user select the dates and times, the application will query the data previous loaded. There are some issues with this:
1. In a sense, it can improve the speed because it loads data while the user still working on other search criteria.
2. In another sence, it may load unused data. If we wait until the user selects all criteria then query the database, then we only load the data needed.

At this point, I think ajax may not be a good choice. I may need to talk with Brandon and Gary about this.

Also today I think the applicaction should let students search for books of courses.

Tuesday, February 13, 2007

Monday Work

Things done today:
- Met Brandon: The meeting was 2 hours, from 7:30PM to 9:30PM
* We created 4 new task, from 14 to 17.
* We came up with the design of the system. We will do the project one feature at a time. For example, one week we do the "search by times" feature and the week after that we do the "search by days" feature, etc...
* We figured out Internet Explorer does not work well with the Google Projects. In IE, the labels, mailing lists, member names are not clickable.

Things will do tomorrow:
- Do one use case.
- Read about Ajax web application.

Monday, February 12, 2007

Sunday Work

Things done today:
- Improve Google Project:
* Created 2 mailing lists: ClassAvailability Discussion Group and ClassAvailability SVN Group. Also added codesite-noreply@google.com as a member of these groups.
* Created my own blog: Kiet Huynh's Engineering Log.
* Committed some Ant Tasks.
- Created Eclipse Project and some Ant Tasks. Currently, there are no java source code.
- Created HackyStat Project called ClassAvailabilty. Metrics were successfully sent to the HackyStat Server.

Things couldn't solve today:
- Some links in the Google Project didn't work. For example, the blogs, the 2 mailing lists, the labels, and the member's names were not clickable. I checked my old projects from last semester and they didn't work either.

Things will be done tomorrow:
- Get Brandon's UH email and HackyStat password to add him as a member of the HackyStat project and to be able to send his commit metrics to HackyStat server.
- Check how HackyStat sensor works in Eclipse.
- Meet with Brandon at 7:00PM tomorrow.