Skip to content
overnin edited this page Sep 7, 2011 · 54 revisions

Welcome to the frontlinesms2 wiki!

Resources

Workspace Setup

This section is based on a window7 setup experience. It should be edited from a linux and Max point of view.

Required softwares

  • JVM JDK (32bits)
  • Git
  • Grails (optional if using SpringSource Tool Suite - STS)

The Setup

The team hasn't find the perfect tool yet. So each developer is using different tools.

Option SpringSource Tool Suite - STS

You need to download and install STS (32 or 64 bit). Once it's done, install the additional extension from our dashboard: Grails (current production release), Grails Support and Groovy Eclipse. STS can also be integrate with JIRA task repository. No need to add any dependencies, it's already installed. Just follow those steps (note that the task are under Mylyne view).

Now get the sources from Github and 2 dependencies:

  • frontlinesms2
  • caml-smslib
  • hayescommandset-test

To import this project in STS, the process is not clean due to some files are missing. The current work around is to create a new FrontLineSMS grails project. Then copy past all the file in this folder.

Run > grails run-app

Issues

  • "fail maven test": you need to clean the .ivy2 cache in your home directory by deleting everything
  • "Multiple Compilation Errors Exception": the source dependencies are not found.
  • "Assertion Errors": you may use a 64bit JVM. Download and use the 32 bit version.
  • "Loading error while frontlinesms service is starting, the error is a NullPointerException": this error has not been solve yet. issue reported in JIRA. This error is not consistent and will probably disappear next time to start the application.

Source Control

All story and bugfix development should be started on a new branch. Branch name should be the JIRA ticket number which you are working on (e.g. CORE-123). Branches should only be merged with master when the story is complete and all tests pass.

Commit message format [#Jira-number] - Developer name - Description about the work.

master branch

The master branch in the github repository should always build and pass all tests.

Code Style Guide

File encoding

Text files should be saved in UTF-8 format unless there is good reason to use an alternative format.

GSP/HTML

  • DOM ids in gsp files should be all lowercase with words seperated by dashes: e.g.
<div id="sample-id"/>
  • param references in GSPs should be done using .key notation in preference to ['key'], i.e. <g:if test="${params.messageInstance}"/> is good; <g:if test="${params['messageInstance']}"/> is less good.

Indentation

Tabs should always be used in preference to spaces when indenting code.

Grass Plugin & Compass CSS Framework

CSS Markup is controlled via the Compass framework. We are using a modified version of the Grails Grass plugin available from https://github.com/alxndrsn/grass. The compiled binary is available from the FrontlineSMS Maven repository http://dev.frontlinesms.com/m2repo/org/grails/plugins/grass.

UX

Lists

When displaying a list for the first time (e.g. contacts list), ensure the first item in the list is selected if none other is specified.

#Continuous integration ##Startup sudo su jenkins

/usr/bin/daemon --name=jenkins --inherit --env=JENKINS_HOME=/var/lib/jenkins --output=/var/log/jenkins/jenkins.log --pidfile=/var/run/jenkins/jenkins.pid -- /usr/bin/java -jar /usr/share/jenkins/jenkins.war --webroot=/var/run/jenkins/war --httpPort=8080 --ajp13Port=-1

##Firefox display Firefox display is simulated by Xvfb.

Xvfb -ac :99 //Sets the display to run on port 99

export DISPLAY=:99 //Tells firefox about display.

Clone this wiki locally