Warning | ||
---|---|---|
| ||
This page relates to an older OpenSyllabus Version. Some parts needs revision. |
Quick start for developers
...
Note | ||
---|---|---|
| ||
If you only want to test OpenSyllabus, you can download a bundle that includes a Tomcat instance configured with Sakai and OpenSyllabus. |
This tutorial will show you how to load the OpenSyllabus project into Eclipse.
Anchor | ||||
---|---|---|---|---|
|
...
Installation and deployment of OpenSyllabus with Sakai 2.4/2.5 and GWT 1.5
1) First of all, a working installation of Sakai 2.4 or 2.5 is mandatory prior to install OpenSyllabus but at this time, OSYL is not synchronized with Sakai 2.5 trunk, thus you will need to download a bundle corresponding to a specific snapshot of Sakai 2.5 (see below).
That said, if you never have installed the Sakai Development Environment, you should read and follow the instructions at the following address. This will allow you to install and configure Subversion, Maven, Eclipse and Tomcat.
Tip | ||
---|---|---|
| ||
see http://confluence.sakaiproject.org/confluence/display/BOOT/Development+Environment+Setup+Walkthrough) |
In fact, Subversion, Maven, Eclipse and Tomcat should all be installed and configured properly.
2) Next, get the OpenSyllabus source-code
Using Subversion (SVN), perform a checkout of osyl (backend code) and osyl-core-gwt (frontend code) to the local Sakai repository.
Considering <SAKAI_HOME>, the path to the Sakai installation directory
(OpenSyllabus source-code will be available soon at the following repository address) The OpenSyllabus source code is not yet available from a Subversion repository but here is how to download it as an archive.
Tip | ||||
---|---|---|---|---|
| ||||
Download the 2 following zip archives: osyl-sakai-src-alpha.zip (36 MB) and osyl-src-alpha.zip (2 MB). Extract osyl-sakai-src-alpha.zip first, it will create a folder osyl-sakai25 then extract osyl-src-alpha.zip in that folder. |
3) You also need to install the Google Web Toolkit (GWT) library on your PC
Tip | ||
---|---|---|
| ||
GWT library is available here: http://code.google.com/webtoolkit/download.html. |
4) Create an environment variable called GWT_HOME
...
5) Next, get and install the google-web-toolkit-incubator library
In fact, OSYL uses some UI components (i.e. Calendar) from the GWT incubator library.
Look at this library to find some more cool GWT components.
This JAR is compatible with jvm 1.5+ and GWT version 1.5.1+ 2 is mandatory.
Tip | ||
---|---|---|
| ||
GWT incubator library can be download from here Put the gwt-incubator_1-4_final.jar into your GWT base directory (i.e. GWT_HOME) |
6) Install the Sakai's properties file into TOMCAT subdirectoryDon't forget to put a copy of the gwt-user.jar into the TOMCAT shared/lib directory
Considering <GWT_HOME>, the path to the GWT installation directory
Considering <TOMCAT_HOME>, the path to the TOMCAT installation directory
Tip | ||
---|---|---|
| ||
If you are installing Sakai 2.5 you must create a subdirectory <TOMCAT_HOME>/sakai |
Warning | ||
---|---|---|
| ||
Make sure that the Sakai.properties file contains the right information |
| |
<GWT_HOME>/gwt-user.jar into <TOMCAT_HOME>/shared/lib |
7) Next, you have to compile the JCR module first
Considering <SAKAI_HOME>, the path to the Sakai installation directory (osyl-sakai25 in our case)
Use this MAVEN command from the Sakai's base directory (i.e. <SAKAI_HOME>)
...
Let's have a look at the OpenSyllabus code structure.
- Sakai Source Code Structure
- osyl-core-gwt (Frontend project (GWT code)
- client
- public
- shared
- osyl (Backend project (Sakai's , ie OSYL-Sakai tool code)
- api dir
- impl dir
- tool dir
- osyl-core-gwt (Frontend project (GWT code)
...
We've found 3 possible use cases:
Use case A - client update only
...
In "Hosted Mode", a JVM executes the GWT code as Java bytecode inside a special embedded browser window (before your Java code having been translated into JavaScript).
Running GWT Webapp in "Hosted Mode" makes debugging easy following a standard edit-run-debug cycle
- Edit your source
- Refresh
- Check the results
Tip title To launch a hosted mode session with OpenSyllabus from Eclipse Your startup file is OsylEditorEntryPoint-shell.cmd (select it, right-click on it + Open With + Default Editor).
It should launch a program from the console.
Deployment in Web Mode
Once tested in "Hosted Mode", you can compile your Java source code to JavaScript the and deploy your Webapp. GWT Webapp that has been deployed is also said to be running in "Web Mode".
...
Tip | ||
---|---|---|
| ||
Just click on the Compile/Browse button in the embedded browser window |
...