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.
Thursday, March 29, 2007
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.
Subscribe to:
Posts (Atom)