BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Design Question

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OO design
View previous topic :: View next topic  
Author Message
Jeremy
Guest





PostPosted: Wed Jan 05, 2005 8:28 am    Post subject: Design Question Reply with quote



I am creating a Web Application and wish to use the 3 layer approach
Presentation - Logic - DB Layer

However I am stuck as to where I separate the Logic from the business
layer to the DB Layer and how I should extend my classes in the future.

eg

type TAssessmentDetails = class(TAdvObject)
public
FID : Integer;
Fassessname : String;
Fcalyear : String;
Fgroupcode : String;
constructor Create;
published
property ID : Integer read FID write FID;
property assessname : String read Fassessname write Fassessname;
property calyear : String read Fcalyear write Fcalyear;
property groupcode : String read Fgroupcode write Fgroupcode;
end;


type TAssessmentDB = class
private
function GetConnectionString:string;
public
function GetAssessmentDetails(sSchoolID : String;iID: Integer) :
TAssessmentDetails;
end;



So should down the track I need to extend the functionality of
TAssessmentDetails ie TXTRAAssessmentDetails = class(TAssessmentDetails)
the original GetAssessmentDetails function no longer works because it
is of type TAssessmentDetails.


Maybe I need to design it better? Any advise/links appreciated.

Jeremy
Back to top
Joanna Carter (TeamB)
Guest





PostPosted: Wed Jan 05, 2005 10:01 am    Post subject: Re: Design Question Reply with quote



"Jeremy " <jeremy@ lanwest dot com dot au> a écrit dans le message de news:
[email]41dba53e (AT) newsgroups (DOT) borland.com[/email]...

Quote:
I am creating a Web Application and wish to use the 3 layer approach
Presentation - Logic - DB Layer

However I am stuck as to where I separate the Logic from the business
layer to the DB Layer and how I should extend my classes in the future.

Take a look at the articles on OPF on my website www.carterconsulting.org.uk

Joanna

--
Joanna Carter (TeamB)

Consultant Software Engineer
TeamBUG support for UK-BUG
TeamMM support for ModelMaker



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OO design All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.