Solved

UI seperation from DB-access

Posted on 1998-10-13
4
126 Views
Last Modified: 2010-04-06
Hi,

We are at the start from a new project. For the maintenance of the system we decided that the coupling between the user interface and the database access should be as low as possible.
A database module written to access a certain kind of data like customer information should easy be transferable to another part of the application. How do you setup this, how do you get all your business logic in the database modules and how do you avoid database logic in forms!!

What tips can you guys give me on this topic?
What about OO in database modules?


0
Comment
Question by:castelli
  • 2
  • 2
4 Comments
 

Author Comment

by:castelli
ID: 1342744
Edited text of question
0
 
LVL 4

Accepted Solution

by:
dwwang earned 160 total points
ID: 1342745
You can just do any OO programming in data-modules, no problem.
For your question, below is an example(I usually use in our project):

type TMyDataModule=class(TDataModule)
public
function myBusinessfunc(...):retType;
end;

var
myDm:TMyDataModule;

impementation
function myBusinessfunc(...):retType;
begin
     //Access Database ....
end;

In other forms, just call myDM.myBusinessfunc;

That will enclose all your Data Logic in DM.

0
 
LVL 4

Expert Comment

by:dwwang
ID: 1342746
Are you still there?
0
 

Author Comment

by:castelli
ID: 1342747
Thanks , We were working out different scenario's, Sorry about the long waiting time...
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Run video youtube webbrowse 10 62
Performance of SQL statement 37 111
CheckListBox usage 3 59
update joined tables 2 46
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question