University of Munich / Departement of CS(Informatik)
2) Implementation: Source code management
DPT-philosophie: the source code management will be done by application and
not by generator-beans, bacause only the application has knowlege and information
of original or working- source location, state, volume and dependencies...
DPT will operate only on copy of original source, because this is a "clean way"
to separate between source to be build/run and source to be transformed.
(Note the difference: transformation-source must be allways correct!)
Context
1) No requirements to location of the source code
2) DPT works on copy of the source code(working code)
3) Working code have to be allways correct(no syntax error)
4) Working code have to be allways up to date(with source code)
5) After each transformation source code have to be uptaded
6) User have to be able to "undo" and "redo" the transformation
7) Working code and source code have to be in stable state(state machine)
8) Code-management have to be of course fast and user-friendly!
9) What else?
1) No requirements to location of the source code
2) DPT works on copy of the source code(working code)
Problem: No requirements to location of the source code
DPT-Solution: let user specify his source files.
And copy files in /src directory of the project!
Via Add/Remove file dialog DPT will copy all necessary files
to /src directory of the project.
Real(original) file-location and date of the working copy
will be stored in fat.ini -file of the project.
fat.ini= File allocation table for DPT-project:
a) absolute path to root (change via add / remove files):
C:/Projects/root/proj1
b) absolute path to Myproj2( static):
C:/Projects/root/DPT
c) list of relativ path to root + filename + date:
/v1.0/src/Conn/conn.java 10.10.1999
/v2.0/src/GUI/dlg.java 10.12.1999
/beans/src/sql.java 30.01.1998
/beans/src/tool.java 30.01.1998
3)Working code have to be allways correct(no syntax error)
Problem: The working code and and symbol Table have to be allways correct.
DPT-Solution: Only correct source will be added to project.
Add/Remove file dialog
step 1: new source-file will be checked of the correct syntax with parser1(Syntax-parser)
step 2: if new file is fine, we will update Symbol Table with parser2(Symbol Table)
Open project / before Transformation:
DPT-Tool will verify, that project-files are up to date, if not, they will be updated
step 1: all updated source-file will be checked of the correct syntax with parser1
step 2: if all updated files are fine, we will update Symbol Table with parser2
After Transformation
step 1: modified source-files will be checked of the correct syntax with parser1(Syntax-parser)
step 2: if they are fine, we will update Symbol Table with parser2(Symbol Table)
4) Working code have to be allways up to date(with source code)
Problem: After user changed the source code, DPT have to update its working code
DPT-Solution: fat.ini will store the date of the last change in the source code
When to check/update: Open project, before Transformation, uppon user request(Update files).
While update procedure DPT will check files for correct syntax.(see 1.3)
all updated source-file will be checked of the correct syntax with parser1
if a error occurs we will show this problem to user
and keep the old version of file(and mark it in fat.ini)
I think more topics for this problem are comming up!....
5) After each transformation source code have to be uptaded
Problem: DPT has to give the user a chance to build source code after transformation
DPT-Solution:In the history.ini DPT have a list of affected files, which need to be copied
to there original location. Then user can build his new code and test the functionality.
When to check/update: After Transformation, after "undo" / "redo" - Action
I think more topics for this problem are comming up!....
6) User have to be able to "undo" and "redo" the transformation
Problem: User may will be unhappy with the behavior of the his program after
transformation of code. DPT need to give user a chance to "undo" / "redo" the transformation.
DPT-Solution: Copy of files, which was choosen to be modified.
DPT will store info‘s in history.ini
Note: this part is about the modification of existing source files!
Example: Start Transformation
File sql.java was choosen to be modify - copy this file to sql.j1(if exist to sql.j2)
Transformation start->end, DPT will write new sql.java to original source location.
sql.java(org) -->sql.java(work)--->sql.j1
User build his application, tried it and deciede to "undo" the thransformation->
In this case DPT will copy sql.java to sql.j1%(e.g. sql.j2%) for "redo" an then it
will copy sql.j1(e.g. sql.j2) to sql.java and to original source location.
sql.java(work)---> sql.j1%
sql.j1 -->sql.java(work)---> sql.java(org)
7) Working code and source code have to be in stable state(state machine)
8) Code-management have to be of course fast and user-friendly!
Problem: user friendly? Fast enougth?
DPT-Solution: No Informations at this point, but if it will be to slow we can cache something!
9) What else?
Last Modified: 30.12.99
1999 Alexej Kupin. All rights reserved!