[DUG] Program design question

Rohit Gupta rohit at cfl.co.nz
Fri Jun 10 09:22:37 NZST 2005


I would use separate proggies and pass data through ini or 
database file.  Keep away from mailboxes and pipes, they are a 
pain.  I have not tried shared memory.

I have used an app that used TCPIP which I thought was an 
excellent way to do it.  But again I havent tried that yet.  Actually I 
should give it a plug, its a mail manager written in Delphi, freeware 
and and the name escapes me.  It was easy to setup and works 
well.

From:           	"John Bird" <johnkbird at paradise.net.nz>
To:             	"'NZ Borland Developers Group - Delphi List'" <delphi at ns3.123.co.nz>
Subject:        	[DUG] Program design question
Date sent:      	Thu, 9 Jun 2005 18:09:18 +1200
Organization:   	John Bird Consulting
Send reply to:  	johnkbird at paradise.net.nz,
  	NZ Borland Developers Group - Delphi List <delphi at ns3.123.co.nz>
	<mailto:delphi-request at ns3.123.co.nz?subject=unsubscribe>
	<mailto:delphi-request at ns3.123.co.nz?subject=subscribe>

[ Double-click this line for list subscription options ] 

A program design question: whether to put extra functionality into one
program or several.

I have written a monitor program (automated time recording).  Ideally I want
it as slim as possible since its running all the time.  Hence my idea is to
have one small 1-form program, and when I click on any of the report or
setup buttons, it actually fires up a separate and much larger program using
shellexecute, and suspends itself (closes the logfile) while the other
program runs.

Question 1 - what is the best way for two separate programs to exchange
information - the monitor program needs to be told when the setup program
finishes in order to start running again, and also there is some other
information such as setup options I need to communicate back and forth (eg
which program and/or form fired up the setup program so it can give it focus
again at the end).  Now I can write this information in a disk data file,
but I reckon there has in Windows to be a better way to do it - using some
kind of message.  Or is the simplest to use parameter strings in the
comandline when starting the second program?

Question 2 - if I put all code in one program and don't create the extra
forms/Windows till needed, I am pretty sure I still will have a much bigger
program than option 1.  Any comments?


John Bird
 _______________________________________________
Delphi mailing list
Delphi at ns3.123.co.nz http://ns3.123.co.nz/mailman/listinfo/delphi


_______________________________________________
Delphi mailing list
Delphi at ns3.123.co.nz
http://ns3.123.co.nz/mailman/listinfo/delphi
Regards

Rohit

======================================================================
CFL - Computer Fanatics Ltd.  21 Barry's Point Road, AKL, New Zealand
PH    (649) 489-2280 
FX    (649) 489-2290
email rohit at cfl.co.nz  or  r.gupta at xtra.co.nz
======================================================================




More information about the Delphi mailing list