All sounds very good!

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Thu, Jan 29, 2015 at 7:10 PM, Dan Haywood <[email protected]>
wrote:

> 2015-01-28 10:58 GMT+00:00 Martin Grigorov <[email protected]>:
>
> > 2015-01-28 12:52 GMT+02:00 Dan Haywood <[email protected]>:
> >
> >
> >
> > My first thought after seeing @DomainService(type=PROGRAMMATIC) is:  why
> > there is no @Action(type=PROGRAMMATIC) instead of @Programmatic then ? To
> > be more consistent.
> >
> >
> OK, here's what I've ended up implementing (ISIS-968, to be merged
> shortly)...
>
>
> ... following on from ISIS-970 which refined the annotations for domain
> objects to distinguish layers:
>
> - view/app layer
> @DomainObject(nature=VIEW)
>
> - domain layer
> @DomainObject(nature=JDO_ENTITY | EXTERNAL_ENTITY)
>
>
> ... the @DomainService annotation now has:
>
> - view/app layer:
> @DomainService(nature=VIEW | VIEW_MENU_ONLY | VIEW_CONTRIBUTIONS_ONLY)
>
> - domain layer:
> @DomainService(nature=DOMAIN)
>
>
>
> The idea is that domain-layer domain services (nature=DOMAIN) are hidden;
> their intent is only to provide functionality to the domain objects.
>
> Meanwhile, the view-layer domain services are broken down as providing
> actions that are rendered in the UI; the different natures determine
> whether they appear in the menu bar and/or as contributed actions.
>
> For those that don't want to distinguish between the layers, just continue
> to use nature=VIEW (the default) and the behaviour is as it always ever
> was.
>
> ~~~
>
> The other change I've made is to @ActionLayout:
>
> @ActionLayout (contributed = AS_ACTION | AS_ASSOCIATION ).
>
> This is equivalent to @NotContributed(As.ASSOCIATION | As.ACTION), but
> without the confusing double negative.
>
> ~~~
>
> With these changes we can then deprecate the horrid @NotInServiceMenu and
> @NotContributed annotations.  The concept count is reduced, I think, while
> we've started to provide better guidance for users to optionally organize
> domain services by layer, same as for domain objects/view models.
>
> Hope that makes sense...
>
> Dan
>
>
>
>
>
>
>
>
>
>
>
>
> ~~~~~~~~~~
>
> @Hidden / @NotContributed / @NotInServiceMenu
>

Reply via email to