I would also vote for option 1 ____________________________________________________
Netural GmbH - Digital Media in Excellence. Ahmed Ragab, M.Sc. | Software Engineer Peter-Behrens-Platz 2, 4020 Linz, Austria Neustiftgasse 32-34, 1070 Wien, Austria T +43 (0)732 790903-38, F +43 (0)732 790903-999 ahmed.ra...@netural.com | www.netural.com On Tue, Dec 30, 2014 at 1:19 PM, Dan Haywood <d...@haywood-associates.co.uk> wrote: > This is basically Oscar's preference too, and I can see some merit in it. > And if one thinks of @DomainObject as being part of the domain layer only, > then it probably should also be renamed to @DomainEntity. > But the other thing to consider is that for each of these annotations we > also have a corresponding @XxxLayout. > So then the debate was whether to keep things symmetrical. > We ended up with three options: > option 1 (symmetic, but some duplication): > @DomainEntity with @DomainEntityLayout > @ViewModel with @ViewModelLayout > option 2 (asymmetric): > @DomainEntity } with @DomainObjectLayout > @ViewModel } > option 3 (symmetric, but overloaded): > @DomainObject with @DomainObjectLayout > (with type=JDO|EXTERNAL|VIEW_MODEL) > So far we've had: > - one vote for option 1 (Oscar) > - four votes for option 3 (Jeroen, Martin, Kevin, Dan) > Cheers > Dan > On 30 December 2014 at 11:07, Ahmed Ragab <ahmed.ra...@netural.com> wrote: >> Hi Dan, >> >> >> From your input, I assume a separate @ViewModel annotation is more >> consistent due to the fact that the view model is in the application layer >> where as @DomainObject is used with entities in the data/domain layer. >> >> >> >> >> This will also help isolating specifics of both layers in upcoming >> versions. >> >> >> ____________________________________________________ >> >> >> >> Netural GmbH - Digital Media in Excellence. >> >> >> >> >> >> Ahmed Ragab, M.Sc. | Software Engineer >> >> >> Peter-Behrens-Platz 2, 4020 Linz, Austria >> Neustiftgasse 32-34, 1070 Wien, Austria >> T +43 (0)732 790903-38, F +43 (0)732 790903-999 >> >> >> ahmed.ra...@netural.com | www.netural.com >> >> On Tue, Dec 30, 2014 at 1:00 PM, Dan Haywood <d...@haywood-associates.co.uk >> > >> wrote: >> >> > Hi Ahmed, >> > Thanks for the input. >> > On 30 December 2014 at 10:44, Ahmed Ragab <ahmed.ra...@netural.com> >> wrote: >> >> I guess replacing persistence=JDO with persistence=INTERNAL|MANAGED|ISIS >> >> makes more sense with EXTERNAL and VIEW_MODEL since JDO is not the >> >> persistence scheme. >> >> >> >> >> > I do quite like all these names, and they make sense if one already >> knows a >> > bit about Isis, but I'm not sure how grokkable they are for a newbie. >> > And, as you then go on to point out... >> >> >> >> I don't know what persistence=VIEW_MODEL means but looks from the thread >> >> comments that it makes sense. However I am still not sure if it could >> >> co-exist with JDO/EXTERNAL persistence schemes. >> >> >> >> >> > ... it's because "persistence=VIEW_MODEL" doesn't make sense as a >> sentence >> > that I was proposing "type" instead: >> > That's why I think I still prefer: >> > @DomainObject(type=JDO_ENTITY | EXTERNAL_ENTITY | VIEW_MODEL) >> > To answer your question about external entity vs view models... >> > ... they are both implemented as view models (meaning that their state is >> > encoded in their OID, eg as used in its URL in the REST API) >> > ... the difference is one of intent: >> > ... we would expect that entities to interact with each other (even >> if >> > one entity is an internally managed JDO entity and the other is >> externally >> > managed) >> > ... we wouldn't expect that an entity can interact with a view model >> > (because conceptually the view model is in the application layer, whereas >> > the entity is in the domain layer below) >> > Thx again >> > Dan >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> BR,Ahmed >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> On Tuesday 30 Dec 2014 at 12:14, Dan Haywood < >> d...@haywood-associates.co.uk>, >> >> wrote: >> >> I guess the primary considerations are: >> >> >> >> - grokkability for new-comers >> >> >> >> - aesthetics >> >> >> >> - alignment with DDD terminology. >> >> >> >> >> >> Anyway, thanks for the vote. >> >> >> >> >> >> >> >> >> >> On 30 December 2014 at 10:01, Kevin Meyer <ke...@kmz.co.za> wrote: >> >> >> >> >> >> > I've been on holiday and only now catching up... >> >> >> >> > >> >> >> >> > I vote for 3, but don't have insight to choose between 1 and 2 >> >> thereafter. >> >> >> >> > >> >> >> >> > >> >> >> >> > On 29 December 2014 16:11:24 CET, Dan Haywood < >> >> >> >> > d...@haywood-associates.co.uk> wrote: >> >> >> >> > >OK, so it comes down to either: >> >> >> >> > > >> >> >> >> > > >> >> >> >> > >*option 1:* >> >> >> >> > > >> >> >> >> > >*@DomainEntity(persistence=JDO|EXTERNAL)* >> >> >> >> > >*@ViewModel* >> >> >> >> > > >> >> >> >> > >with >> >> >> >> > > >> >> >> >> > >*@DomainEntityLayout* >> >> >> >> > >*@ViewModelLayout* >> >> >> >> > > >> >> >> >> > > >> >> >> >> > >where: >> >> >> >> > >* is symmetrical >> >> >> >> > >* some attributes of @DomainEntity don't apply if >> persistence=EXTERNAL >> >> >> >> > >* the two layouts are basically identical to each other >> >> >> >> > > >> >> >> >> > > >> >> >> >> > >--- or --- >> >> >> >> > > >> >> >> >> > >*option 2:* >> >> >> >> > > >> >> >> >> > > >> >> >> >> > >*@DomainEntity(persistence=JDO|EXTERNAL)* >> >> >> >> > >*@ViewModel* >> >> >> >> > > >> >> >> >> > >with >> >> >> >> > > >> >> >> >> > >*@DomainObjectLayout* >> >> >> >> > > >> >> >> >> > > >> >> >> >> > >where: >> >> >> >> > >* not symmetrical >> >> >> >> > >* some attributes of @DomainEntity don't apply if >> persistence=EXTERNAL >> >> >> >> > > >> >> >> >> > > >> >> >> >> > >--- or --- >> >> >> >> > > >> >> >> >> > >*option 3:* >> >> >> >> > > >> >> >> >> > >*@DomainObject(persistence=JDO|EXTERNAL|VIEW_MODEL)* >> >> >> >> > > >> >> >> >> > >with >> >> >> >> > > >> >> >> >> > >*@DomainObjectLayout* >> >> >> >> > > >> >> >> >> > > >> >> >> >> > >where: >> >> >> >> > >* is symmetrical >> >> >> >> > >* some attributes of @DomainEntity don't apply if >> persistence=EXTERNAL >> >> >> >> > >or >> >> >> >> > >VIEW_MODEL >> >> >> >> > >* concept of view model is less visible >> >> >> >> > > >> >> >> >> > > >> >> >> >> > > >> >> >> >> > >Cast your votes, please! >> >> >> >> > > >> >> >> >> > >Dan >> >> >> >> > > >> >> >> >> > > >> >> >> >> > > >> >> >> >> > >On 29 December 2014 at 15:02, GESCONSULTOR - Óscar Bou < >> >> >> >> > >o....@gesconsultor.com> wrote: >> >> >> >> > > >> >> >> >> > >> >> >> >> >> > >> >> >> >> >> > >> As currently there's no "special" support for AggregateRoots or >> >> >> >> > >> ValueObjects, no more annotations are needed. >> >> >> >> > >> >> >> >> >> > >> >> >> >> >> > >> Sounds like a vote to deprecate. Jeroen has said the same thing. >> >> >> >> > >Perhaps >> >> >> >> > >> they should be deleted in v2.0 and reappear, if we want them back, >> in >> >> >> >> > >v3.0. >> >> >> >> > >> >> >> >> >> > >> >> >> >> >> > >> I agree with Jeroen. >> >> >> >> > >> >> >> >> >> > >> Currently there's nothing specific about Aggregate Roots on Apache >> >> >> >> > >Isis, >> >> >> >> > >> at least on the most used modules, AFAK. >> >> >> >> > >> >> >> >> >> > >> >> >> >> >> > >> >> >> >> >> > >> * replace @DomainObject(viewModel=false) with >> >> >> >> > >> @DomainEntity(persistence=JDO) >> >> >> >> > >> ... this would be the default >> >> >> >> > >> >> >> >> >> > >> >> >> >> >> > >> I like it :) >> >> >> >> > >> >> >> >> >> > >> >> >> >> >> > >> * replace @DomainObject(viewModel=true) with >> >> >> >> > >> @DomainEntity(persistence=EXTERNAL) >> >> >> >> > >> >> >> >> >> > >> >> >> >> >> > >> This one also! >> >> >> >> > >> >> >> >> >> > >> ... for view models representing externally-persisted entities. >> In >> >> >> >> > >the >> >> >> >> > >> Javadoc, say that auditing, publishing and bounded are not >> supported >> >> >> >> > >for >> >> >> >> > >> these >> >> >> >> > >> * keep @ViewModel >> >> >> >> > >> ... extend to include the non-entity stuff from @DomainObject that >> >> >> >> > >does >> >> >> >> > >> apply (basically, I think that's just "objectType" ) >> >> >> >> > >> ... the intention being that this is used for application-layer >> >> >> >> > >views. >> >> >> >> > >> >> >> >> >> > >> >> >> >> >> > >> I agree. It should be kept for those use cases. >> >> >> >> > >> >> >> >> >> > >> >> >> >> >> > >> >> >> >> >> > >> keep @DomainObjectLayout, because everything in it applies equally >> to >> >> >> >> > >both >> >> >> >> > >> view models (either variety) and JDO entities. >> >> >> >> > >> >> >> >> >> > >> >> >> >> >> > >> >> >> >> >> > >> Mmmmm.... I would prefer to keep symmetry... I know it introduces >> >> >> >> > >some >> >> >> >> > >> redundant checks on implementation but, from the user's >> perspective, >> >> >> >> > >is a >> >> >> >> > >> clearer model ... >> >> >> >> > >> >> >> >> >> > >> >> >> >> >> > >> >> >> >> >> > >> I'll reply on your points on @Property and @Parameter separately. >> >> >> >> > >> >> >> >> >> > >> Thx >> >> >> >> > >> Dan >> >> >> >> > >> >> >> >> >> > >> >> >> >> >> > >> >> >> >> >> > >> >> >> >> >> > >> >> >> >> >> > >> Óscar Bou Bou >> >> >> >> > >> Responsable de Producto >> >> >> >> > >> Auditor Jefe de Certificación ISO 27001 en BSI >> >> >> >> > >> CISA, CRISC, APMG ISO 20000, ITIL-F >> >> >> >> > >> >> >> >> >> > >> 902 900 231 / 620 267 520 >> >> >> >> > >> http://www.twitter.com/oscarbou >> >> >> >> > >> >> >> >> >> > >> http://es.linkedin.com/in/oscarbou >> >> >> >> > >> >> >> >> >> > >> http://www.GesConsultor.com <http://www.gesconsultor.com/> >> >> >> >> > >> >> >> >> >> > >> >> >> >> >> > >> >> >> >> >> > >> Este mensaje y los ficheros anexos son confidenciales. Los mismos >> >> >> >> > >> contienen información reservada que no puede ser difundida. Si >> usted >> >> >> >> > >ha >> >> >> >> > >> recibido este correo por error, tenga la amabilidad de eliminarlo >> de >> >> >> >> > >su >> >> >> >> > >> sistema y avisar al remitente mediante reenvío a su dirección >> >> >> >> > >electrónica; >> >> >> >> > >> no deberá copiar el mensaje ni divulgar su contenido a ninguna >> >> >> >> > >persona. >> >> >> >> > >> Su dirección de correo electrónico junto a sus datos personales >> >> >> >> > >constan en >> >> >> >> > >> un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es >> >> >> >> > >la de >> >> >> >> > >> mantener el contacto con Ud. Si quiere saber de qué información >> >> >> >> > >disponemos >> >> >> >> > >> de Ud., modificarla, y en su caso, cancelarla, puede hacerlo >> enviando >> >> >> >> > >un >> >> >> >> > >> escrito al efecto, acompañado de una fotocopia de su D.N.I. a la >> >> >> >> > >siguiente >> >> >> >> > >> dirección: Gesdatos Software, S.L. , Paseo de la Castellana, 153 >> bajo >> >> >> >> > >- >> >> >> >> > >> 28046 (Madrid), y Avda. Cortes Valencianas num. 50, 1ºC - 46015 >> >> >> >> > >(Valencia). >> >> >> >> > >> Asimismo, es su responsabilidad comprobar que este mensaje o sus >> >> >> >> > >archivos >> >> >> >> > >> adjuntos no contengan virus informáticos, y en caso que los >> tuvieran >> >> >> >> > >> eliminarlos. >> >> >> >> > >> >> >> >> >> > >> >> >> >> >> > >> >> >> >> >> > >> >> >> >> >> > >> >> >> >> >> > >> >> >> >> >> > >> >> >> >> > -- >> >> >> >> > Sent from my phone with K-9 Mail. >> >> >> >> > Please excuse my brevity. >> >> >>