I am trying to help my friend by creating a part of his on-going project.
What I’m going to do is create a Java parser to break up the Java code into operators, parameters etc to build XML representation.
Next I want to create a code generator to convert the parsed java code to XML conforming to the schema I’ve created.
Finally I want to use an XML style-sheet to transform the XML into another programming language type.
Basically I just wanted some advice on which methodology/model I should use for planning and developing this project. Is there some benefit to using Agile etc for instance?
10
Since you asked for methodology, I can give you one tip on this kind of programming project. Use unit tests. A LOT of unit tests. You should be spending several man-months writing unit tests.
What I’m going to do is create a Java parser to break up the Java code
into operators, parameters etc to build XML representation.
On its own, this represents at least one question on programmers.SE.
Next I want to create a code generator to convert the parsed java code
to XML conforming to the schema I’ve created.
On its own, this represents at least one question on programmers.SE.
Finally I want to use an XML style-sheet to transform the XML into
another programming language type.
This is a book, not a programmers.SE question.
4
Rather than use XML here why not reverse engineer the language translation from the byte code. That is a much more flexible intermediate format.
Be warned, what you are attempting to do here is extremely hard.
Usually it is cheaper to hire an expert in the target language to rewrite the code. And for that you will need tests. Lots of tests.
As all other answers said, your problem is really hard. But since you asked for a methodology, that questions is easier to answer.
First of all, the methodology you use depends a lot on the organization you are in. Some organizations simply follow waterfall development methodologies (i.e Military) and there is nothing you can do. On the other end there are organizations that only develop projects using agile methodologies. You must take this into account before taking any decision.
Second, agile methodologies are being used more and more these days because they produce better products (although there is no clear scientific evidence of this, most project that have moved to agile are very happy after the change). I would also recommend agile development (short iterations, working product, automatic tests, etc…). You can mix this with TDD to get more robustness, but it is not a must.
Last, but not least, even if you are doing agile, you still need to define your requirements in an exact way. Agile is NOT a synonym to not having defined requirements! it means that you implements the requirements step by step. With the complexity of what you are trying to achieve, you MUST define your requirements very well. If you don’t have good requirements not event testing will help you (sorry for repeating myself, but I find this is a very important point).
And good luck.