Hi Simon,
>> The fact is, the cache is built on top of the metamodel, but
it
>> should not be a concern of the metamodel.
>
> The propertyNamed: cache mechanism is not the concern of the meta-
> model. It is the concern of each object, and it is the object that
> decide to compute something based on the information from the meta-
> description. The meta-model does not know anything about such a
> mechanism.
>
> I do not see why this would be wrong.
Oups sorry Doru, I did not say it was wrong, it was just a plain old
summary statement of the current state as I was clarifying my
understanding of the code.
Oh, do not apologize for things like this. I do not get upset that
easily :)
Actually, I was thinking yesterday if pushing the cache as a generic
mechanism into the metamodel would make sense but, too much hurdles
for no improvment. So I almost wrote this for myself :)
Ok, I misunderstood that you were criticizing my beautiful design that
evolved from one thing and ended up being something else that is not
really useful anymore :).
> In any case, propertyNamed: was a method used heavily long time
> ago, when we did not have methods for each property. So, most of
> the code in Moose does not depend on it anymore. However, it is
> still convenient to call it from the conformity strategies.
Nice to know that. But what do you call a conformity strategy?
All the classes that start with CF (in the Moose-ConformityStrategies
package). In the VW browser, you get an input box to query a group.
Behind that there is a ConformityStrategy which is nothing but a
simple AST for a simple boolean language. It's called Conformity
because for a query of NOM > 10 it can say either true/false, or a
percentage of conformity. For example, if NOM = 20 then, the result
would be 200%.
Still, #propertyNamed: seems a good way to access properties when
displaying them in the UI for an entity, right? Or is there
something I missed?
Not really. You should be able to get a similar result by directly
getting it from the object via mmGet: (in Meta).
> In Moose/Meta we subclassed Property with a class that has
longName
> and description fields, and we had a specialized PragmaProcessor
> that knew how to read those annotations. I agree that there these
> classes did not have much behavior,
How easy could this be in Fame?
Just subclass Property and that is it.
> but it was easier to grasp. Annotations linked to meta Properties
> can be an overkill for the matter at hand. On the other hand, if
> Annotations could be attached to any Element, this could be a nice
> way to comment the meta-model.
I think so.
Now there are other annotations use elsewhere in Moose, like the
<navigation> ones. Currently, I dont know how they are dealt with.
In VW we have a MetaNavigation class.
Cheers,
Doru
>
>
> Cheers,
> Doru
>
>
>
>> On 10 déc. 08, at 00:00, Adrian Kuhn wrote:
>>
>>> Hi Simon,
>>>
>>> As I understand you have "custom attributes" in your metamodel
>>> and want to specify them using pragmas. Further you would like
>>> Fame to parse and handle these pragmas.
>>>
>>> I dont have a solution ready for this. Which is not a surprise,
>>> Fame grows only when need arises. Do you have suggestions how to
>>> solve it? What would be best for your need?
>>>
>>> Would something alonge these lines help you:
>>>
>>> <MSEAnnotation: #longName value: 'pimp my meta-model'>
>>> <MSEAnnotation: #description value: 'Yo dawg, I herd you like
>>> models so we put ...'>
>>>
>>> cheers,
>>> AA
>>>
>>>
>>> --
>>> Follow me
http://twitter.com/akuhn
>>>
>>>
>>> On 08.12.2008, at 12:16, Simon Denier wrote:
>>>
>>>> Hi
>>>>
>>>> I was wondering how some pragmas should be handled in Moose?
>>>> Apparently there is currently two "kind" of pragmas in use: the
>>>> ones which begin with MSESomething are used to describe the
>>>> model in Fame. But there is also a range of
>>>> "property:longName:description:" pragmas which are used to
>>>> describe entity properties like "numberOfMethods",
>>>> "numberOfAccesses"...
>>>>
>>>> Such pragmas allow a generic mean to access some metrics, using
>>>> MooseEntity#propertyNamed:
>>>> But the implementation of #propertyNamed: relies on attributes
>>>> which should be described in the metamodel.
>>>>
>>>> Now it seems that the responsibility to parse and interpret
>>>> those pragmas belongs to Fame. Currently they are not handled,
>>>> and I just found a TODO note in
>>>> FM3MetaDescription#attributeNamed:ifAbsent:
>>>>
>>>>
>>>>
>>>> --
>>>> Simon
>>>>
>>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>> --
>> Simon
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> Moose-dev(a)iam.unibe.ch
>>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>
> --
>
www.tudorgirba.com
>
www.tudorgirba.com/blog
>
> "To lead is not to demand things, it is to make them happen."
>
>
>
> _______________________________________________
> Moose-dev mailing list
> Moose-dev(a)iam.unibe.ch
>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
--
Simon
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
www.tudorgirba.com
www.tudorgirba.com/blog
"To lead is not to demand things, it is to make them happen."