Hello Mark!
The argoprint project has the purpose of developing a tools similar to the
report generator in SoDA. It has proved not to be an easy task.
In the first attempt, performed by a student group, we had a custom-made
template language calling functions within ArgoUML to retrieve data.
In the second attempt, performed by Ion Savin in the Google Summer of Code
2006, we had XSLT scripts to do this. I guess the evaluations made by Ion
Savin could be examine to get the feeling what is required also for
generating code.
I think the problem with the report generator is that the challenge for the
person writing the template is too big. He needs to know:
- All details of the UML language and how they are applied in the current
project.
- All details of the generated output (in argoprint it is docbook or
html, for php it would be php-code).
We need something to reduce this complexity. The choice of template engine
and language (Custom make, XSLT, Velocity, JET, StringTemplate, or any
other) is secondary to this problem. When we continue working with such
template generators, we should choose the one with the best tools to develop
templates. I think we need a tool where you have ArgoUML with your model,
the template you are developing, and a scrollable and browsable wysiwyg view
of the result from the template (or the output from a compiler compiling the
PHP-code) all opened side by side, the model and template editable.
Another direction for code generation is the AndroMDA work. Is there
AndroMDA models for PHP? I guess then there are constraints on how the UML
model is created.
/Linus
2008/5/14, Mark Fortner <[EMAIL PROTECTED]>:
>
> I'm curious if it's possible to create user-accessible, modifiable
> templates? If so, this would address both the user's need for some control
> over class generation, but would also allow other users to generate unit
> tests, and documentation from the existing model. The latter use case is
> similar to Rational Rose's SoDA functionality.
>
> I know that the existing templates (.tee files) are packaged up into the
> argouml.jar. If these were accessible from a directory like (perhaps the
> argouml/templates), argouml could load the templates from this directory at
> startup.
>
> In general though, a more standardized templating mechanism like Velocity,
> or FreeMarker would be more easily understood by the average user. This
> might be a enhancement for a future release.
>
> Regards,
>
> Mark Fortner
>
> On Tue, May 13, 2008 at 2:30 PM, Linus Tolke <[EMAIL PROTECTED]> wrote:
>
>> Hello Patrick!
>>
>> You are most welcome to join the work with the module to improve the php
>> module by making this configurable or making other improvements. Alas, it is
>> written in Java just as the rest of ArgoUML.
>>
>> /Linus
>>
>>
>> 2008/5/7, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
>>
>>>
>>> Hi,
>>>
>>> Regarding php5 code generation,
>>>
>>> I would like class names not to contain the package names separated by
>>> underscores , this lead into really unmaintainable source code like in this
>>> little example :
>>>
>>>
>>>
>>> ...
>>> class core_kernel_classes_ApiModelOO
>>> extends core_kernel_classes_ApiI
>>> implements core_api_classes_ApiModel
>>> ...
>>>
>>> new core_kernel_classes_ApiModelOO()
>>> ...
>>>
>>>
>>>
>>> Have you any workaround, hint to this ?
>>>
>>> This problem has already be reported by someone else wioth no answer:
>>> http://argouml.tigris.org/servlets/ReadMsg?listName=users&msgNo=3664
>>>
>>> thanks,
>>>
>>>
>>> Patrick
>>>
>>
>>
>
>
> --
> Mark Fortner
>
> blog: http://www.jroller.com/phidias