The components represent OSGi bundles or Eclipse plugins, as appropriate.
- gaikokugo.common contains common classes used throughout and exposes no services. Right now it contains a single class; GaikokugoException, which is an unchecked exception that can be used to wrap checked exceptions or thrown when it is unreasonable for the application to cope with the current situation or checked exception.
- gaikokugo.rcp is the UI part of the application, an Eclipse specific plugin. All of the UI code is in here at the moment. This may change and I'm already considering adding an extension point to allow a re-usable Exception handler to be plugged in to handle the unhandled exceptions and report them back to me via email, or directly in to buzilla, etc. This is likely to be a seperate project and an extension point is probably not even required, now that I think about it.
- gaikokugo.db is a standard OSGi bundle that exposes the persistence interfaces for the application. One of my goals for this application was to avoid having to have the user "save" their work as they went along, so my design forces the implementation of the db to be persistent throughout. I do talk in terms of database, but the GaikokugoDBService's only method is to open a file on the filesystem. How this file is read and written is up to the persistence implementation.
- gaikokugo.db.db40 is a persitence implementation based on db40 and registers itself as an implementation of the GaikokugoDBService interface exposed in the db bundle. I was using the db40 OSGi bundle, but I just couldn't work out what benefits it gave me over included the libraries in the bundle itself and I had problems getting Eclipse to detect it as a plugin. Anyway, all of the implementation code for the db is specific to db4o in this bundle, so no problems with classloaders or anything like this.
- gaikokugo.db.db40.test doesn't yet exist, but will contain unit tests for the db40 implementation. This will most likely be executed using ProSyst's Test Platform... but even though it is excellent it isn't a free piece of software, so I may build my own OSGi based unit testing framework.
- likewise gaikokugo.rcp.test also does not exist, but envisaged having UI unit tests in this bundle, as well as an implementation of the db bundle specific to the UI tests. Not sure how I am going to do this yet, but I believe it is possible to hook in to the UI programmatically in order to simulate user activities.