Developer Documentation

Skip to end of metadata
Go to start of metadata

Guide

For developers (please click this link if you are a developer for tDAR)

  1. Configure tDAR development server (NECESSARY for new developer in this group)
  2. tDAR functionality
  3. Design database scheme
  4. Source codes structure
  5. Data integration test environment
  6. Tests to be done (white box)
  7. Deploying tDAR on a server
  8. Eclipse Setup / Configuration

Set up the development environment

  1. Download and install Maven 2 from http://maven.apache.org
  2. check out the codebase from our SVN repository
  3. set up the database by performing the following:
    1. make sure you have a tdar user with CREATEDB permissions on postgres
    2. in src/main/resources copy all *.template files, removing their .template extension, e.g.,
      cd src/main/resources; for i in *.template; do cp $i `basename $i .template`; done; cd -;
      

      .
      Customize as necessary, but the template files should work for most cases.

    3. set up the tdarmetadata and tdardata databases (this step should be managed automatically if possible)
  4. use mvn eclipse:eclipse to generate Eclipse's .project & .classpath files, then add M2_REPO to the variables via Build Path -> Add Variable and set it to your local Maven 2 repository. On Unix-ish machines, this should be ~/.m2/repository. If you're using the m2eclipse plugin , this step usually isn't necessary.
  5. to make google maps work on your development box, copy src/main/webapp/includes/googlemaps-api-key.js.template to src/main/webapp/includes/googlemaps-api-key.js and then customize it by changing the gmapsKey variable to the google maps api key for your host. You can get a google maps api key at http://code.google.com/apis/maps/signup.html
    #Important maven targets include:
    1. mvn compile
    2. mvn test
    3. mvn jetty:run to deploy the webapp on the port specified in pom.xml
    4. mvn verify to run the unit and integration tests
Maven dependencies
To add new library dependencies, you can look them up via a repository search engine like http://mvnrepository.com or http://mavensearch.net (see http://maven.apache.org/general.html#How_to_find_dependencies for more repository search engines). If so, add the pom snippet to the pom.xml, otherwise you may need to install it manually in our local maven staging repository. You can also add maven repositories to Archiva as a proxy connector, which will keep our pom.xml simpler.

Resources and Links

Development Infrastructure
Coding Standards
Design Document

Technology stack

Hibernate: http://hibernate.org

We currently use Hibernate 3 for object relational mapping. Relationships are specified via JPA annotations though the actual DAOs used to store, retrieve, and update persistent entities use a hibernate SessionFactory behind the scenes instead of an EntityManager, which would be the most framework-agnostic way of object relational mapping.

More information about the tDAR hibernate implementation can be found at the tDAR Hibernate Documentation Page

Spring: http://www.springframework.org

We are currently using Spring to make Hibernate easier to use, for dependency injection/IoC purposes (managing our beans/services/daos/data sources/hibernate sessions) and for transaction management.

Struts 2: http://struts.apache.org

We are currently using Struts 2.2.1 as the web application framework. More information about the Struts implementation can be found at the tDAR Struts Documentation Page.

Protege
Other Web Frameworks
URL Rewriting: http://tuckey.org/urlrewrite/

Performance tuning

Massively parallel data stores

Other documents and miscellany

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.