Developer Documentation

compared with
Current by Allen Lee
on Sep 02, 2010 22:01.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (11)

View Page History
# [Tests to be done (white box)|http://www.tdar.org/confluence/display/TDAR/tDAR+test+(white+box)]
# [Deploying tDAR on a server|TDAR:deploying tDAR]
# [Eclipse Setup / Configuration|TDAR:Eclipse]

h3. Set up the development environment
# set up the database by performing the following:
## make sure you have a tdar user with CREATEDB permissions on postgres
## copy {{hibernate.properties.template}} to {{hibernate.properties}}, customize if necessary
## run {{mvn \-P ant \-D target=load-data}} to load the legacy gridsphere data and update the schema to conform with tdar.struts version. If you want a clean database, replace {{target=load-data}} with {{target=initialize-data}}
# copy {{crowd.properties.template}} in {{src/main/webapp/WEB-INF/classes/}} to {{crowd.properties}}, customize if necessary
# use {{mvn eclipse:eclipse}} to generate .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, should be {{\~/.m2/repository}})
## in {{src/main/resources}} copy all {{\*.template}} files, removing their {{.template}} extension, e.g.,
{code}
cd src/main/resources; for i in *.template; do cp $i `basename $i .template`; done; cd -;
{code}.
Customize as necessary, but the template files should work for most cases.
## set up the tdarmetadata and tdardata databases (this step should be managed automatically if possible)
# 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 | http://m2eclipse.sonatype.org/], this step usually isn't necessary.
# 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:
## mvn compile
## mvn test
## {{mvn compile}}
## {{mvn test}}
## {{mvn jetty:run}} to deploy the webapp on the port specified in {{pom.xml}}
## {{mvn verify}} to run the unit and integration tests

{note:title=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|http://dev.tdar.org/archiva]. You can also add maven repositories to Archiva as a proxy connector, which will keep our pom.xml simpler.
{note}

h3. Resources and Links

h5. [Hadoop+HBase vs RDBMS | http://www.docstoc.com/docs/2996433/Hadoop-and-HBase-vs-RDBMS]
h5. [Development Infrastructure]

h5. Struts 2: [http://struts.apache.org]

We are currently using Struts 2.1.6 2.2.1 as the web application framework. More information about the Struts implementation can be found at the [tDAR Struts Documentation Page|Struts Documentation].
* A quick primer on the web technologies used by struts: [http://struts.apache.org/primer.html]

* [http://struts.apache.org/2.x/docs/performance-tuning.html]

h3. Massively parallel data stores

* [Hadoop+HBase vs RDBMS |http://www.docstoc.com/docs/2996433/Hadoop-and-HBase-vs-RDBMS]
* [Hadoop applicability |http://www.cloudera.com/blog/2009/05/5-common-questions-about-hadoop/]
We should look into Hadoop for ideas about scaling data integration and/or representation of datasets

h3. Other documents and miscellany