week12

October 15, 2009

Meet with the group member , try to integrate our ppts and decide on the topics we are going to talk in the presentation, decide the order of talk

finalize the enrollment application , fix a bug : student selected units  wont be removed from the available unit list

Test the application under all kinds of situations to make sure it won’t crush during the presentation.

week11

October 6, 2009

Try to add some css to the application to make it look better ,  but the lecture told me that i should reuse the sakai css to make the application has the same look and feel with sakai , after some check on the internet ,  find the sakai_tool_skin.doc  sakai_portal_skin.doc file which tells you how to reuse and customize sakai css ,  use some of the css classes in my application  for e.g portletBody css class to resize the main frame ,  navIntraTool for the navigation bar

prepare some PPT files for final presentation and made some screenshots in case that the application wont work during the presentation.

week10

September 28, 2009

trying to migrate the spring application to sakai

first try to use the Converting Spring MVC applications to Sakai tutorial in the course main page , but the tutorial is not in detail and hard to follow , tried many times and it always give the class version not comparable mistake , later find out that it’s because sakai is using spring2.0.6 and the spring  i used for development is 2.5

the final method i used to convert spring application to sakai is to create a simple helloworld program using sakai appbuilder , then gradually add functions and dependencies , if error happens look at the tomcat log for information then try to fix it , most of the time it’s dependency missing or dependent JAR version not compatible mistake.

week9

September 23, 2009

install sakai , engage a lot of problems

first try to follow the video tutorials and it’s not working , read through the sakai development enviroment walk through tutorial and find that a lot of steps are missing .after 2 days of check and fix finally got sakai installed in tomcat

some points need special attention when installing sakai

1, the sakai version and tomcat version has to be compatible

2, need to change the setting in sakai.properties to use mysql database setting , also need to create the sakai user account in mysql and grant all privige

week8

September 16, 2009

implemented most of the critical functions of the enrollment system : chose student major , list major core units , select unit ,  list student selected units

encounter some problems like trying to operate on persistence class after session closed. After some check on the internet find that the problem is that  getHibernateTemplate().load() will close session after 1 conversion with the database , if we want to operate on the persistence class , we have to manually get the session and open/close tranction.

Also have a lazy initialiation problem , find 2 solutions

1, set lazy=”false”

2, explicitly initialize the associated persistence classes before load them

WEEK7

September 7, 2009

PROJECT PROGRESS

finish all preparation works ( spring ,hibernate ,maven tutorial)

start to develop the enrollment system

chose MyEclipse as the IDE since it has a nice feature of hibernate reverse engnie which automaticly generate all the mapping file files for you , so you dont have to write the same thing again and again

give peer-review to team member charis javis , suggest him to include more project implementation plan in his proposal

prepare for the mid-term exam , read the essays about frameworks , design patterns .

WEEK6

August 30, 2009

LEARNING SUMMARY

Start learning maven, summarized some main features of the maven

1, how does maven differs from tradition build tools

Maven uses project description information (pom.xml) to manage project build, test and report

Maven provides a convenient way of publish project information and share JAR among project.

Thus enables manage different version of source code write by different person.

Maven is more than a build tool,it is a standard way to think about project layout and management

Maven project has a standard directory structure

Maven plugin is a set of similar goals

After running mvn install , a series of goals will be executed until the project lifecycle finished , during this project lifecycle maven has done a lot of work like compile, download decency, create JAR.

2, POM.XML : metadata tells maven about the project , some important fields

<artifactid> the id of the project output

<dependency> specify the JAR artifacts project depend on

<repository> associate the project with a source code repository for maven source code control (SCM) to use.

<sourceDirectory> specify the location of project source code

<resource> specify the configuration files to be copied in JAR ( .property .xml configuration files)

3, how to create a maven web app project

Use maven archetype plug in to specify web app project archetype and specify the arificateid, groupid.

mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-webapp -DarchetypeArtifactId=maven-archetype-webapp

write java source code in src/main/resources folder
write web configuration files in src/main/webapp/web-inf folders

PROJECT PROGRESS

Try to Migrating the ant project created in spring tutorial to maven

Encounter a problem that maven can’t download the dependent artifacts from centre repository,

Read through the maven developer’s notebook again and find out that I need to set a proxy for maven. Add the entry <proxy>…</proxy> entry in the settings.xml file in .m2 folder then problem resolved.

week5

August 25, 2009

LEARNING SUMMARY

Start learning hibernate framework, summarized some main features of the hibernate framework

1, reason for object/relational mapping

Relational Database use relational model and Application use object oriented model, so when we need to use data source from database in application there would be a structure mismatch, that’s why we need to use object/relational mapping.

2, Data Source Architectural Pattern

Four patterns: Table data gateway, row data gateway, active recorder, data map per.

Hibernate is aiming to do data map per where a layer of software that separates the in-memory objects from the database.

So that we can operate on persistence class objects to perform database operations instead of using sql

3, how to use hibernate to do ORM

l         POJO class as persistence class , one instance of the class represent one row in the table

l         Mapping file (.hbm.xml) to specify class/table mapping (class field to table column mapping ), specify the primary key generate strategy , specify table association mapping (<set>…<one-to-many> </set> )

l         Configure the database hibernate.cfg.xml ( database connection setting , mapping resource , session context management )

PROJECT PROGRESS

Integrate the spring application with hibernate ,

Modify the individual proposal, according to the tutor’s feedback; add some background information about why we need an improved enrollment system.

week4

August 19, 2009

PROJECT PROGRESS

Draw the domain class diagrams for enrollment system design , design the database , six tables ( STUDENT , STUDENTUNIT , UNIT , STUDENTMAJOR , MAJOR ,  MAJORUNIT )

Trying out hibernate in a traditional MVC, successfully load the student information from the database and displayed on a jsp page.

Link to the domain class diagram (UML diagram in the bottom)

http://docs.google.com/Doc?docid=0ATsvVMY7q6uRZHRrcWdic18zZm1mdzZ4ZHI&hl=en

week3

August 12, 2009

LEARNING SUMMARY

Start learning the spring framework, summarized some main features of the spring framework

1, dependency injection

When a class A is depend on another class B, instead of instantiate B inside A , put the dependence relationship in a configuration file to let the container know , later when we instantiate A , the container will automatic inject an instance of B.

The advantage of dependence injection is that class A doesn’t know the existence of class B , it only uses class B’s interface and class B’s interface is implemented via B’s implementation class which injected automatically by the container. This has greatly reduced the coupling between classes. And with lower coupling modification of a class won’t affect too many other classes, which makes software extensibility possible.

2, improved MVC

Spring framework adds a dispatcher controller since the traditional controller is doing too much work. It has to handle the request and call the models to perform business logic then forward the result to view. In Spring framework the dispatcher controller is only responsible for request handling and leave the interact with model and view to the page controller. This kind of separation of concern guarantees high cohesion where each software module only focuses on its own responsibilities.

The view revolver maps the logic name of the view to the actual view object to fulfill the same purpose (high cohesion).

PROJECT PROGRESS

Meeting with the group members, decide that our group’s project theme will be an improved e-learning system. And I will be responsible for developing the enrollment subsystem. Look up some drawbacks of the existing enrollment system of Sydney university ( not user friendly , not integrated with handbook instruction , no credit point calculator , not associated with student major ) and proposed some improvements.


Follow

Get every new post delivered to your Inbox.