Rong and others,
my feeling for the way we should be going here is as follows. In the medium term (say by mid-year), we should aim to have:
- RM & AM upgraded to Release 1.0
- all test cases up to date and working
- contracts in all the code. (See below)
- potentially some changes to the general design of the core classes
In the short term, what we need is to have the classes upgraded in the current programming style to Release 1.0, with the test cases upgraded as well. We can do this at UCL in a few weeks if the rest of he team agrees to the idea. To actually do it, it means doing the following in Subversion:
-
declare a tag called “Release-0.95” of the current TRUNK(you can choose other names if you want - even funny ones, this is just my default suggestion - to follow the release numbering of the specification project for now).
-
declare a branch of the same name. This is where work can be done for bug-fixes and so on of this release into the future. All users of the current system take their builds from this branch. Minor releases are declared with tags as necessary.
-
the TRUNK then becomes the current line of work.
-
when the TRUNK is more or less at a stage of being Release-1.0 compliant, a Release 1.0 branch is declared, and it is tested and declared with a tag. The it can be maintained on its branch, just as the 0.95 version is on the first branch.
There are other strategies, but I think this is the best one for the team at the moment - it allows multiple simultaneous releases to co-exist.
Now in the medium term, a change in coding style that I want to convince the team to use is “Design by Contract”. This radically improves the quality and readability of the code and documentation, reduces bug-diagnosis time to almost nothing, and makes the delivered system safer. However, it will be a cultural shock to those who have never heard of it, so I don’t expect to convince you of it in 5 minutes. The theory of Design by Contract (DbC) is simple, and is based on thinking as far back as the sixties by Djikstra and others (back in the dark ages;-). In the last 15 years it has been used in various forms in VDM, Z, B and Eiffel. I have used it in Eiffel since 1989, and you will notice that we have it all throughout he openEHR specifications. The OMG has now finally gotten on the bandwagon, and OCL is the language it has created for this same purpose.
To learn about it, there is no better source that Bertrand Meyer’s Object-Oriented Software Construction 2nd Ed. This is the bible of object-oriented programming. If you don’t have a copy, you need to get one! Design by contract is described in about 70 pages, chapter 11. After that do some google serarches and you will see how much activity there is about it. C# will have it completely in the next or following version; there is already a spec# project based entirely on the idea.
The leading candidate for doing it in Java seems to be JML - Java Modelling Language. See http://www.cs.iastate.edu/~leavens/JML/. Have a look - there are many poeple and universities behind this, and the approach seems very solid. One of the designers is an Eiffel expert, so the approach looks quite like Eiffel (all languages will become Eiffel eventually;-). But syntactically it is all comments, processed by a pre-processor that generates an extra .jar.
Now…in practical terms, putting this into the existing code base would take time and involve some redesign (it will actually reduce the number of lines of code), so I am not suggesting doing this right now. Also, JML is not quite up to date with Java 1.5. So - some food for thought here. What I would hope to see is that the team gets acquainted with DbC, and decides to use it - I don’t want to force it!
There are other design issues, that Yin Su will talk about.
But the short term decision to be taken is: will we create the branches as above, and start work on the Release 1.0 upgrade?
- thomas