Hello all,
I tried to workout the plugin/ module idea for the application
and I made a version 0.0 with it. The code should show the
setup of the modules, and an example for two modules: the
user interface and the import module.
I have put the source code in separate directories.
Directories:
* datamodel : this contains the internal datastructure for our
genes information. The implementation of the Person
class is only meant as dummy, and should be replaced.
I still don't like my own class names, so if somebody
has better ideas, let me know !
This module does not depend on other modules ...
For the PersonInfoList we should implement the observer
pattern ...
* genesCore : this contains some base classes for the modules +
the application class which glues all modules together
This module only depends on datamodel
* test : this module has an example/test implementation for two
modules.
* glade1 : A first glade based user interface. this directory is
empty, but I will make an implementation which has
the same functionality as the SimpleUI class
* tools : empty: this should contain classes for the widgets
modules
Modules
* Datamodel : we should also split it into a base class and
implementation,
so that another implementation is possible.
(for example for an approach where not all the data is
loaded in memory at the same time)
* Import : Module for reading from xml, database X, database Y,
gedcom, ...
* Export : Module for writing output: database X, flat file,
postscript
file, txt, xml, html...
* UI : user interfaces ...
* Tools : Widgets, algorithms, scripting plugin ?, ...
The idea with user interfaces is that they should not be necessary:
If genes is started without an interface, it can be used for batch
processing, for converting files, ...
Some coding rules I followed:
* Class names start with a capital
* variables start with small character
* members end with an underscore (this improves readability of
sources)
* I used "@TODO" and "@REMARK" marks in the source code.
these strings are normally not used for anything else, and thus,
somebody can easily do a grep on all sources to see the remarks and
todos
Some remarks:
* What is a better name for the GenesInfomodel class name ?
* We should use the "command" pattern for the tools module
* We should use the "observer" pattern for the PersonInfoList class
(if the infoList changes, all subscribed listeners can update
themselves)
* The Makefiles should be reworked
* The module names should be centralized in one include file ...
These are used for retrieving the correct module from the
application
* the Glade userInterface will follow some days after christmas ...
tgz file can be found at:
http://www.sesuadra.org/~gvtienen/genes/genes_v0.0.tgz
Send me all your comments, ...
Geert
ps Sean,
Can you update the directory structure in CVS and move the files, then I
will
checkin my code ...
--
----------------------------------------------------------------------
- Geert Vantienen http://chat.sesuadra.org/ -
----------------------------------------------------------------------
_______________________________________________
Genes-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/genes-devel