Tricia Help
Last edited Oct 28, 2011

Installation Instructions for Tricia Software Developers

Tags: no tags assigned  

Please note that these instructions specifically target software developers.The instructions for users who want to download and install Tricia can be found here.

Prerequisites

There are two major prerequisites, which have to be in place to install Tricia:

  1. As a first prerequisiste, a current (1.6) Java runtime has to be installed. Java can be downloaded from http://www.java.com.
  2. We use Mercurial as our version control system, so you have to install Mercurial on your machine. Informations about installing and learning Mercurial can be found here.

For persistent storage, Tricia requires a relational database. The Tricia workspace contains the relational in-memory database hsqldb, which is fine for testing purposes.  If you want to develop using a production-ready relational database, you have to install MySQL (see Installing MySQL).

Eclipse

Since we believe, that a modern IDE improves the developer experience a lot ,we strongly recommend using the Eclipse IDE for developing Tricia applications. We provide special Tricia Eclipse plugins, which are necessary for some development tasks. The easiest way to get these plugins is by cloning our BitBucket repository eclipse-dropins. This repository additionally contains some useful existing plugins (Aptana, QuantumDB, JAutoDoc, RegExp). The following steps explain the installation of a fresh Eclipse:

  1. Download Eclipse 3.7.1 from http://www.eclipse.org/downloads/, and extract the zip file to a folder of your choice (for example "C:\eclipse"). The absolute path name of this folder must not be longer than 20 characters. This path name is in the following referred to as %ECLIPSE_HOME%.
  2. Go on the command-line into %ECLIPSE_HOME%, and delete the empty dropins folder.
  3. Call hg clone http://bitbucket.org/infoasset/eclipse-dropins dropins , which creates a new dropins-folder containing the bundled plugins.
  4. Start Eclipse with the following additional parameters: -vmargs -Xmx512M -XX:MaxPermSize=125m (put these settings into the file eclipse.ini)
    If you have a problem stating "Sending Ping has encountered a problem..." which is caused by the Aptana plugin have a look here: https://aptanastudio.tenderapp.com/discussions/problems/472-aptana-studio-20-sending-ping-error-on-startup
  5. Make sure, that your default character encoding is UTF-8 (Window -> Preferences -> General -> Workspace -> Text file encoding)
  6. The Tricia plugins now can be activated in Eclipse by Window -> Show View -> Other -> IMF -> Configurator

Tricia Download

As already mentioned, we use Mercurial as our version control system. The code of the core Tricia plugins is hosted in the repository tricia on BitBucket, so ultimately you have to clone this repository.

To enable the use of more than one repositories the Tricia development workspace contains a folder repos, which may contain more than many repositories. The following steps explain in detail how to set up a Tricia development workspace:

  1. Create a folder [your path]/repos in the directory in which you want to develop Tricia (e.g., C:\development). Again, choose a short absolute path name for the root folder of the Tricia workspace.
  2. Clone the main Tricia repository in the repos folder by running hg clone http://bitbucket.org/infoasset/tricia on the command line.
  3. Now you have to update to the most recent release of Tricia by running the Mercurial command hg update 3.1.26 in the tricia directory.
  4. (Optional) As a best practice, we recommend you create a folder [your path]/eclipse-workspace, in which you store your Eclipse workspace information.
  5. Finally, you must import the Tricia plugins into your Workspace. Start Eclipse and select "File -> Import and then General -> Existing Projects into Workspace". In the "Select root directory" box, browse to the Directory [your path]/repos/tricia/. In the selection box, a whole list of projects will appear. The simplest option is to import all of them. Do NOT activate the checkbox "copy projects into workspace" below the project list.

Eclipse Preferences

Tricia comes with some Eclipse preferences, which make the development of Tricia applications easier. These preferences can be activated in Eclipse by File -> Import -> General -> Preferences, then select in From preference file the file /repos/tricia/platform/preferences.epf, and click Finish.

Running Tricia

Now you can start each plugin by running the provides Eclipse run configurations. For instance the wiki plugin contains a file wiki-test.launch, which can be started by right-clicking, and then Run As -> wiki-test. The now running Tricia instance should be available under the URL http://localhost:8083, and you can login with the login "mustermann@test.tricia" and the password "ottto".

Further Documentation of Tricia

From now on, documentation in Javadoc is available:

  • Open the class de.infoasset.platform.documentation.IndexDoc in the plugin toro (Ctrl-Shift-R, IndexDoc.java) and view the documentation with the Eclipse Javadoc view (Window -> Show View -> Javadoc),
  • a copy of the Javadoc articles is available here: de.infoasset.platform.documentation.IndexDoc,
  • or generate the Javadoc using the Ant-Target javadoc in the Ant file repos/toro/build.xml.

Learning Exercises

The following three exercises teach the basic concepts involved in building web applications with Tricia:

  1. For solving Exercise1, you should read the chapters Introduction to Triciarunning, repositories, plugins, workspace organization, request handling, stations, forwarder, handlerdispatcher.
  2. For solving Exercise2, you should read the article about the basic modeling of entities, and the article on querying.
  3. For solving Exercise3, reading the second and third article on data modeling is recommended.

If you have further questions send an email to .

Contributions

How to contribute to the development of Tricia is described here.

0 Comments