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

List:       kde-kuml-devel
Subject:    Re: framework for code generator
From:       Jake Fear <fear1 () home ! com>
Date:       1999-11-30 15:52:56
[Download RAW message or body]


> 
> Ok, let's redefine and soften it up:
> What I got in mind is a KUML which is integerated in the workflow of
> reading in some source, changing the design and then writing it out
> again, possibly with reusing the old and unchanged parts of the code.
> This saves your time for coding of the new parts of the design and other
> importand stuff. If you just write out the templates out of a database,
> you have to rewrite or copy/paste the source to fill the generated stubs
> with life. Copy/paste or rewrite costs you time, which you could have
> done by your machine. If templates can serve this, fine by me

I like the idea of reusing source, however I do see difficulties in defining a
ruleset for that kind of behavior that makes it clear to the user what is going
to be done to their source when they generate using KUML.  Now, the idea of
templates is intended to create COMPLETE code, not stubs, not skeletons, but
ready to run classes.  Of course, you still have to write the templates.  As
far as recursive sturctures, this will just depend on richness of the
chosen/created template language.   Just to make things clear, here is the data
flow for the template method I mention.

-----
| UML |------------->|------------|
-----                            |                        |
                                      | Code generator |--------- Source Code
---------                    |                        |
|Templates |---------->|______________|
---------

The templates are sepperate entities that express reusable patterns.  The
generator replaces tags like <ClassName> with the real name and uses similar
techniques to build methods etc...  I am not the author of the system, but I do
use it on a regular basis.  I will need to study the templates in detail to
fully understand the basic mechanism. Unfortunately, the source for the project
is not available.

Cheers, 
Jake

> cu,
> Joerg
> 
> --
> THE one and only full automatic Planets web hosting service
> :-)                            http://www.planetsserver.com
-- 
Jake Fear

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

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