Reply inline.

On Wed, Feb 9, 2011 at 12:40, Rickard Öberg <[email protected]> wrote:

> Our conclusion in the end was that we will not change the current Object
> handling, i.e. it won't be possible to register classes with "addObjects"
> and have them use constraints and concerns etc. Instead we will try to allow
> a Class to be a definition for a TransientComposite, since in the end the
> whole thing will end up as a composite. Then regular objects are still
> "lightweight", and yet if you have a class that you want to use as a
> composite, with itself being a "default mixin" so to speak, then that is
> easy to do.
>
> In practice it would look something like this:
> @Concerns(SomeConcern.class)
> @SideEffects(SomeSideEffect.class)
> public class MyClass
> {
>  public MyClass(@This SomeMixin mixin, @Service service)
>  {
>    ..
>  }
>
>  public void doStuff(@MinValue(5) int foo)
>  {
>  }
> }
> ---
> instead of:
> @Concerns(SomeConcern.class)
> @SideEffects(SomeSideEffect.class)
>
   @Mixins( MyClass.Mixin.class )

> public interface MyClass
>  extends TransientComposite
> {
>  abstract class Mixin implements MyClass
>  {
>    public Mixin(@This SomeMixin mixin, @Service service)
>    {
>      ..
>    }
>
>    public void doStuff(@MinValue(5) int foo)
>    {
>    }
>  }
> }
> ---
>
Highlighted :)


> The same rules as before apply with regard to typed Concerns, i.e. the
> class has to implement an interface if it wants methods to be "intercepted".
> Generic concerns should be possible to apply without interfaces though. Note
> that it has a reference to a mixin, but obviously, all mixins will be
> private, i.e. not exposed to outside clients.

 Something like that. What do you think? Should I give it a try?
>

Bunch of questions:

   - What is the advantage of using Class instead of the current mechanism?
   - Would deep graph object supported?
   Transient within another transient?
   - How do I declare properties and associations?
   Use abstract?
   e.g.
   public abstract class MyClass
   {
       public abstract Property<String> stringProperty();
   }
   - Is the new mechanism is only limited to transient?

Regards,
Edward Yakop
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to