Monday, October 22, 2007

the end of it all is near

The demo went well (not great) there was some technical issues. I think we could have expressed the demo a bit better, however i think with the little time available we still did ok.
I am doing thesis more than this subject for the next few weeks and then before the weekend of the presentations and the exam i'll do most of the study.

Saturday, October 20, 2007

integration - the great unfair night!!!

well the past week seemed to me to be very unfair, its 3:40am and i've got it all integrated (by all only my 3 on moday) fruther more i've changed the skin slightly.

There were many issues with the code that i hand to fix. The way hiberante was using databses had to change as the code was using to instances of hsqldb, i had to change it to one. also there was a conflict with a jar, so i had to revert it back to an older one and fix.

further more i had to inject data into the database, but the maven things were all commented out.

at the end of the day i'm bitching! i have a thesis i should be doing!!! anyways its done i'll make presentaion tomorrow. Since no one replies to emails or uses the wiki, doesnt seem very fair at all. People expect me to then help, i dont think i'll be able to, but hey, hope not too many people read this :)

Sunday, October 14, 2007

Discussion of sakai prototype

So its been a while, however i expect to do this as deatiled as i have recorded in my code and as part of SVN..

Overview
Firstly the task at hand was to move from and Spring MVC application into a fully integrated Sakai application. Now there are two approches here:
  1. Simply convert the system, into a sakai app by adding some extra information in the web.xml file, and register the tool with sakai using a registration file.
  2. The more complicated thing to do is to redesign the directory strucutre and enforce the full sakai tool, this separates api, tool, implementation, and model. Further create nested POM files.
It was clear from the start the second would be very hard to get working as it required a complete redesign of the system. At first it was daunting but I thought i'd try.

The Full Story
The first task was to install sakai, i downloaded the source of sakai, and then complied it using Maven. That was an issue in itself. Maven required several aspects that needed to be set up, at first I installed maven 2 and configured. On doing this i then fond out that Sakai 2.2.3 uses Maven 1.0.2. Thus i had to uninstall it and then remove the repoistory. All along i was using the eclipse plugin for maven. Now this became probalamatic as it included versions that were not comaptable with Sakai and was forcing sakai to use them.

On removing this and then using the correct version i realised that all this would be too much to get working in windows. So i decided to use my Linux box instead. I put maven on this, and then complied Sakai and was able to deploy it ease (LInux working i know its scary). It was now time to try and get the tool built. It was daunting to try and make the dir structure by hand. So at that point i decided to try and look for help from the Sakai community and everyones freind Google. On doing this i found the Sakai App Builder plugin for eclipse. This was perfect as it built the directory strucutre, and also was capable of building all the POM files, as well as the authentication service integration.

The Sakai App builder was used and it generated the whole structure that was needed. It was then my task to fill in the gaps. The following is what i had to change:
  • Change the Sakai registration file to include some new description and titles.
  • The base object that holds most of my logic i.e. the model data. This was the Club, and i also had to rewrite the hbm.xml file for it to ensure the mapping is correct.
  • The sakai.properties file to allow it to use the DB, at first MySQL was going to be used, but after some playing around HSQLDB was easier and quicker, so we used that.
  • The ClubBean that was responsible for control of the web app. It played the role as the connection between teh JSP and the Java files. Using dependency injection we are able to give it everything it needs. This was the Logic classes that allow for the saving, editing of Clubs. Secruity function via the external logic class, and finally performing searches using the searchingtool. Each of these have an interface and then an implmentation.
  • THe interfaces then became part of a libaray that was then added to the global Sakai shared library. This means that my tool can be used by others via the API. This is what i do with the Authz module, i simple use the API and the impl is hidden from me.
  • The JSP files were created to fit directly into the sakai format using certain classes for the CSS, and special Sakai-style tables. Using these we are able to create a tool with the SAkai look and feel.
  • The searching tool was played with alot, first i implemented a simple DB search tool, that wasnt very good at getting results. Next a regex version was used and this was much more succesful, this was finally used as the other versions did not work! This version used the search tool within sakai however it required me to implemnt a horible interface! Also relied on Enity tracking and producers which were quite difficult to grasp without much documentation. The search tool is run within the jsp, via the ClubBean which has the tool injected into it at start up.
