Thursday, October 18, 2007

Integrate our components into Sakai

This week
This week we start to integrate all our components. Actually four components are working till now in our group. What we do is put these four components as four tools together under one site.

This is actually a group work, then I tried to put two guys tools in Sakai in my desktop environment, finally I got one worked but another one didn't. The problem mostly from setup database.

I use HSQLDB, some guys use MySQL. So I have to configure my computer to provide MySQL service. After that, I have to create table and insert data using some function provided by each component, which is various. So I think documentation in how to localize a component into a computer is very important. Example like most components specify a local path in connecting database. By the way, I write a Readme.txt for my group member for instruction.

It is almost to the end of this course. I learnt lots of new things through this course, and start to know what is software engineering. It is not very interesting as I thought before, especially we use some tool like Sakai. It is not properly documented and not well supported by large community. Another thing I dislike is debug. Debug is normal in programming, but 3/4 of the time taken up by debug is not exciting isn't it? Luckily, we have Junit, and Ant, Maven to support in developing. Those are very handy tools. Otherwise, 99% is debug time.

Bugs are caused by different reasons.
The common one is rush programming, or trial programming. Since all those frameworks are new to me, there are different ways to fulfill a task or a function, most case I implement some logic and see whether they will work. This should belong to normal programming process, trial and debug.

Another reason is version uncompatible. Most of the time, I follow the literature, but found out I use an old version of Jar or a too new version of Jar. Then I have to give up following the example and search for other example code. A very good case is Hibernate2 and 3. They use different import path, which means once you change the version, you must change your code. And thing can be more complex. When you use Spring, it support Hibernate, but you should figure out which version it supports. When you find out a good example from Spring2, and want to use it, maybe you have to change your hibernate code in deploy to Spring 2. Then later you find out Sakai doesn't support Spring 2, then you will have to change all things back manually.

Other reason can be not proper test of code. The software provider doesn't test their code properly then release the version. The case is Mevenide in Linux, which is a rubbish plug-in, don't try to use this like Ant in your Eclipse.

The course
This course gives you pressure to learn more than teach you things. It schedules project and ask you to know, to figure out tones of problem. It is OK, since this is a practical way to understand software development.
But the group project comes out not much like cooperating work. As our components are not integratable practically when we start individually. And it is beyond the initial idea of cooperated work by using Trac and SVN. (they are not good tools, at least what we are using are bad) A little bit disappointed about the misleading at the beginning.

Monday, October 08, 2007

My Project into Sakai


I am using Sakai Demo, change sakai-demo to tomcat directly. In deploy, just as before, put the .war file in to webapps under tomcat.
Follow the instruction in the doc, download sakai.bibliography example, put the weg/ file to maven/repository/, be sure to add a dependency in project.xml of the sakai-tool-filter-1.0.jar

My problem is:
My welcome page is a static page, rather than a redirect page. When it first shows the welcome page, it can't link to those jsp page under jsp/. Then after an hour test, I start to redirect this page to a page under jsp/. Now it is working well. After redirect to a jsp page, you still can link back to that static page, the interesting thing is, now this static page starts to work.

Refer to the sakai.bibliography example, I add a header to my page, and some format, which makes my pages looked very nice. You can have the whole page in the screen, instead scrolling the bar. The thing to control these format is under include.jsp file and a sakai.jsp related.

I should say Sakai is lack of documentation as what we usually do in our program development.

Wednesday, October 03, 2007

REFINE of My project, Touch Sakai

A pure Sakai Demo without my project
Running on my computer




The syntax has different views between IE and FireFox:

The view in FireFox


The view in IE




HSQLDB: start up:
java -classpath hsqldb-1.7.3.0.jar org.hsqldb.Server