I'm pondering having classes representing base tables at the moment. I'm coming to the conclusion that in a lot of cases it's cool to have a manager class. This has methods such as 'CustomerAdd', 'CustomerGet', 'CustomerUpdate'. For example, CustomerGet returns an Xml document (currently via. FOR XML in SQL2K) which can be transformed. CustomerAdd and CustomerUpdate take parameters such as string name, string addr, int age.
They validate the params before passing them into the SP. I avoid the CustomerData class, which I don't have much use for. It flies in the face of my Java friends who seem to want classes modelling everything. Graeme. -----Original Message----- From: Francesco Sanfilippo [mailto:[EMAIL PROTECTED]] Sent: 17 May 2002 16:20 To: [EMAIL PROTECTED] Subject: Re: [DOTNET] OT: N-Tier Design I have built a DataAccess namespace which has the raw methods that touch SQL Server: ExecSPRetSC, ExecSPRetDT, ExecSPRetDS, ExecSPRetDR, etc. In my next level up, the BusinessLogic namespace, I have classes that are modeled after tables in my database: DBCountry, DBBanner, DBPerson, DBEmailProfile, etc. The above classes contain simple methods such as: Insert, Update, Delete, SelectOne, SelectAll, GetRandomRow as well as more specialized methods one would expect to see. Francesco >From: "Rolls, Robert" <[EMAIL PROTECTED]> >Reply-To: dotnet discussion <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >Subject: [DOTNET] OT: N-Tier Design >Date: Fri, 17 May 2002 14:21:20 +1000 > >how many of you guys have raw SQL in the business Business Logic layer - or >do you have coressponding functions in you Data Access Layer i.e > >UI->onClick()->BBL->GetCustomers()->DAL->ExecuteQuery( SQL ); > >or > >UI->onClick()->BBL->GetCustomers()->DAL->GetCustomers() > > >Regards, >Robert Rolls > > >**********************************************************************" >This correspondence is for the named person's use only. It may >contain confidential or legally privileged information or both. " >No confidentiality or privilege is waived or lost by any " >mistransmission. If you receive this correspondence in error, please >immediately delete it from your system and notify the sender. You >must not disclose, copy or rely on any part of this correspondence >if you are not the intended recipient. > >Any views expressed in this message are those of the individual sender, >except where the sender expressly, and with authority, states them to >be the views of Vodafone. > >This email has been checked for viruses. >*************************************************************************** ******************* > >You can read messages from the DOTNET archive, unsubscribe from DOTNET, or >subscribe to other DevelopMentor lists at http://discuss.develop.com. _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. _____________________________________________________________________ This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Control Centre. For further information visit http://www.star.net.uk/stats.asp IMPORTANT NOTICE This communication contains information, which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s) please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you have received this communication in error please return it to the sender. The opinions expressed within this communication are not necessarily those expressed by Teletext Ltd. Teletext Ltd. 101 Farm Lane Fulham London SW6 1QJ Registered in England number 2694814 _____________________________________________________________________ This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Control Centre. For further information visit http://www.star.net.uk/stats.asp You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.
