Create a Moose model a posteriori

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Create a Moose model a posteriori

roberto.minelli@usi.ch
Hi,

I was at ESUG last week and I discussed about this issue with some people, and in the end Stef told me "drop a mail in the mailing list, I am interested to understand what all the other people think about it". So, here I am.

I have my project in which I am modeling development sessions. Each session object has a number of meta-data (e.g., start, end time, etc.) and a collection of events. Each event object owns some meta-data and some references to classes that were "touched" by a given event (i.e., now I am using the Ring definition of the classes, since I plan to serialize and deserialize them and I cannot serialize the real class object, it would be too heavy, isn't it?).

Now the question: I would like to create a Moose model of a development session to be able to import the sessions in the Moose panel and play around with the excellent Moose tool-suite. How should I proceed? Do you think it's better to annotate and add pragmas to the existing classes or to create a minimal parallel hierarchy of my model (i.e., MooseSession for MySession) and have something like MySession>>#asMooseDef which returns an object of kind MooseSession?

Thanks in advance,
Roberto
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-dev] Create a Moose model a posteriori

Guillermo Polito
Hey!

On Mon, Sep 16, 2013 at 9:19 AM, [hidden email] <[hidden email]> wrote:
Hi,

I was at ESUG last week and I discussed about this issue with some people, and in the end Stef told me "drop a mail in the mailing list, I am interested to understand what all the other people think about it". So, here I am.

I have my project in which I am modeling development sessions. Each session object has a number of meta-data (e.g., start, end time, etc.) and a collection of events. Each event object owns some meta-data and some references to classes that were "touched" by a given event (i.e., now I am using the Ring definition of the classes, since I plan to serialize and deserialize them and I cannot serialize the real class object, it would be too heavy, isn't it?).

Serializing a class is not a big deal ;). With fuel you can even serialize execution contexts, blocks and stuff. But (but but), I can tell your decision is still good because during development you can end up removing a class, and when that happens the system makes it obsolete and remove all its data. So if you were pointing to the real class, you would have problems to access the class data afterwards. And since you use ring, you're ok ;).

Cheers,
Guille
 

Now the question: I would like to create a Moose model of a development session to be able to import the sessions in the Moose panel and play around with the excellent Moose tool-suite. How should I proceed? Do you think it's better to annotate and add pragmas to the existing classes or to create a minimal parallel hierarchy of my model (i.e., MooseSession for MySession) and have something like MySession>>#asMooseDef which returns an object of kind MooseSession?

Thanks in advance,
Roberto


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Create a Moose model a posteriori

Stephan Eggermont-3
In reply to this post by roberto.minelli@usi.ch
To play around with the Moose tools you don't need to start with a MooseModel.
I mostly start with a domain-specific glamour browser. If I need multiple browsers,
I start with a GLMExamplesBrowser.

Stephan

On 16 sep 2013, at 09:19, [hidden email] wrote:

> Hi,
>
> I was at ESUG last week and I discussed about this issue with some people, and in the end Stef told me "drop a mail in the mailing list, I am interested to understand what all the other people think about it". So, here I am.
>
> I have my project in which I am modeling development sessions. Each session object has a number of meta-data (e.g., start, end time, etc.) and a collection of events. Each event object owns some meta-data and some references to classes that were "touched" by a given event (i.e., now I am using the Ring definition of the classes, since I plan to serialize and deserialize them and I cannot serialize the real class object, it would be too heavy, isn't it?).
>
> Now the question: I would like to create a Moose model of a development session to be able to import the sessions in the Moose panel and play around with the excellent Moose tool-suite. How should I proceed? Do you think it's better to annotate and add pragmas to the existing classes or to create a minimal parallel hierarchy of my model (i.e., MooseSession for MySession) and have something like MySession>>#asMooseDef which returns an object of kind MooseSession?
>
> Thanks in advance,
> Roberto
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Create a Moose model a posteriori

Tudor Girba-2
Exactly. You essentially do not need to build a parallel hierarchy to benefit from Moose tools.

If all you want is to browse your objects, you should build custom browsers for that.

If you want quick access to your objects, just extend GTInspector with dedicated views. This one works the same as the MoosePanel.

However, if you want to serialize objects, then having your own model is probably a better approach then to use directly those from Ring (as Guille pointed out). You probably should build a shallow set of objects that can be resolved to the live ones once imported in the image. Perhaps for this purpose, you could use FAMIX.

Maybe, if you have a more concrete problem, we could take a look at the source code.

Cheers,
Doru



On Mon, Sep 16, 2013 at 10:07 AM, Stephan Eggermont <[hidden email]> wrote:
To play around with the Moose tools you don't need to start with a MooseModel.
I mostly start with a domain-specific glamour browser. If I need multiple browsers,
I start with a GLMExamplesBrowser.

Stephan

On 16 sep 2013, at 09:19, [hidden email] wrote:

> Hi,
>
> I was at ESUG last week and I discussed about this issue with some people, and in the end Stef told me "drop a mail in the mailing list, I am interested to understand what all the other people think about it". So, here I am.
>
> I have my project in which I am modeling development sessions. Each session object has a number of meta-data (e.g., start, end time, etc.) and a collection of events. Each event object owns some meta-data and some references to classes that were "touched" by a given event (i.e., now I am using the Ring definition of the classes, since I plan to serialize and deserialize them and I cannot serialize the real class object, it would be too heavy, isn't it?).
>
> Now the question: I would like to create a Moose model of a development session to be able to import the sessions in the Moose panel and play around with the excellent Moose tool-suite. How should I proceed? Do you think it's better to annotate and add pragmas to the existing classes or to create a minimal parallel hierarchy of my model (i.e., MooseSession for MySession) and have something like MySession>>#asMooseDef which returns an object of kind MooseSession?
>
> Thanks in advance,
> Roberto
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev