Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

? How Control Different GUIs to the Same Object

Status
Not open for further replies.

Pontelo

Programmer
Dec 18, 2001
80
BR
Hi People, Pls give me your opinions.
Suppose we have several customers and we have implemented an object that make their customers orders.
We can create a GUI that will cover most of our customers needs. A grid to put items selected, buttons to implement certain functions, etc...
But there are some group of them that will need another kind of GUI,let´s say, with photos and other different needs. More complex needs that is not just open or close some panels and frames.
And thinking like this, we can have 2 or 3 or more different GUIs, always fitting our customers needs.
I would like to have only one object that contains the business logic. Doesn´t matter the GUI, our object have methods to treat them in a standardized mode. And we can create new GUIs with none or few changes in our object.
Depending on the system is deployed, we configure the appropriate GUI.
In delphi, what is the best manner of doing this ?
If I put this not clear, pls let me know and I´ll try to explain better.
Tks in Advance !
 
Just hide features not being used is my opinion.
If there is a picture available then
image1.visible := true
else
image1.visible := false;

Hide what you dont need and make visible what you want users to see.


[bobafett] BobbaFet [bobafett]

Everyone has a right to my opinion.
Great Delphi Websites faq102-5352
 
You might be interested in some related reading (not Delphi specific - but object-oriented programming material):
The philosophy is basically to expose the objects directly to the user. The layers between the user and code are fewer and the presentation layer (GUI) is generated directly from the object structure. (
There is an example of what this look like in practice:

Clive [infinity]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer."
Paul Ehrlich
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
 
tks people.
I bookmark and had an overview over naked. It´s an extensive reading and my english is not so fast. Seems I´ll get some ideas there.
Our problem is that we want to isolate the logic from the GUI.
It´s not only hide and show certain components but have 2 or 3 different forms to present and get data from user, and interface this with our orders object.
Suppose, p.ex., we have 2 customers. One is a supermarket and the other is a DVD Rent. Both can be controlled by our orders object but the way we show and get user data may be completelly different. Must we create an unit (non-visual) with our order object and then create and show one of the forms above, as needed ?
This is the kind of our doubt. We are not Delphi expert (yet i hope).


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top