X-Received: by 10.58.237.10 with SMTP id uy10mr807265vec.16.1381922343310; Wed, 16 Oct 2013 04:19:03 -0700 (PDT) Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!o2no7893013qas.0!news-out.google.com!9ni47091qaf.0!nntp.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Wed, 16 Oct 2013 06:19:02 -0500 Date: Wed, 16 Oct 2013 14:18:01 +0300 From: Donkey Hottie User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: Java EE Architecture References: <69e1528a-aa62-41ce-88e5-1540f437e89e@googlegroups.com> <0672ja-utj.ln1@tempest.fredriksson.dy.fi> In-Reply-To: Message-ID: <9892ja-afn.ln1@tempest.fredriksson.dy.fi> Lines: 91 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-7V86iB5iXYuJ5xABHwA3abHeS5scV3hJ7k7aPpnOtE0ECC0DqF/Xkb7bYX6yRibkHYnMhuFgas72ZAk!U2fFGLuROvVA+iFNLeUzmb032lekwTuOFoMgVkFOlQoa2BLbG6olcwytO+nc46uMxa8EDA== X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 4171 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: csiph.com comp.lang.java.programmer:26332 16.10.2013 13:55, lipska the kat kirjoitti: > On 16/10/13 11:42, Donkey Hottie wrote: >> 16.10.2013 11:45, 1connu kirjoitti: >>> lipska the kat a =E9crit : >>>> 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) no= w, >>>>> 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 the= n >>>>> 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 Perso= n >>>> 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 ExternalPerso= n. >> I'm a lead programmer on an Identity Management solution. >=20 > You *cannot* be serious ... IPerson groan :-( >=20 > If you are developing an Identity Management system surely Identity > might be a better abstraction ... just a thought. >=20 >=20 >=20 >=20 A Person may have more than one Identities. As well as more than one UserAccounts. --=20 Habit is habit, and not to be flung out of the window by any man, but coa= xed down-stairs a step at a time. -- Mark Twain, "Pudd'nhead Wilson's Calendar