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

Hi,

Please find some answers below :

Sven Efftinge a écrit :
Etienne Juliot schrieb:
We are using a template language dedicated to model browsing. So, navivation and manipulation are easier with this tree-like syntax (exemple : iterate over a collection or go into a nested element are natural).
Easier than what?
What do you mean by this and that "is natural"?
From what i have seen, the "model browsing" in acceleo is reduced on calling features of the respective model elements, isn't it?
What is the "tree-like" syntax about? examples?

In term of syntax, Acceleo is part of the same tool generation as oaw or MOFScript. So the tree like syntax is the ability to navigate through the model by browsing features (attributes and associations) as you said but also to chain them with call to other templates and Java services.
The idea with this syntax is to keep the template as clean and easy to read as possible, by keeping it centered on the text to generate rather than on the model navigation code.


Given that, Acceleo has other assets : the reflective editor is a very nice feature : you can see a real time preview of generated code on each model element just by clicking on it. It takes less time to tests templates.
Also in the reflective editor you can see from where every generated peace of code comes from : the model or the template. And there is a real time synchronization between this preview and the model, meaning that you can see what every single model information contributes to in the generated text.
There are some flash demos on the Acceleo web site if you want to have a better idea of what I am talking about.


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

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

What about conditions, literals and operators?

We have very few keywords in the Acceleo syntax, including if and for.
So you can use if statements and classic operators to make comparisons.
The if statement is quite similar to the Java one, using the same operators and having literals with " if you need.


And what about "real" model browsing with higher-order functions (like in OCL)? This is absolutely essential for a modern template language.

We do plan to integrate OCL in future Acceleo releases as OCL gets integrated with EMF, it will be quite straightforward.
Now we do offer other higher services to navigate through models, below an example :
eAllContents("Class").select("name.endsWith('EJB')")
enables you to work on all classes ending with "EJB" string for exemple.


It is design to keep target source code easy to read and to maintain.
Because you have to implement everything using Java services.
Unfortunately, Java doesn't offer good model browsing capabilities either...

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 not appropriate if you have extensive needs for model navigation.




Acceleo is ready for production use.
Xpand and openArchitectureWare is used in production for many years now.

regards,
Sven


Regards,

Etienne Juliot

Sven Efftinge a écrit :
Hi,

what template language have you used so far?
What are the benefits of Acceleo over GMT's solutions (MOFScript, Xpand)?


regards,
Sven

Xavier Blanc schrieb:
Hi,



I have just had a nice presentation from OBEO about Acceleo that is a Model2Text generation engine (http://www.acceleo.org).



This industrial tool would be very helpful for generating ModelBus Adapters and I am sure it should also be interesting for solving a lot of model to text integration problems.



OBEO offers it as Open Source and they want to put it into the Eclipse community. I propose them to put it inside our MDDi project. They seem interested.



Any comment?



Regards



Xavier Blanc