Hi Dan,
Thank you for raising this question here.
To answer your question: I accept that sometimes it makes sense to have
an action that starts with a reserved word. I would prefer an "override"
type of annotation that explicitly marks individual methods as
not-for-metalanguage. Like disabling a compiler warning in source
code...
I.e. with the annotation, "disableX" appears as the "disable X" action.
Without the annotation "disableX" is used by the framework to determine
the enabled/disabled state of "X".
Based on my experiences with software development, I feel that "our"
needs, as developers of the Apache Isis, should always be at the bottom
of the list, that we should place lower value on the effort of
implementation.
The primary focus must always be on "what makes Apache Isis more useful
to it's users?"
Ask the following questions:
- Do we know what our users want?
- Is what Apache Isis provides to our users clear and unambiguous? (Are
we sending mixed messages?)
- Is it clear to visiting, potential users, what Apache Isis does and
provides? (What's our 30 second elevator pitch?)
Personal opinion:
I have always felt that Apache Isis was about making life easier
(faster) for our users. Providing a framework that lets users rapidly
implement a fully functioning application, with easy-to-read user code.
It can optionally support numerous special compile-time-only (or
equivalent) checks:
- business rules that check the metalanguage implementation
Finally, I believe that a significant failure at the moment is that we
don't have good traction with our user community. Or, if we do, it's
that our user community consists of a handful of people, judging by
replies to this mailing list.
Kind regards,
Kevin
On 2019-12-04 10:43, Dan Haywood wrote:
Hi folks,
Canvassing opinions here.
Andi and I are still hard at work on v2.0. We've been chatting offline
about the @Action annotation. Currently this is optional, but there's
a
config property (isis.reflector.explicit-annotations.action) that can
be
set to require it to be required.
If it's required, then it allows actions that start with a "reserved"
word,
such as "clear", "disable" and "addTo" to be used as action names.
What do folks think about this? Obviously it means there's more effort
to
migrate to v2.0, but is it a worthwhile trade-off.
A couple of follow-on questions.
First, if we make @Action mandatory, should we do the same for
@Property
and @Collection?
Second, if we are being explicit about the "main" methods, should we
also
annotate supporting methods? There was an earlier discussion about
this,
where Andi had suggested a @Model annotation, the semantic opposite
of @Programmatic. I prefer the name @Supporting, but at any rate the
idea
is that the developer would annotate all supporting methods, and the
framework would then be able to ensure that none had become orphaned.
So, to summarise, what do we think about:
- @Action mandatory
- @Property and @Collection also mandatory
- @Supporting as an indicator of any supporting method, to make part of
the
metamodel and ensure not orphaned?
Thanks
--
Kevin Meyer
Ljubljana, Slovenia
Vice President Apache Isis (https://isis.apache.org)
The Apache Software Foundation