| View previous topic :: View next topic |
| Author |
Message |
Jeremy Guest
|
Posted: Wed Jan 05, 2005 8:28 am Post subject: Design Question |
|
|
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
|
Posted: Wed Jan 05, 2005 10:01 am Post subject: Re: Design Question |
|
|
"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 |
|
 |
|