Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

UI seperation from DB-access

Posted on 1998-10-13
4
Medium Priority
?
134 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 

Author Comment

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

Accepted Solution

by:
dwwang earned 480 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

715 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