[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-kuml-devel
Subject:    Re: framework for code generator
From:       Sebastien BROCHET <sebastien.brochet () tecsi ! com>
Date:       1999-11-26 13:37:38
[Download RAW message or body]

> Here we are:
> The Codebase class is just a place holder for some class from which the
> CodeGenerator can access the information about the uml classes
> All language specific generators are derived from the CodeGenerator.
> One has just to instantiate a new <XYlanguage>Generator, set the
> parameters and call createCode(). Everything else is handled from the
> Generators.
> These call the codebase to get the information about the drawn classes
> and make code of it.
[snip]
 
For what I understand, the code generation can only be done
inside/through kuml, inherited a class and customizing it to your
favorite language amd code habits.
Now, let's have a look on how others deal with this issue:
With ROSE, there is a script interpreter that run a dedicated script
that access the UML data and generate the code.
The bad news are that the script language is proprietary and that it is
only available in compiled form.
With another one, the script language is TCL and the script source is
available for customization.

Using an embeded script interpreter in this case is very flexible to
generate any kind of file (code, html, text, ...).

I don't say this is the way we should adopt, but what I lack the most in
ROSE in the code generation area is the C++ code script source to adapt
with javadoc-like comments.
What also doesn't please me is the garbage addded by these tools to
allow reverse engineering of the generated code.

I don't want to start a religious war here ;-) but what about some
architecture design to handle the file generation outside kuml, such as:
- Plug-in usage (dynamic lib with some configuration file).
- Some parts of kuml acting as a CORBA server (I can detail more if
needed).

Once again I'm not advocating a big architecture re-design and kuml is a
fun project as-is.

Comments, flames ?

-- 

/Sebastien

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic