[jira] [Updated] (ISIS-1998) Simplify syntax way for mixins, to better express intent using @Action, @Collection and @Property

2019-10-05 Thread Andi Huber (Jira)


 [ 
https://issues.apache.org/jira/browse/ISIS-1998?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andi Huber updated ISIS-1998:
-
Fix Version/s: (was: 2.0.3)
   2.0.0

> Simplify syntax way for mixins, to better express intent using @Action, 
> @Collection and @Property
> -
>
> Key: ISIS-1998
> URL: https://issues.apache.org/jira/browse/ISIS-1998
> Project: Isis
>  Issue Type: New Feature
>Affects Versions: 1.16.2
>Reporter: Daniel Keir Haywood
>Priority: Major
> Fix For: 2.0.0
>
>
> For regular action mixins, we currently write:
>  {code}
> @Mixin(method="act")
> public class Contributee_someAction() {
>     private final Contributee contributee;  // constructor omitted
> @Action(...)
> @ActionLayout(...)
> public ReturnValue act( ) { ... }
> }
> {code}
> instead, the proposal is:
> {code}
> @Action(...)  // presence of Action on class implies this is a 
> mixin; 
> @ActionLayout(...)
> public class Contributee_someAction() {
> private final Contributee contributee;
> public ReturnValue act( ... ) { ... }   // no need for annotations here.  
>  "act" assumed
> }
> {code}
> The details of the @Action and @ActionLayout facets are "copied" down to the 
> "act" method.
> for properties, we currently write:
> {code}
> @Mixin(method="prop")
> public class Contributee_someProperty() {
>     private final Contributee contributee;  
> @Action(semantics=SAFE)   // required
> @ActionLayout(contributed=ASSOCIATION)  // required
> @Property(...)
> @PropertyLayout(...)
> public ReturnValue prop( /* no args */ ) { ... }
> }
> {code}
> instead we'd rather write:
> {code}
> @Property(...) // implies this class is a mixin
> @PropertyLayout(...)
> public class Contributee_someProperty()
> private final Contributee contributee;
> public ReturnValue prop() { ... }// "prop" is assumed
> }
> {code}
> The boilerplate (and confusing) @Action(SAFE) and 
> @ActionLayout(AS_ASSOCIATION) are implied.  The facets from @Property and 
> @PropertyLayout are copied down to the "prop" method
> And finally, for collections, we currently write:
> {code}
> @Mixin(method="coll")
> public class Contributee_someCollection() {
>     private final Contributee contributee;  
> @Action(semantics=SAFE)   // required
> @ActionLayout(contributed=ASSOCIATION)  // required
> @Collection(...)
> @CollectionLayout(...)
> public List coll( /* no args */ ) { ... }
> }
> {code}
> instead we'd rather write:
> {code}
> @Collection(...) // implies this class is a mixin
> @CollectionLayout(...)
> public class Contributee_someCollection()
> private final Contributee contributee;
> public List coll() { ... }// "coll" is 
> assumed
> }
> {code}
> similar to properties.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (ISIS-1998) Simplify syntax way for mixins, to better express intent using @Action, @Collection and @Property

2019-10-05 Thread Daniel Keir Haywood (Jira)


 [ 
https://issues.apache.org/jira/browse/ISIS-1998?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Keir Haywood updated ISIS-1998:
--
Description: 
For regular action mixins, we currently write:

 {code}
@Mixin(method="act")
public class Contributee_someAction() {

    private final Contributee contributee;  // constructor omitted
@Action(...)
@ActionLayout(...)
public ReturnValue act( ) { ... }
}
{code}

instead, the proposal is:

{code}
@Action(...)  // presence of Action on class implies this is a 
mixin; 
@ActionLayout(...)
public class Contributee_someAction() {
private final Contributee contributee;
public ReturnValue act( ... ) { ... }   // no need for annotations here.   
"act" assumed
}
{code}

The details of the @Action and @ActionLayout facets are "copied" down to the 
"act" method.

for properties, we currently write:

{code}
@Mixin(method="prop")
public class Contributee_someProperty() {
    private final Contributee contributee;  
@Action(semantics=SAFE)   // required
@ActionLayout(contributed=ASSOCIATION)  // required
@Property(...)
@PropertyLayout(...)
public ReturnValue prop( /* no args */ ) { ... }
}
{code}

instead we'd rather write:

{code}
@Property(...) // implies this class is a mixin
@PropertyLayout(...)
public class Contributee_someProperty()
private final Contributee contributee;
public ReturnValue prop() { ... }// "prop" is assumed
}
{code}

The boilerplate (and confusing) @Action(SAFE) and @ActionLayout(AS_ASSOCIATION) 
are implied.  The facets from @Property and @PropertyLayout are copied down to 
the "prop" method

And finally, for collections, we currently write:

{code}
@Mixin(method="coll")
public class Contributee_someCollection() {
    private final Contributee contributee;  
@Action(semantics=SAFE)   // required
@ActionLayout(contributed=ASSOCIATION)  // required
@Collection(...)
@CollectionLayout(...)
public List coll( /* no args */ ) { ... }
}
{code}

