DavidRumins: towcker13

File towcker13, 2.4 KB (added by johnstod, 12 years ago)

WCKER: improved commenting, structure and documentation

Line 
1
2Latest "Tidied" WCKER Version
3=============================
4
5The version of WCKER just checked in ( 12/02/05 ) has been tidied-up
6and comments have been added at the request of Dave B. Hopefully, this
7should make things easier for multi-person development. If you feel
8any particular bit of additional tidying/commenting would be helpful
9then let mw know.
10
11In fact I've taken the opportunity to object-orient (OO) the code a bit
12more ... which is a natural way of tidying things up in Java.
13As I mentioned to Tjitske there is a good argument for saying that OO
14is a process rather than a state.
15
16OO Activities
17============
18
19OO tidying mechanisms include:
20
21        * making static code non-static
22               
23                basically instead of there being just
24                one permanent instance of code (i.e. static code)
25                it is automatically associated with
26                a dynamically created object instance (and
27                thereby has access to data items related to
28                that specific object).
29
30                A "naive" but "revealing" way of restating this is
31                to say that OO code can reduce the number of explicit
32                parameters used.
33               
34        * introducing inheritance
35
36                our WckerCache class is a natural extension of
37                Java's LinkedList class so I inserted explicit inheritance.
38                The effect was a beneficial simplification of the code.
39
40                Unfortunately many of the SWT classes are designated as
41                final, which bars them from being inherited from.
42                Security arguments are involved ... but non-final classes
43                would have allowed me to object-orient WCKER much more.
44
45Javadoc
46=======
47
48I have been commenting using the "javadoc" conventions where appropriate.
49javadoc is a tool which extracts documentation from java source comments.
50
51I have a little script "javadoc.run" which will generate the javadoc documentation
52for WCKER under Linux. This is in the "ant" directory. It would be worthwhile
53having a Windows equivalent, if this does not exist at present.
54
55Following the overall project philosophy, the javadoc documentation should
56really be generated by "ant" so this is something we might want to look into.
57
58The problem with "ant" is that there is always a double learning curve: one
59first has to learn how to use a tool (such as javadoc); one then has to learn
60the appropriate XML tags to use within an ant file to capture the same actions!
61
62A brief net surf did NOT reveal what these tags might be for javadoc (if they
63indeed exist). Of course one could try to go native with javadoc within ant
64i.e. use system-level calls in the way one does in a makefile.