Development information

All documentation that is needed for the BASE developer.

Contents
  1. Specifications
  2. Implementation overview
  3. Coding rules and guidelines
  4. Plug-ins
  5. Running BASE in the subversion tree
See also

Last updated: $Date: 2009-04-06 14:52:39 +0200 (må, 06 apr 2009) $

3. Specifications

a) Initial technical specification
Explains why we want to develop BASE 2 from a technical point of view. It includes a short background of the problems with the current implementation, and discusses one technical solution that may solve the problems. It ends with a list of work items with issues that needs to be investigated during a prototype phase.
b) Preliminary list of features
A preliminary list of features wanted and/or required in BASE 2. Compiled by Carl from various sources.
c) Specifications for the core
The original specifications for BASE 2. Changes during the development has been clearly marked. Our goal is to keep the specifications up to date with the actual implementation at all times.
d) Specifications for the web client - TODO
e) Specifications for the migration tool

4. Implementation overview

The overview documentation is intended to give just an overview. Detailed information can be found in the javadoc.

a) Schematic overview of BASE
An overview of the design of the entire BASE application. This is a good place to start reading.
b) Database schema and data layer API
Complete information about the database and data layer. The schema is divided into several sections, each describing a particular part of the system. I.e.. user management, files, biomaterials, etc.
c) Internals of the core API
An overview of the classes in the core that are used for things like user authentication, permissions checking, transaction handling, data validation, batch processing, quota checking, plug-in execution and job queue management.
d) Queries and the query API
An overview of the Query API and how queries are generated in cooperation with Hibernate. Here is also information about the core classes that are used to execute and deliver the result of a query. This document can also be useful when building queries.
e) Dynamic API for experiments and analysis
An overview of the Dynamic API, including how the tables are created in the dynamic database, how data is inserted into those tables and how the queries that selects data from the tables are working. This document is also useful for plug-in developers.
f) Exceptions - TODO
An overview of the exception hierarchy.
g) Utility classes - TODO
Some more or less generic functionality have been placed in publicly available classes.
h) Web interface - TODO

5. Coding rules and guidelines

a) Development process
A document describing how to organise the development, covering the analysis and design, implementation and test phases.
b) General coding style guidelines
Generic rules that apply to all code unless some more specific rule exists. It contains information about naming conventions, code formatting, etc.
c) Data-layer rules
Rules for classes in the net.sf.basedb.core.data package This is a very important document that includes many details about how we map out data to the database with Hibernate.
d) Item-class rules
Rules for all classes that extend the net.sf.basedb.core.BasicItem class. This is a very important document that includes many details about permission checking, transaction handling, data validation, etc.
e) Batch-class rules - TODO
Rules for classes that extend the net.sf.basedb.core.BasicBatcher class. This is a very important document for all classes that must handle a lot of data in a single transaction, for example reporters and raw data.
f) Web interface rules - TODO
g) Test class rules - TODO
h) Procedures - TODO but here is an important one.

When a database schema change is needed this must communicated through the table SchemaVersion. The Install.NEW_SCHEMA_VERSION counter must be increased (by hand!).

The class Update.java contains the method updateDatabase that should be changed to reflect the changes. The change should be documented in this class.

6. Plug-ins

a) How to write plug-ins
Document describing how to write a plug-in for BASE 2.
b) Plug-ins for importing data
How to create a plug-in that imports data.
c) Authentication plug-ins - TODO
With an authentication plug-in you can use any external source for authenticating users when the log on to BASE.
d) Analysis plug-ins
Information that is specific for analysis plug-ins.
e) Secondary file storage

7. Running BASE in the subversion tree

a) Building BASE
Document describing how to build BASE from a local working copy of the subversion checkout.