[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[News.eclipse.technology.mddi] Re: Accelo
|
Yes :) for sure it's cool, and a lot of people will like this. But still,
again I'd rather code my own java helper classes and call them in my
templates. Of course if it were not possible to write the helper, I'd go
for a syntax like this one.
in our view, it's the other way round. As long as you can write your
the helper in the expression language (using one or two lines of code)
I'll do it in the expression language. Only when (and that is very rare,
based on our experience) you can't do that, you'll implement an escape
into Java.
Sorry I may be stubborn or really stupid but I still don't get it when
you say JET is bind to the java type system ... of course he is, but as
long as we're in a java wolrd, everything is bing to a java type system
isnt't it ?
The point is that we're first and foremost in the modelling world!
And there, the model's type system (aka the metamodel and the meta meta
model) is relevant. The (potential) mapping to Java code is not the
most important point here.
You said that with a language like OCL, anything could work as long as
it's a java object ...
actually, anything works as long as you've got an interpreter for the
meta-metamodel underlying it.
well I don't see why it won't be true for JET ...
because JET works on Java code. There's not way to interpret other
data structures unless you create a Java-class based representation
for them.
nothing but java, which is not the case for OCL representations and the
like that are tied both to java *and* to a specific M3 model (at least at
runtime).
oAW's expressions are not tied to Java (unless you count the fact that
the interpreter is implemented in Java!), but only to the M3.
Why do you say we need to generate the classes ? if the object is an
dynamic EObject, you can access to any property/reference with the
reflection API.
wow, yes, you could, but that would result in really long-winded syntax.
You don't want to do this in everyday development!
Even if you're using another "dynamic" meta-model representation, you'll
still have some java HashMap & al. structures to access the meta data
... so you can use java API to get them. Again it's not always
convenient indeed, but it's doable.
things that aren't convenient, won't be done in practice (at least my
customers won't do it then :-))
Yes, I've tried XPand and I really liked a lot the polymorphism feature,
and the AOP thing also, altough I'm still skeptical about managing
aspects on
very large files.
true, but managing families of generators without aspects is even worse,
we learned that the hard way in a number of projects, primarily in the
embedded domain.
But again this is because I'm mainly a java coder, and a bit lazy to
decide that I should learn another OCL-like syntax for my scripting
needs.
actually, I can understand that. When Sven told me about the expression
language
(at that time, mainly used for costraint checks) the first thing I did was:
I implemented a constraint checker where you could implement the constraint
checks in Java because
* I wasn't sure the expression language would handle all my use cases
* and I didn't want to learn the language.
And guess what: I never ever used my own component, because after about
an hour of playing around with the OCL expressions, I was convinced. One
line of code instead of two nested for's for checking name uniqueness
convinced me :-)
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