I spent the whole day working on the database. I wrote the store procedure that searched courses by attributes.
However, the store procedure can't return the attributes. It returns the right courses but can't display the attributes associated with the courses.
I have no dev time today because I didn't work in Eclipse.
Friday, May 4, 2007
Wednesday, May 2, 2007
GWT Junit in Ant and Attribute Search.
GWT Junit now worked in Ant script. I added to the project xml file.
Today, I figured out how to get the course names from the attributes. Probably I will write the stored procedures tomorrow.
Also I added some new drop-down list and some check boxes for the atrribute search feature. The UI looked ugly today. I would ask Brandon how he would change this tomorrow when we meet.
Today, I figured out how to get the course names from the attributes. Probably I will write the stored procedures tomorrow.
Also I added some new drop-down list and some check boxes for the atrribute search feature. The UI looked ugly today. I would ask Brandon how he would change this tomorrow when we meet.
Tuesday, May 1, 2007
GWT Junit Works in Eclipse now
Today, I just manually created the test class and put it in the client package. It worked. Last time I ran the junitCreator script that came with the GWT package. This script created the test class in the wrong folder. A lot of people on the Internet and even GWT website suggested to run this script instead of manually creating the test class.
The script didn't work for me.
The script didn't work for me.
Monday, April 30, 2007
Exception on the Search button
The exception of the Search button is handled using the same logic as each drop-down list I did a few days ago.
Also I tried to print out the number of entries found, but the number was printed twice. I traced the code but didn't know why it was like that. If I added something to the subjectNamePanel widget within the onSuccess method, then that thing would be printed twice.
Also I tried to print out the number of entries found, but the number was printed twice. I traced the code but didn't know why it was like that. If I added something to the subjectNamePanel widget within the onSuccess method, then that thing would be printed twice.
Friday, April 27, 2007
Handling Exceptions
There are times that the network connection between the client and the web server and between web server and database server were lost while users are using the application. In these situations, an error should be displayed to inform users that an error has occurred.
We need to display the error message because this is a Ajax application. If there is the network problem, the browser by default does not display any error messages. Thus, we have to have a logic that catches those exceptions and displays an error message.
I wrote some code to catch these exceptions today. I tested them and everything worked perfectly.
We need to display the error message because this is a Ajax application. If there is the network problem, the browser by default does not display any error messages. Thus, we have to have a logic that catches those exceptions and displays an error message.
I wrote some code to catch these exceptions today. I tested them and everything worked perfectly.
Thursday, April 26, 2007
Classpath in Junit Setup
I tried to figure out the problem why Junit test couldn't load the module. I searched on Google group and found that there was a person having the same problem. He got a lot of replies helping him to fix to problem. None of them worked for him. I tried to follow the solution but got no luck. This was a classpath problem. I added to the path of ClassAvailability.gwt.xml to the ....-hosted.cmd but it didn't work.
Wednesday, April 25, 2007
Database Exception Fixed
Today, I tried to do some unit tests but could not solve the problem "can't find the module". Then I stopped working on unit test and try to solve the database exception "The result set is closed".
Before I spent a lot of time on the database exception but couldn't solved it. I almost gave up. But because today Gary didn't finish the stored procedure, so I had nothing to do. I decided to look at the database exception again. I spent about one and a half hours searching on Google about the problem but couldn't find any solution. Finally, I did something that didn't make sense but it solved the problem.
In a DatabaseConnector class, I defined the connection, statement, and the resultSet as a global variable and set them to null. I used these variable in all methods that called the stored procedure. In each method I had an try, catch, finally blocks. In the finally block, it would closed the resultset, connection, statement if they were null.
What I did to solve the problem was to change those global variables to local variables. This made the code look so ugly since all method used that same variables which can be define as global. However, it fixed the problem (I hoped). I tested the application several times and it seemed like the problem got fixed. Because I didn't understand the root cause of the problem, I was sure if this solved the problem. Maybe I have to learn more about JDBC.
Before I spent a lot of time on the database exception but couldn't solved it. I almost gave up. But because today Gary didn't finish the stored procedure, so I had nothing to do. I decided to look at the database exception again. I spent about one and a half hours searching on Google about the problem but couldn't find any solution. Finally, I did something that didn't make sense but it solved the problem.
In a DatabaseConnector class, I defined the connection, statement, and the resultSet as a global variable and set them to null. I used these variable in all methods that called the stored procedure. In each method I had an try, catch, finally blocks. In the finally block, it would closed the resultset, connection, statement if they were null.
What I did to solve the problem was to change those global variables to local variables. This made the code look so ugly since all method used that same variables which can be define as global. However, it fixed the problem (I hoped). I tested the application several times and it seemed like the problem got fixed. Because I didn't understand the root cause of the problem, I was sure if this solved the problem. Maybe I have to learn more about JDBC.
Tuesday, April 24, 2007
Junit Test in GWT
While waiting for Gary to have to stored procedures ready, I tried to write some Junit test in GWT. I couldn't make it to work. I kept saying that it couldn't find the module and suggested that I should check the module name. I was very sure that the module name was correct.
Friday, April 20, 2007
Debugging Today.
I tried to figure out when the database exception was thrown. However, it happened randomly. I don't know if this problem is from the database driver or from my code. But the database driver that I use is the latest one from Microsoft.
The focus feature works now. However, it works only on Firefox but not on IE. GWT claims that its Ajax application works on all browsers, but it is not true. I think I will have to search on GWT discussion group to see of anyone has a solution for this.
The focus feature works now. However, it works only on Firefox but not on IE. GWT claims that its Ajax application works on all browsers, but it is not true. I think I will have to search on GWT discussion group to see of anyone has a solution for this.
Wednesday, April 18, 2007
Database Exception Thrown
The exception is thrown randomly when the users click the Search buttons. This was report in issue 51. Even though the exception is thrown, the application works fine. It shows the right data.
The application printed the right number of items as in the database. Basically, in my code, there are a try and a catch blocks. The exception is thrown from the catch block. I don't really know the source of the problem, but fortunately the program catches it and continues on with the right data.
I will ask Gary about this. He may have a lot of experience on this.
The application printed the right number of items as in the database. Basically, in my code, there are a try and a catch blocks. The exception is thrown from the catch block. I don't really know the source of the problem, but fortunately the program catches it and continues on with the right data.
I will ask Gary about this. He may have a lot of experience on this.
Sunday, April 15, 2007
History and Bookmark problem solved.
History and Bookmark work now. Basically the Back and Forward buttons work now and users are able to bookmark the page they like.
However, the Back and Forward buttons and the Bookmark only changes the state of the course table. It will not change the state of the drop-down lists. And I think it is not necessary to change the state of the drop-down lists because first it is hard to do. Second, it takes some CPU and network resources because to change the state of the drop-down lists, the client has to send requests to the server.
I think when the users click the Back and the Forward button, they just want to see the courses found. They don't care what is is the drop-down lists. This is an design issue. I will ask for feedback from the customer and the professor to see what I think is right.
However, the Back and Forward buttons and the Bookmark only changes the state of the course table. It will not change the state of the drop-down lists. And I think it is not necessary to change the state of the drop-down lists because first it is hard to do. Second, it takes some CPU and network resources because to change the state of the drop-down lists, the client has to send requests to the server.
I think when the users click the Back and the Forward button, they just want to see the courses found. They don't care what is is the drop-down lists. This is an design issue. I will ask for feedback from the customer and the professor to see what I think is right.
History and Bookmark in GWT
I did a search on history and bookmark management in GWT today. Because our data is getting from the database, when the back button or the forward button is clicked, a call to the database is needed. The same thing happens to the Bookmark.
Thus, I think a good way to do it is to refactor the onClick method. A new method should be created. This method does the RPC call and has the parameters that the stored procedure needs. The onClick method will call this method. Also each token for the History class should contains the parameters that the stored procedure needs so then a RPC call can be made when the onHistoryChange is fired.
Above are the ideas that I have now to solve the History problem. I don't know if the browser can cached pages so then when Back or Forward button is clicked, the cached pages are displayed and no database calls needed.
Thus, I think a good way to do it is to refactor the onClick method. A new method should be created. This method does the RPC call and has the parameters that the stored procedure needs. The onClick method will call this method. Also each token for the History class should contains the parameters that the stored procedure needs so then a RPC call can be made when the onHistoryChange is fired.
Above are the ideas that I have now to solve the History problem. I don't know if the browser can cached pages so then when Back or Forward button is clicked, the cached pages are displayed and no database calls needed.
Thursday, April 12, 2007
Meetings Today
Group meeting: Brandon and I got together and solved some bugs that Brandon figured out in our program. He noticed that if we kept changing focus (click on different items) in one drop down list fast, the contents of the affected drop-down list would be messed up. This was because the application didn't have enough time to clear the contents of the affected drop-down list before the new data was loaded in this list. Thus, we would end up with a drop-down list that had wrong data if we kept changing to different items in the list that caused the change.
We solved this disable the drop-down list that caused the change while new data was loading to the affected drop-down list. In this way, users were not able to choose different items when new data is loaded.
Meeting with customer was summarize in the CustomerMeeting page on the project home page.
We solved this disable the drop-down list that caused the change while new data was loading to the affected drop-down list. In this way, users were not able to choose different items when new data is loaded.
Meeting with customer was summarize in the CustomerMeeting page on the project home page.
Finished "Loading Status" feature
I finished the "loading Status" feature. It seemed hard, but was easy. I just created a Label. The text of the label is set to "loading" when we make a connection to the database and is clear within the onSuccess method which handles data returned from the database.
The "loading" widget was added to each drop-down list and on the search button.
I changed all of the status of the "Issues" listed on the Issues sections. Before we used the Issues section basically for task assignments. But now I think the Issues section is one the a good software engineering tool. In addition to assigning tasks, we can report issues, enhancements. After an issue is finished and new changes are committed, we change the issue's status to fixed. We then verify if the new changes work. If they are, then the status of the issue is change to "verify".
In this way, we can manage and keep track of issues more efficiently.
The "loading" widget was added to each drop-down list and on the search button.
I changed all of the status of the "Issues" listed on the Issues sections. Before we used the Issues section basically for task assignments. But now I think the Issues section is one the a good software engineering tool. In addition to assigning tasks, we can report issues, enhancements. After an issue is finished and new changes are committed, we change the issue's status to fixed. We then verify if the new changes work. If they are, then the status of the issue is change to "verify".
In this way, we can manage and keep track of issues more efficiently.
Wednesday, April 11, 2007
Semester drop-down list fixed
I modified the Semester_proc to return only semesters that are available for searching. I also created 4 new tasks (44, 45, 46, 47) in the issue lists and finished 44, 46.
I also removed the link on the project homepage to my web server because of security issues. Gary recommend that I should disable the Tomcat Manager. Because right now, any people can go to the manager page. Of course no one knows the password for the Tomcat Manager, except me. However, it is safer to disable the Manager page.
I also removed the link on the project homepage to my web server because of security issues. Gary recommend that I should disable the Tomcat Manager. Because right now, any people can go to the manager page. Of course no one knows the password for the Tomcat Manager, except me. However, it is safer to disable the Manager page.
Tuesday, April 10, 2007
Meeting with customer today
I talked to Gary today about how we would implement the Search By Attribute feature. We came up with an idea that we should place the attribute drop-down list before the subject drop-down list. This way the attributes can fillter the subjects.
He also said that I should have something to let the user know the the search is loading. This is necessary for an Ajax application because most items on the page don't change. We should prompt the user that new info is loaded.
Currently, my application can't search for courses from Spring 2007 or later. He said he will update the database to give me the current data.
Today, I didn't write any Java code, I just worked for while on the database stored procedures. From now on, most of the work will be on the stored procedures.
He also said that I should have something to let the user know the the search is loading. This is necessary for an Ajax application because most items on the page don't change. We should prompt the user that new info is loaded.
Currently, my application can't search for courses from Spring 2007 or later. He said he will update the database to give me the current data.
Today, I didn't write any Java code, I just worked for while on the database stored procedures. From now on, most of the work will be on the stored procedures.
Sunday, April 8, 2007
Fixed Database Problems
So far we don't have access to the Spring 2007 information. In version 2.0.405, there are invalid course names in the Subject drop-down list because of this reason. Today I modified the database and the project so that it will not display course names in the Spring 2007. If the users click on Spring 2007, it will prompt the users that the semester is not available.
I also uploaded the new version 2.0.407 to the Google project and changed all references to the 2.0.405 to 2.0.407 version.
I also uploaded the new version 2.0.407 to the Google project and changed all references to the 2.0.405 to 2.0.407 version.
Friday, April 6, 2007
Worked with Brandon today.
I worked with Brandon today, solving the parse string problem from the class that he wrote.
I also fixed the Search button problem and deployed the project into our development Tomcat server at UH. So now the web app can be accessed anywhere.
I also fixed the Search button problem and deployed the project into our development Tomcat server at UH. So now the web app can be accessed anywhere.
Thursday, April 5, 2007
Search button logic
I tried to figured out the logic when to enable and disable the search button. If we all the users to click the search button when one drop-down lists is not selected, the a null pointer exception error occur. So we have to make sure that all drop-down list have been clicked before the search button is enable. The logic for this is not so hard, but the problem is GWT widgets. Like the FlexTable problem yesterday I encountered. My logic for the FlexTable was right, but I the behavior of the FlexTable confused me (and lots of people). Hopefully, I can make it work tomorrow.
Wednesday, April 4, 2007
Bugs fixed.
The project is working fine now. Today, it took me 6 hours to fix only 2 bugs. The first one was the one that make the computer froze. The reason is that I forgot to implements the "IsSeriable" class in my Java Bean object. However, the debugger in GWT didn't prompt any errors. It just froze.
The second bug was the FlexTable widget. I tried to delete rows in the flex table using the method removeRow(int index). However, the GWT debugger kept giving "uncaught exception". I checked everything and all the logic was right. Finally, I gave up and got some rest and decided to do it tomorrow. However, I kept thinking about about it while lying on my bed. So I decided to give it some more time. I searched in GWT discussion group and found out that a lot of people got the same problem. Most of them though it was a bug in GWT flextable and tried to overwrite some method in the library. However, one person brought up an idea that FlexTable is the java.util.Vector, rows must be deleted from the last row. But the method removeRow(int index) says that index is the index of the row to be deleted. That confused a lot of people. GWT should get rid of the parameter and make it the default to delete from the last row.
At this point, I thought GWT is not a stable framework. It doesn't have good API and its debugger doesn't not give useful messages.
The second bug was the FlexTable widget. I tried to delete rows in the flex table using the method removeRow(int index). However, the GWT debugger kept giving "uncaught exception". I checked everything and all the logic was right. Finally, I gave up and got some rest and decided to do it tomorrow. However, I kept thinking about about it while lying on my bed. So I decided to give it some more time. I searched in GWT discussion group and found out that a lot of people got the same problem. Most of them though it was a bug in GWT flextable and tried to overwrite some method in the library. However, one person brought up an idea that FlexTable is the java.util.Vector, rows must be deleted from the last row. But the method removeRow(int index) says that index is the index of the row to be deleted. That confused a lot of people. GWT should get rid of the parameter and make it the default to delete from the last row.
At this point, I thought GWT is not a stable framework. It doesn't have good API and its debugger doesn't not give useful messages.
Monday, April 2, 2007
Computer still froze when running the application
I tried to call another stored procedure that I know it worked within the section of code I suspected that it froze the program. It worked fine. Then I tried to do the opposite but couldn't solve the problem. Right now I have no clue how to fix this. Yesterday, I thought the problem was that I created too many objects to save the results returned by the stored procedure. However, today I write a test class (not withing GWT) calling that stored procedure and run this without any problems.
So, I guess the problem is from the GWT compiler or from the code that connect the client and server together. Hopefully, I can fix this as soon as possible. Otherwise, the project will get stuck at this point.
So, I guess the problem is from the GWT compiler or from the code that connect the client and server together. Hopefully, I can fix this as soon as possible. Otherwise, the project will get stuck at this point.
Sunday, April 1, 2007
Computer froze when running to project
I created a new stored procedure that returns course names when a campus and a semester is selected. The procedure worked in the database application, but when I ran the project my computer froze. The database returned 150 records and my application created 150 java bean objects, one for each record. I guess that takes lots of memory.
Thursday, March 29, 2007
Reformatted the GUI using CSS
Now I am able to make CSS works within GWT. I reformatted the GUI using CSS. Now the webpage look very nice. Every two rows in the Course table has different background colors. The column names are bold.
The future task would be configuring the drop-down list to have the the autocomplete feature.
The future task would be configuring the drop-down list to have the the autocomplete feature.
Monday, March 26, 2007
Research CSS in GWT
Currently, I can get data from the database and display it in the web browser. Now, I just want to format the text so the GUI looks better. This feature can be implemented using CSS with GWT. Setting unique style for each widget makes the code look nicer.
Sunday, March 25, 2007
Fixed code issues and wrote some new java classes
All of the code issues reported by Checkstyles are fixed. Now the number of code issues went down to 2.
Gary copied the campus and semester table to my database. I can get the course names from these tables by writing a new stored procedure that queries these tables. Gary also gave me this new stored procedure but I couldn't save it to my database. I guessed he forgot the to give me the write permission to the database. I emailed him reporting the problem. Hopefully he will fix this next week.
Even though I can't call this stored procedure at this moment, I can still write a bean class called CourseNameByCampus and a new method that calls the stored procedure. Everything is ready now, just waiting for the the stored procedure to be saved into the database.
Gary copied the campus and semester table to my database. I can get the course names from these tables by writing a new stored procedure that queries these tables. Gary also gave me this new stored procedure but I couldn't save it to my database. I guessed he forgot the to give me the write permission to the database. I emailed him reporting the problem. Hopefully he will fix this next week.
Even though I can't call this stored procedure at this moment, I can still write a bean class called CourseNameByCampus and a new method that calls the stored procedure. Everything is ready now, just waiting for the the stored procedure to be saved into the database.
Thursday, March 22, 2007
Everything got fixed.
Finally, everything works now. The client side can talk to the server side and get the data from the database.
Now I know how GWT works. The future task is improve the GUI and write better stored procedures.
Now I know how GWT works. The future task is improve the GUI and write better stored procedures.
Wednesday, March 21, 2007
Build failed today
Currently, GWT does not support Java 5 enhancements. I have use generic type in my code and got an type casting error and a message saying that GWT does not support Java 5 features.
I will ask Gary about how to get a list of courses from each campus. The stored procedure I have can give all the courses of each campus but can't give only the subjects.
I will ask Gary about how to get a list of courses from each campus. The stored procedure I have can give all the courses of each campus but can't give only the subjects.
Tuesday, March 20, 2007
Courses found are placed in a table.
The layout of the table is up now. However, it looks so ugly. I just wanted to get every things working first. After that I will decorate the table so the important info stands out.
Sunday, March 18, 2007
Widgets
I don't know if it is better to display the search result in the same page than in different page. Displaying in a different page will not take advantage of ajax features because a new page is load.
Displaying in the same page look better but it is hard to decide when to clear the search contents to start the new search.
Displaying in the same page look better but it is hard to decide when to clear the search contents to start the new search.
Friday, March 16, 2007
Finished database connection
Now, the database connection class was finished. Now the application can get the information from the database and convert them into Objects.
Now, we need to figure out how to call the service from the client and update the page as the user selects something on the page.
Now, we need to figure out how to call the service from the client and update the page as the user selects something on the page.
Wednesday, March 14, 2007
Database column names and Java bean variable names don't match
What I suspected several days was right. When we call a stored procedure, all column names that are returned are all upper case. Then when we convert these returned records into Java bean Object, the names don't match. For example, in the Bean class I have a variable called "courseName" and 2 methods called "getCourseName" and "setCourseName". When I run the file, I will get the error saying that method "isCOURSENAME" not found. Actually, we don't need the method isCourseName in the Bean class. But because the column name in the database is COURSENAME and when a try to convert a record in the database to a Bean object, the program tries to find the getCOURSENAME and setCOURSENAME. The error "isCOURSENAME" not found misleads. I didn't add the isCOURSENAME to the Bean class and I changed only the CourseName to COURSENAME. I worked after that.
Tuesday, March 13, 2007
Code Issues Fixed
I fixed most of the code issues. Now, there are only 4 code issues left. Most of them are in the GetData2 class which I wrote to test connection. I don't want to spend time to fix code issues in this class because it will be deleted soon, probably tomorrow.
Most of the database stuff are finished. There are 2 only 2 more classes to write. These 2 classes will call the appropriate service class from the client.
Most of the database stuff are finished. There are 2 only 2 more classes to write. These 2 classes will call the appropriate service class from the client.
Monday, March 12, 2007
Glue Code for Client and Server
I created 4 Java classes today. One was on the server side to get the data from the database and return them to the client. The other one was Java bean for each record in the database returned by the server side class. The other 2 were the interfaces that implement some services in GWT the client side and the server side can see each other. My code issues went up 22, most of them were missing comments for the gets and the sets methods in the Javabean. I am tired of fixing them now. I'll do it tomorrow.
Sunday, March 11, 2007
ObjectFactory Class
I created a Java class on the server side called ObjectFactory. This class converts each record from the database into a Java Object.
Most of the column names in the database start with a capital letter. If I don't change the column names to start with a lowercase then I will violate the Java naming convention that variable names should start with a lowercase. If I change the column names when calling a stored procedure, I am afraid that this will not work. So I think the solution would be writing a Java class that take a column name from the database and then convert the first letter of the name to lowercase.
Most of the column names in the database start with a capital letter. If I don't change the column names to start with a lowercase then I will violate the Java naming convention that variable names should start with a lowercase. If I change the column names when calling a stored procedure, I am afraid that this will not work. So I think the solution would be writing a Java class that take a column name from the database and then convert the first letter of the name to lowercase.
Friday, March 9, 2007
Developer Guide and Javadoc
I spent almost 5 hours today for the Developer Guide and Javadoc, but my devtime in Hackstat is only 1 hour something. Because I used microsoft frontpage to create the Developer Guide, Hackystat is not able to collect the data. There is no MS Frontpage sensor available at this time. However, I am happy with my Developer Guides. It looks good and is very specific that I think anyone can follow.
I don't have much time to work on the source code today.
I don't have much time to work on the source code today.
Thursday, March 8, 2007
Database fixed.
Right now, I could get the data from the database by calling the store procedure from my java class. I took me 3 hours to figured this out because Gary didn't give me full access to the stored procedure. In the semester store procedure, I coudn't see any parameters and its types. Thus I assumed it had no parameters, but it did. So I couldn't connect get anything. First I thought it was a connection problem. I turned on my Packet Analyzer program and noticed that my Java class in fact talke to the database. So the problem must be in the stored procudure.
I wrote another class to test another stored procedure which I have full access and know what parameters are required. I could get data from this stored procedure.
Now, I can get data from the database. Future tasks would be the commucation parts between the client and the server within GWT. I started to write a bean class called AvailableSeatsBySection that stores the data retured by the stored procedure.
I also wrote the javadoc.build.xml that generates Javadoc for my project. The project API is stored in the doc/javadoc directory. I will have to write the readme file for the project.
I wrote another class to test another stored procedure which I have full access and know what parameters are required. I could get data from this stored procedure.
Now, I can get data from the database. Future tasks would be the commucation parts between the client and the server within GWT. I started to write a bean class called AvailableSeatsBySection that stores the data retured by the stored procedure.
I also wrote the javadoc.build.xml that generates Javadoc for my project. The project API is stored in the doc/javadoc directory. I will have to write the readme file for the project.
Tuesday, March 6, 2007
Installing Googlipse and Calling a Stored Procedure in MS SQL Server 2005
1. Installed Googlipse GWT eclipse plugin.
2. Researched about calling stored procedures in MS SQL Server 2005 from Java. Right now, I think I have to write a Java class that calls the stored procedure created in SQL 2005. This class should be placed in the server package of the project. This class should implement some interface required by GWT so that it can communicate with the client. Writing this class is not easy. Thus, I think I can start by writing a regular Java class that call the stored procedure and make sure that I can get data from the database. Then modify this class to become a GWT server side Java class that can handle request from the client.
2. Researched about calling stored procedures in MS SQL Server 2005 from Java. Right now, I think I have to write a Java class that calls the stored procedure created in SQL 2005. This class should be placed in the server package of the project. This class should implement some interface required by GWT so that it can communicate with the client. Writing this class is not easy. Thus, I think I can start by writing a regular Java class that call the stored procedure and make sure that I can get data from the database. Then modify this class to become a GWT server side Java class that can handle request from the client.
Sunday, March 4, 2007
Upgrade to GWT 1.3.3 and Retructure the Project
I made a lot of changes to the project structure today.
1. Upgraded my GWT to 1.3.3 release.
2. Created the GWT_HOME environment variable so I didn't have to store the GWT library in the project. The library is stored the the local computer. This fixed the problem the Professor Johnson pointed out. The root directory of the project now only contains directories and ant files. The reason I had this problem because I followed the GWT tutorial on the GWT homepage. This tutorial doesn't teach how to set GWT_HOME environment variable. If someone follow this tutorial, he will end up to have a lots of unwanted files and the GWT library in the root directory of the project. Today I followed the IBM tutorial which is much better than the tutorial created by Google. My project now is only 2.4MB, comparing to before it was around 50MB.
3. Upgraded my TortoiseSVN to the newest vertion TortoiseSVN 1.4.3, Build 8645. Before I had some problems with subversion. I hope this new version will fix these problems.
Tomorrow I will create the Developer Guide that shows how to import my project into eclipse and run it.
1. Upgraded my GWT to 1.3.3 release.
2. Created the GWT_HOME environment variable so I didn't have to store the GWT library in the project. The library is stored the the local computer. This fixed the problem the Professor Johnson pointed out. The root directory of the project now only contains directories and ant files. The reason I had this problem because I followed the GWT tutorial on the GWT homepage. This tutorial doesn't teach how to set GWT_HOME environment variable. If someone follow this tutorial, he will end up to have a lots of unwanted files and the GWT library in the root directory of the project. Today I followed the IBM tutorial which is much better than the tutorial created by Google. My project now is only 2.4MB, comparing to before it was around 50MB.
3. Upgraded my TortoiseSVN to the newest vertion TortoiseSVN 1.4.3, Build 8645. Before I had some problems with subversion. I hope this new version will fix these problems.
Tomorrow I will create the Developer Guide that shows how to import my project into eclipse and run it.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
- 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.
- 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.
Subscribe to:
Posts (Atom)