instead we'd rather write:

{code}
@Collection(...) // implies this class is a mixin
@CollectionLayout(...)
public class Contributee_someCollection()
private final Contributee contributee;
public List coll() { ... }// "coll" is 
assumed
}
{code}

similar to properties.

  was:
that is:
 * for actions with @Action annotation at class level (replacing @Mixin), new 
mixinMethod="act". Also allow @ActionLayout at top-level
 * for collections, ditto @Collection, new mixinMethod="coll"; @CollectionLayout
 * for properties, ditto @Property, mixinMethod="prop" and @PropertyLayout


> Simplify syntax way for mixins, to better express intent using @Action, 
> @Collection and @Property
> -
>
> Key: ISIS-1998
> URL: https://issues.apache.org/jira/browse/ISIS-1998
> Project: Isis
>  Issue Type: New Feature
>Affects Versions: 1.16.2
>Reporter: Daniel Keir Haywood
>Priority: Major
> Fix For: 2.0.3
>
>
> For regular action mixins, we currently write:
>  {code}
> @Mixin(method="act")
> public class Contributee_someAction() {
>     private final Contributee contributee;  // constructor omitted
> @Action(...)
> @ActionLayout(...)
> public ReturnValue act( ) { ... }
> }
> {code}
> instead, the proposal is:
> {code}
> @Action(...)  // presence of Action on class implies this is a 
> mixin; 
> @ActionLayout(...)
> public class Contributee_someAction() {
> private final Contributee contributee;
> public ReturnValue act( ... ) { ... }   // no need for annotations here.  
>  "act" assumed
> }
> {code}
> The details of the @Action and @ActionLayout facets are "copied" down to the 
> "act" method.
> for properties, we currently write:
> {code}
> @Mixin(method="prop")
> public class Contributee_someProperty() {
>     private final Contributee contributee;  
> @Action(semantics=SAFE)   // required
> @ActionLayout(contributed=ASSOCIATION)  // required
> @Property(...)
> @PropertyLayout(...)
> public ReturnValue prop( /* no args */ ) { ... }
> }
> {code}
> instead we'd rather write:
> {code}
> @Property(...) // implies this class is a mixin
> @PropertyLayout(...)
> public class Contributee_someProperty()
> private final Contributee contributee;
> public ReturnValue prop() { ... }// "prop" is assumed
> }
> {code}
> The boilerplate (and confusing) @Action(SAFE) and 
> @ActionLayout(AS_ASSOCIATION) are implied.  The facets from @Property and 
> @PropertyLayout are copied down to the "prop" method
> And finally, for collections, we currently write:
> {code}
> @Mixin(method="coll")
> public class Contributee_someCollection() {
>     private final Contributee contributee;  

[jira] [Updated] (ISIS-1998) Simplify syntax way for mixins, to better express intent using @Action, @Collection and @Property

2019-05-17 Thread Dan Haywood (JIRA)


 [ 
https://issues.apache.org/jira/browse/ISIS-1998?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dan Haywood updated ISIS-1998:
--
Fix Version/s: (was: 1.18.0)
   2.0.3

> Simplify syntax way for mixins, to better express intent using @Action, 
> @Collection and @Property
> -
>
> Key: ISIS-1998
> URL: https://issues.apache.org/jira/browse/ISIS-1998
> Project: Isis
>  Issue Type: New Feature
>Affects Versions: 1.16.2
>Reporter: Dan Haywood
>Priority: Major
> Fix For: 2.0.3
>
>
> that is:
>  * for actions with @Action annotation at class level (replacing @Mixin), new 
> mixinMethod="act". Also allow @ActionLayout at top-level
>  * for collections, ditto @Collection, new mixinMethod="coll"; 
> @CollectionLayout
>  * for properties, ditto @Property, mixinMethod="prop" and @PropertyLayout



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (ISIS-1998) Simplify syntax way for mixins, to better express intent using @Action, @Collection and @Property

2018-12-28 Thread Dan Haywood (JIRA)


 [ 
https://issues.apache.org/jira/browse/ISIS-1998?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dan Haywood updated ISIS-1998:
--
Fix Version/s: (was: 1.17.0)
   1.18.0

> Simplify syntax way for mixins, to better express intent using @Action, 
> @Collection and @Property
> -
>
> Key: ISIS-1998
> URL: https://issues.apache.org/jira/browse/ISIS-1998
> Project: Isis
>  Issue Type: New Feature
>Affects Versions: 1.16.2
>Reporter: Dan Haywood
>Priority: Major
> Fix For: 1.18.0
>
>
> that is:
>  * for actions with @Action annotation at class level (replacing @Mixin), new 
> mixinMethod="act". Also allow @ActionLayout at top-level
>  * for collections, ditto @Collection, new mixinMethod="coll"; 
> @CollectionLayout
>  * for properties, ditto @Property, mixinMethod="prop" and @PropertyLayout



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)