Instant JChem Developers guide

Overview

We are currently in the process of generating documentation for parties wishing to integrate with or to extend Instant JChem.

The primary intention here is to allow customers and 3rd party developers to extend Intant JChem and to build higher level functionality on top of the core functionality. We hope that doing this with IJC will be realtively painless, as IJC will provide much of the basic functionality needed, and the hooks for extending it with new datatypes. No longer will the chemical spreadsheet need to be re-invented yet again, you would be able to use the form builder (possibly with your own custom view widgets) and you will not need to worry about things like persistence, security or import/export. Instead you will extend IJC by adding any data types that might be specific to your needs, and then build an application on top of these basic datatypes and tools.

Currently IJC is under very active development, and the APIs are not fully stable and not really suitable for use by third parties. We expect the APIs to become more stable during the the 2.x releases.

However, we feel that providing early access to the developer documentation (mainly the JavaDocs) will be helpful as it allows an early stage preview and allows plans to be made and questions to be asked. We do already have some external developers using the APIs for their own extensions to IJC. If you wish to do this we suggest you discuss your needs on the IJC forum first to find out whether these needs are already planned for IJC, and if not to get advice on the best approach to developing your extension.

IJC architecture

Instant JChem essentially has 3 different layers.

  1. The DIF model and persistence tier
  2. The core IJC application (based on the Netbeans platform)
  3. Modules that add functionality to the core application

IJC architecture

To extend IJC you would primarily create additional modules that provide the application logic and UI, but you may also add new capabilities to the DIF tier, such as new data types.

Whilst the 2nd a 3rd layers are based on the Netbeans platform, the DIF layer is not dependent on it (it does use some Netbeans libraries, but these are generic libraries and can be used outside the Netbeans platform). This makes the DIF tier suitable for creating non-Netbeans platform based applications, such as a web application or an alternative Swing based application.

To use the 2nd and 3rd tier you should get a good understanding of the Netbeans platform. Note: you do not need to use the Netbeans IDE to work with Instant JChem or DIF, but it does provides some useful features for developing Netbeans platform based applications, so you may wish to look at this if you are not already a Netbeans IDE user.

JavaDocs

Instant JChem is composed of many modules (currently approximately 25), but many of these contain only 3rd party libraries. The number of modules that need to be used for extension is relatively small. JavaDocs for these key modules is being prepared. Not all are currently ready. The most important module is the DIF module that defines the lowest tier mentioned above.

Please note that the stability differs for different parts of these APIs. We try to indicate this in the JavaDocs.
All these javadocs are linked together and reflect the module dependencies.

Important: Instant JChem API changes are described in a separate page.

API Examples

Sources of some examples of Instant JChem APIs usage you can find in this zip file. This module (nbm) is already installed in standard IJC distribution. To see these examples running go to menu Help -> API Examples.

The following API examples currently exist:

Add field example
Simple example of reading values from a IJC table and writing some generated output as a new field
Renderer example
Simple example of plugging in a new type of renderer. This one colours the cells in the grid view based on some user specified cuttoff value.
Compute values example
Simple example of adding an action that reads values from the grid view selection and calculates averages or sums.

We welcome comments and feedback.

Copyright © 1999-2009 ChemAxon Ltd.    All rights reserved.