[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[News.eclipse.technology.mddi] Re: Accelo

Markus Voelter a écrit :
how can you generate any useful code if you cannot navigate/query/select
the model? from our our perspective, you also need features such as template
polymorphism as well as aspects on template level to be able to keep the
complexity within reasonable bounds when the generator grows.



I do agree with you and I am sorry if I did not make myself clear, but Acceleo do provide ways to navigate the model through query and select services. Acceleo also deals with templates polymorphism and inheritance.


Acceleo also deals with incremental generation allowing final users to add code within the generated files without loosing it when generatingagain.

that's a feature that basically all code generators support. I think, however, that encouraging this way of mixing generated and manually written code is not a good idea, it creates all kinds of versioning nightmares.


I agree with you, you have to be careful when mixing manual and generated code, and Acceleo tries to make sure that no code is lost and to alert the user in such a case.
Ideally it is better to separate manual and generated code, but what we also try to do is to generate things the same way is as if it was written by hand. Basically we try not to disturb the target architecture just because we use a code generator.


Finally, Acceleo has a chaining system making it convenient for developers to apply several templates on models.

What is a chainign system? Can't you simply call templates from other templates? Can you elaborate?

Definitely, you can call templates from other template, but this is not what I was talking about here.
The chaining system is the glue you will use to package all your templates. For example, if you have written extensive templates for several layers on a J2EE architecture and deliver them to the development team, all they have to do is to right click on those chains and several templates will be generated from several models. To summurize, this similar to an ANT task dedicated for generation.



eAllContents("Class").select("name.endsWith('EJB')")
enables you to work on all classes ending with "EJB" string for exemple.

the condition itself (name.endsWith('EJB')) is passed in as a String, right? So your editor cannot provide support?

Yes you are right, this is not supported yet.


Acceleo may not be designed to answer all needs, so I believe it can be very convenient and do nice things, but you may find it notappropriate if you have extensive needs for model navigation.

Again, how can you generate code if you can't conveniently navigate the model?

I think maybe the best thing to do is for you to try it to make your own idea of how convenient it is to use Acceleo. Especially if you are experienced with other tools, it would be nice to have some comparisons so that we can improve Acceleo user experience.


Cheers
Stephane

Markus

--Markus Völter

voelter - ingenieurbüro für softwaretechnologie
Ziegeläcker 11, 89520 Heidenheim, Germany
Tel. +49 (0) 171 / 86 01 869
Email: voelter@xxxxxxx

Web: http://www.voelter.de
Blog: http://www.voelter.de/blog
Podcast: http://www.se-radio.net

PGP Public Key: http://www.voelter.de/data/MarkusVoelter.gpg