Merging Descriptor systems

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

Merging Descriptor systems

Esteban A. Maringolo
Let's say I have a Descriptor system for a small library framework
that is defined for the set of classes A, B, C, with its models,
tables, and mappings.

And now I'm implementing a new application and want to inherit all
these descriptions into my new DescriptionSystem, but without having
to subclass the before mentioned description system.

Is there an existing way to do that or should I resort to god'ol class
inheritance?

PD: In this case this could be solved by simply using inheritance, but
if I were to integrate classes from another library, let's say D, E,
F, and wanted to reuse the systems of the two libraries, then this
solution wouldn't scale much.

I think this could be done pretty easily implementing a "extendable
descriptor system class", but maybe there is another, existing, way.

Regards!

Esteban A. Maringolo

--
You received this message because you are subscribed to the Google Groups "glorp-group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/glorp-group.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Merging Descriptor systems

Alan Knight
If this is a simple combination I think it might work, but doing something more complicated is trickier.

What I mean by a simple combination is that you want to use the descriptors from the other system, but not modify them or have relationships from them to your own classes. In that case I think it would work to just have your DescriptorSystem implement the same methods as the other system, and delegate to that system.

If you want something more complicated it's tricky because the descriptor and related methods typically send messages to self.

However, it would be fairly easy to write a DescriptorSystem that was able to be delegated to, by having it know what its delegate was (and defaulting to self) and <insert hand-waving>. OK, let's say "not that difficult". And I don't think such a thing exists right now.


On Mon, Apr 24, 2017 at 7:45 AM Esteban A. Maringolo <[hidden email]> wrote:
Let's say I have a Descriptor system for a small library framework
that is defined for the set of classes A, B, C, with its models,
tables, and mappings.

And now I'm implementing a new application and want to inherit all
these descriptions into my new DescriptionSystem, but without having
to subclass the before mentioned description system.

Is there an existing way to do that or should I resort to god'ol class
inheritance?

PD: In this case this could be solved by simply using inheritance, but
if I were to integrate classes from another library, let's say D, E,
F, and wanted to reuse the systems of the two libraries, then this
solution wouldn't scale much.

I think this could be done pretty easily implementing a "extendable
descriptor system class", but maybe there is another, existing, way.

Regards!

Esteban A. Maringolo

--
You received this message because you are subscribed to the Google Groups "glorp-group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/glorp-group.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "glorp-group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/glorp-group.
For more options, visit https://groups.google.com/d/optout.