|
From: =?iso-8859-1?Q?<jp....@ti...> - 2003-07-12 12:28:11
|
What I used also in the past is letting the DAO create a 'data-layer' lis= t and after that in business layer, iterate the list to replace data-laye= r elements by business-layer ones knowing the contextual information.=0D=0A= =0D=0AThis is certainly a better school-approach, but has clearly a perfo= rmance drawback.=0D=0A=0D=0ALetting rowmap being able to create definitiv= e objects (indeed having a user defined contextual info), seems to me, fo= r now, a better solution.=0D=0A=0D=0AJean-Pierre =0D=0A=0D=0A---------- I= nitial Header -----------=0D=0A=0D=0AFrom : springframework-develope= r-...@li...=0D=0ATo : "rod.johnson" <rod.johns= on...@in...>=0D=0ACc : "trisberg" <tri...@tr...>,"k= k" <kk...@kk...>,"springframework-developer" <springframework-developer@= lists.sourceforge.net>=0D=0ADate : Sat, 12 Jul 2003 12:05:19 +0200=0D= =0ASubject : [Springframework-developer] Re: [Springframework-developer] = Locale in rowmap?=0D=0A=0D=0AHi Ken, Thomas, Rod,=0D=0A=0D=0AIt seems be = a general miscomprehension.=0D=0A=0D=0A1) I have no intend to put any dep= endency between WEB and JDBC.=0D=0AMy request is only at being able to ad= d an optional 'Object' supplemental attribute in execute method. The inte= nd of this attribute is simply to be passed on rowmap.=0D=0A=0D=0A2) Why = cannot this object be passed simply on the current methods?=0D=0AJust bec= ause JDBC has nothing to do with. It is only for rowmap method as this me= thod is responsible for creating (business) objects.=0D=0A=0D=0A3) Typica= l example: =0D=0ASearching adresses. =0D=0A=0D=0Aa)Consider the searched = adresses are not localized on the database and contain a country informat= ion.=0D=0A=0D=0Ab)The database contain only the country code of the addre= ss.=0D=0A=0D=0Ac)With this country code is read from the database, the ro= wmap method will have to create a Country Object to put in the Address on= e. This Country object will have a name property matching with the curren= t user to serve and has nothing to do with the JDBC record.=0D=0A=0D=0AFo= r creating the correct Country Object, rowmap has to know the Locale to s= erve. In this case the new 'Object' parameter would be filled with the Us= er Locale and casted so in rowmap. But in others cases, it could be anoth= er information as the Locale.=0D=0A=0D=0AThe main need is:=0D=0AROWMAP IS= RESPONSIBLE FOR CREATING OBJECTS AND FOR THIS IT CAN HAVE TO KNOW OTHER = INFORMATION AS JUST THESE READ IN THE DATABASE.=0D=0A=0D=0AThis other inf= ormation can be just right during the 'execution' call and cannot be in t= his case an instance variable. =0D=0A=0D=0A=0D=0ARegards,=0D=0AJean-Pierr= e=0D=0A=0D=0A---------- Initial Header -----------=0D=0A=0D=0AFrom := "Rod Johnson" <rod...@in...>=0D=0ATo : <trisberg= @tridb.com>, "Ken Krebs" <kk...@kk...>=0D=0ACc : "JP Pawlak" <j= p.p...@ti...>, "'springframework-developer'" <springframewor= k-d...@li...>=0D=0ADate : Thu, 10 Jul 2003 17:5= 5:12 +0100=0D=0ASubject : Re: [Springframework-developer] Locale in rowma= p?=0D=0A=0D=0A> I would agree with Ken here - we must avoid any dependenc= ies between the=0D=0AJDBC=0D=0A> framework and the Web framework.=0D=0A=0D= =0A+1. I know of several companies in the UK using JDBC only at this poin= t.=0D=0AIt's a great route in for Spring.=0D=0A=0D=0A=0D=0A=0D=0A=0D=0A**= ******** L'ADSL A 20 EUR/MOIS**********=0D=0ATiscali propose l'ADSL le mo= ins cher du march=E9 : 20 EUR/mois et le modem ADSL offert ! =0D=0APour p= rofiter de cette offre exceptionnelle, cliquez ici : http://register.tisc= ali.fr/adsl/=0D=0AOffre soumise =E0 conditions.=0D=0A=0D=0A=0D=0A=0D=0A=0D= =0A-------------------------------------------------------=0D=0AThis SF.N= et email sponsored by: Parasoft=0D=0AError proof Web apps, automate testi= ng & more.=0D=0ADownload & eval WebKing and get a free book.=0D=0Awww.par= asoft.com/bulletproofapps1=0D=0A_________________________________________= ______=0D=0ASpringframework-developer mailing list=0D=0ASpringframework-d= eve...@li...=0D=0Ahttps://lists.sourceforge.net/lists/l= istinfo/springframework-developer=0D=0A=0A=0A********** L'ADSL A 20 EUR/M= OIS**********=0ATiscali propose l'ADSL le moins cher du march=E9 : 20 EUR= /mois et le modem ADSL offert ! =0APour profiter de cette offre exception= nelle, cliquez ici : http://register.tiscali.fr/adsl/=0AOffre soumise =E0= conditions.=0A |