Skip to: Site menu | Main content

XPlanner

Planning and tracking tool for agile teams following XP or Scrum

Development standards Print

Standards

Coding standards

There are described in subversion at <root>/xplanner/docs/html/developers/index.html.

The IDEA project file has the correct coding standards already set.

Design standards

See Good design

XPlanner design patterns/idioms

Injection dependencies (spring framework)

We use the spring framework to

  1. Reduce coupling
  2. Increase class coherence and decrease their size (natural application of Single Responsability & Interface seggregation)
  3. Increase testability

Page arguments

  • Each page has a main object, the target. The id of the target should always use the oid parameter in the request url.
    /do/edit/task?oid=231


    Rational: this is equivalent to the this reference of java objects. Any operation can assume to find the target id through this request parameter

Exception handling

STANDARD Exception handling

Development standards

Testing

We rely heavily on testing to ensure sustainable quality of the project. Any new feature is supposed to introduce both unit tests (things are implemented right) and acceptance tests (we implemented the right things). Both set of tests will become our first line of defense to make sure that no regression are introduced as we change the software. This is even more important since it is a open-source software developed with many resources distributed across the world.

A test is not a unit test if:
  • It talks to the database
  • It communicates across the network
  • It touches the file system
  • It can't run at the same time as any of your other unit tests
  • You have to do special things to your environment (such as editing config files) to run it.

Instead all external resources should be mocked (using spring makes this easy).

Reference: Michael Feathers's definition

Run targets/Test suites

The build has 2 targets: unit.tests and acceptance.tests

  • unit.tests should only include unit tests and run very fast. We are looking at a fast feedback here not accurate feedback (acceptance tests do that)
  • acceptance.tests include every "slow" tests from integration tests to full acceptance tests

There are 2 junit test suites that correspond to these to be used inside IDEs: TestAllUnitTests and TestAllAcceptanceTests

Naming conventions

  • The unit tests follows the following naming pattern
    src/com/technoetic/xplanner/util/MyUtil.java src-test/com/technoetic/xplanner/util/TestMyUtil.java
  • Acceptance tests are located under src-test/com/technoetic/xplanner/acceptance and follows <test>TestScript.java naming pattern.
  • Performance tests are located under src-test/com/technoetic/xplanner/performance and follow <test>PerformanceTest.java naming pattern.

Use of todos to mark things to do

Any smells, bugs, inefficiency... that a developer finds but does not have the time to remove should be annotated with a TODO tag. A TODO tag is a comment in the syntax appropriate to the language of the file that will start with the tag followed by a description:

// DEBT: rename m to something more descriptive
public int m() {
   return 0;
}
Tag Regex Purpose
TODO \btodo\b.* General task
DEBT \bdebt\b.* Refactoring that are yet to be done
FIXME \bfixme\b.* Bug or missing features that should be fix ASAP

Agile database management

See STANDARD Agile database management