At home it ended up working after alot of time and effortit was able to work, Maven proved to be difficult (again) it was unable to download the ocrrect version of the generic dao object. i wanted 0.91 but for some reason it could NOT! So i manually changed the POM files to only refer to 0.9. This then fixed that issue.

Then i got to uni and thought sweet its all good, just need to rebuild it all :) . How wrong i was it took forever and didn't work!
After a great deal of apin and anguisg it was because Maven dpl task was not copying the JSP and WEB-INF directory. This was manually fixed by moving the files over, however since i was using a full Sakai tool the files were split over many files. These include compoents folder for the package itself, and then the lib folder for the api. And most importantly the acutal web app that tomcat uses this is the JSP files and the beans.

So there it is simple if you use maven (1.0.2 and its nice and you configure some stuff and you great stressed) and SAKAI APP BUILDER this IS a life saver as it makes the dir structure and maven files as well as many of config xml files.

Sunday, August 26, 2007

project proposal

The scaffold for this proposal is taken from from the UOS website.

Purpose (problem statement):
To simplify the process whereby student's find clubs and societies that they are interested in. That is creating an new channel of communication between students and clubs and societies of the university.

Background:
Currently the only techniques in place to join students with the clubs and societies they are interested with is during O - Week in the week 0 of semester 1(and to a lesser extent Re - O Week week 1 of semester 2). Also there is a directory of all clubs that are registered on the Union website. Now the problem with this is that is hard to navigate, and is unsearchable. This web site does not provide a mechanism to formulate links between the students and the clubs.
By providing a new way to find the clubs and socs that students like it will help keep memberships in the clubs growing and allow more student's to have the complete university experience. The Clubs and Socs program provides an important part of the university experience.

Users / Actors:
The actors that will use the application are as follows:
1) Clubs and Socs Executive: It is their role to update and upload information about their particular club.
2) Clubs and Socs Administrators: These are the union execs that run clubs and socs, it's their job to add club and socs execs as part of the registration every year.
3) Students: who can search the system and get in contact with the clubs and socs they want.

Use Cases:
1. Add / Edit / Remove Club and Soc Exec
2. Add Club Information
3. Search for a Club
4. Contact a club (this one may change submit interest)

These use cases may evolve over time.

Thursday, August 23, 2007

recent labs + hibernate

Monday's lab for me well was out... epilepsy and all ... well i'll try to get the hibernate part done asap, also this weekend i will finish readings and write the description for the project.

Wednesday, August 8, 2007

extra lab

So I went into the lab today and did some work, i finished of the Ant JUnit part. Also i did the form data. The form part was quite easy however it was something that i had not used. Everything was integrated with Spring. The main issue that was quite new was the integrated with tags. The tagging library allowed the inbuilt Spring framework to be used at all areas of Web IO. The reason this is powerful is that we can then use the internal Spring functions to do things like:
  • Validation
  • DB connections
  • Log in etc.
I think this is much better than using simple standard xHTML tags. We can then form better automation and the system will be scalable.

Other things that I needed to mention that were important are:
  • Tagging is a critical part of Spring and i need to look at this a bit more.
  • JSP relies heavily xml and the web xml files. The strucutre of these needs to be learnt instead of relying too heavily on the files that are already there

Monday, August 6, 2007

lab 2

Lab 2 was not as productive since i ran into major issues with the JUnit part. This was because of a faculty install, and so i was the Guinea Pig for the solution. At the end of the day it did work and the JUnit tests (which i knew how to do) worked.
One thing i did learn though was the way to make ant do them for you (even though this took forever to get working) This can be useful in the long run. I will be going back to the lab on Wednesday to finish of section 3 and 4. This should be more productive as i will begin using things like tag libraries and forms, which i am new to.