Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Jeff Higgins Newsgroups: comp.lang.java.programmer Subject: Re: Java EE Architecture Date: Wed, 16 Oct 2013 20:19:15 -0400 Organization: A noiseless patient Spider Lines: 67 Message-ID: References: <69e1528a-aa62-41ce-88e5-1540f437e89e@googlegroups.com> <0672ja-utj.ln1@tempest.fredriksson.dy.fi> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Thu, 17 Oct 2013 00:19:16 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="6b9e92482af47766954d85fb77d372f5"; logging-data="9420"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/5mM1WI01GK0Pr1dpAqsOurvfPEry3zo8=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130922 Icedove/17.0.9 In-Reply-To: <0672ja-utj.ln1@tempest.fredriksson.dy.fi> Cancel-Lock: sha1:WDXYUoOBDz6ihbE4qG57QEu7Vos= Xref: csiph.com comp.lang.java.programmer:26347 On 10/16/2013 06:42 AM, Donkey Hottie wrote: > 16.10.2013 11:45, 1connu kirjoitti: >> lipska the kat a écrit : >>> On 09/10/13 21:41, art.marole@gmail.com wrote: >>>> Hi all, >>>> >>>> I would like to prepare typical Java EE solution (EJB, JSF, JPA) now, >>>> and I have quite stupid problem related with domain objects. I want >>>> to create Person class as persistence class, but I don't know in >>>> which module I shoud put this class: Business Layer (ejb module) or >>>> in Integration Layer (jar module). >>>> >>>> Person class is more related with logic, so I should put it in ejb >>>> module, but in this case I will need to create dependency relation >>>> from Integration Layer to Business Layer as Integration Layer need to >>>> know what object should store in DB (ex. void store(Person object){};). >>>> Put Person class in Integration Layer will remove this unwanted >>>> dependency, but I feel that Person class is more Business class then >>>> Integration class. >>>> >>>> What do you think about it? >>> >>> >>> A Person class ... A PERSON class., please, please, *please* don't >>> have a Person class >>> >>> For the sake of whatever omnipotent deity you pray to, do not have a >>> Person class >>> >>> *People* do not belong in a computer system. >>> >>> Why? >>> >>> Because it's a poor abstraction. >>> >>> How are you going to model consciousness, sentience, the 'mind', the >>> 'soul'? let alone arms legs, eyes and teeth :-) >>> >>> You *do not need* a Person class. >>> >>> Let's put it another way >>> >>> The very fact that you are having problems deciding where your Person >>> belongs should alert you to the fact that it is a poor abstraction. >>> >>> Try Account, or Record, or if you absolutely *must* User but not >>> Person, you will end up regretting it. >>> >>> lipska >>> >>> >> Why not ? >> You can have an abstract class Person with minimum field (name, date >> birth) and sub class depending of role of theses persons (ex User >> (login/password) ) in your model. > > I see no problem with Person. > > I have interface IPerson, and implementations Person and ExternalPerson. > I'm a lead programmer on an Identity Management solution. > > > Higgins 2.0 :)