comp.lang.ada
 help / color / mirror / Atom feed
* Re; [OT] Best way to isolate a GUI?
  2003-02-16 10:19 Jano
@ 2003-02-17  0:57 ` tmoran
  2003-02-17  7:25   ` Jano
  0 siblings, 1 reply; 10+ messages in thread
From: tmoran @ 2003-02-17  0:57 UTC (permalink / raw)


> I want the core functionality to be isolated from the GUI.
What do you mean here by "the GUI"?  If your app is a Photoshop type
program, or a video editor or a spreadsheet or a control panel for a robot
undersea explorer or a database of names and addresses, or a Virtual
Reality program or a "twitch game".....  you will have different
requirements for your "Graphical User Interface" and, most likely,
different optimal solutions.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Re; [OT] Best way to isolate a GUI?
  2003-02-17  0:57 ` Re; " tmoran
@ 2003-02-17  7:25   ` Jano
  2003-02-17 14:09     ` Bobby D. Bryant
  0 siblings, 1 reply; 10+ messages in thread
From: Jano @ 2003-02-17  7:25 UTC (permalink / raw)


En el mensaje <UrW3a.144381$Ec4.143958@rwcrnsc52.ops.asp.att.net>, 
tmoran@acm.org dice...

> > I want the core functionality to be isolated from the GUI.
> What do you mean here by "the GUI"?  If your app is a Photoshop type
> program, or a video editor or a spreadsheet or a control panel for a robot
> undersea explorer or a database of names and addresses, or a Virtual
> Reality program or a "twitch game".....  you will have different
> requirements for your "Graphical User Interface" and, most likely,
> different optimal solutions.

I'm reading all responses and am a little ashamed about the complexity 
this matter has revealed... I was expecting it to be a little simpler...

Anyways, I not need to be secretive about my project, since is a 
personal one. I'm trying to implement a basic Gnutella servant, just to 
improve my skills in Ada. You see now what's the core and what's the 
GUI...

My background in Ada is so-so: I've been teached the core features of 
Ada 83 and tasking capabilities of Ada 95, and have already finished an 
small hard realtime monitoring system, as experience accounts. OO 
things, I've read some eBooks but not used them in any real project.

I'm digesting your responses, please keep these insightful advices 
coming.

-- 
-------------------------
Jano
402450[at]cepsz.unizar.es
-------------------------



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Re; [OT] Best way to isolate a GUI?
  2003-02-17  7:25   ` Jano
@ 2003-02-17 14:09     ` Bobby D. Bryant
  2003-02-17 21:12       ` Jano
  0 siblings, 1 reply; 10+ messages in thread
From: Bobby D. Bryant @ 2003-02-17 14:09 UTC (permalink / raw)


On Mon, 17 Feb 2003 08:25:06 +0100, Jano wrote:

> Anyways, I not need to be secretive about my project, since is a
> personal one. I'm trying to implement a basic Gnutella servant, just to
> improve my skills in Ada. You see now what's the core and what's the
> GUI...

It's still not clear (to me) from your posts what exactly you're asking.
Are you saying you want to write a client for Gnutella?  And when you say
you want to "isolate the GUI", are you saying that you want a run-time
isolation, or that you want the code separated out so that you can replace
it with a different GUI without having to modify your "core" application
code?

In the latter case the answer is obvious: put your "core" code in one or
more Ada packages and put your GUI code in others.  This will take some
planning ahead, since GUI-based applications tend to be driven by the GUI
and only access the "core" code as callbacks; you will need to think
carefully about what sort of callbacks will be common across various GUIs,
and define your "core" package(s) on the basis of those requirements.

If you want a run-time separation, you still need to give a clearer
explanation of what kind of separation you want.  If you just want to
write a client for Gnutella you will have to write your client to use
whatever communication protocol Gnutella is based on, which is only an Ada
question when it comes down to "how do I implement that?".

-- 
Bobby Bryant
Austin, Texas




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Re; [OT] Best way to isolate a GUI?
  2003-02-17 14:09     ` Bobby D. Bryant
@ 2003-02-17 21:12       ` Jano
  2003-02-18  7:24         ` Jean-Pierre Rosen
  0 siblings, 1 reply; 10+ messages in thread
From: Jano @ 2003-02-17 21:12 UTC (permalink / raw)


En el mensaje <pan.2003.02.17.14.09.34.88722@mail.utexas.edu>, 
bdbryant@mail.utexas.edu dice...
> On Mon, 17 Feb 2003 08:25:06 +0100, Jano wrote:
> 
> > Anyways, I not need to be secretive about my project, since is a
> > personal one. I'm trying to implement a basic Gnutella servant, just to
> > improve my skills in Ada. You see now what's the core and what's the
> > GUI...

> If you want a run-time separation, you still need to give a clearer
> explanation of what kind of separation you want.  If you just want to
> write a client for Gnutella you will have to write your client to use
> whatever communication protocol Gnutella is based on, which is only an Ada
> question when it comes down to "how do I implement that?".

I want total isolation between core and GUI. Really, that it's going to 
be a Gnutella servant is not relevant except for background. For total 
isolation I mean that the core could run without a GUI. I.e., the GUI 
code is not necessary at compile time. Indeed, a Gnutella servant 
doesn't need the GUI except for feedback and getting new searches from 
the user. That could be accomplished with a single input box. 

I'll detail my first thought, so you can see what I want and you can 
reduce then my idea to pieces ;-).

I was thinking of using a proccess for the core, and none..many 
proccesses as GUI. To accomplish that:

a) The core opens a listening socket.
b) Spawn a child for every new connected "thing" (GUI) to the listening 
socket.
c) These new connections (streams) are used by the core to notify the 
listener (client in this context) about events, to pass data, or by the 
GUIs to request specific data it want to display/refresh.

The communication protocol could be anything I want (hence the 
suggestion of XML). I need "only" :) to define a proper protocol (but my 
first idea is, given that I expect to use heavily XML for config files 
and persistence of objects, simply pass the objects as its XML 
representation and a bunch of requesting/notifying words).

One GUI proccess could be a web server (AWS), or could be a GtkAda GUI, 
or whatever. But that's the point.

Thoughts?

The only example that comes to my mind like that is the WinGate 
router/NAT software. It's a NT service that listens in 808 for the GUI, 
which is a regular Windows app.

Oh, and Audiogalaxy Satellite was also using that approach.

But I'm only beginning to get at the other suggestions.

-- 
-------------------------
Jano
402450[at]cepsz.unizar.es
-------------------------



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Re; [OT] Best way to isolate a GUI?
  2003-02-17 21:12       ` Jano
@ 2003-02-18  7:24         ` Jean-Pierre Rosen
  0 siblings, 0 replies; 10+ messages in thread
From: Jean-Pierre Rosen @ 2003-02-18  7:24 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1020 bytes --]


"Jano" <402450@cepsz.unizar.es> a �crit dans le message de news: MPG.18bb6ea1d4e7753f98969c@News.CIS.DFN.DE...
> I want total isolation between core and GUI. Really, that it's going to
> be a Gnutella servant is not relevant except for background. For total
> isolation I mean that the core could run without a GUI. I.e., the GUI
> code is not necessary at compile time. Indeed, a Gnutella servant
> doesn't need the GUI except for feedback and getting new searches from
> the user. That could be accomplished with a single input box.
>
A solution that I have used quite often in that kind of occasion:
1) make your application command line oriented only (read from standard input, output to standard output)
2) run it from Tcl and let Tcl send the commands.
3) (optional) integrate the Tcl part into the program with Tash, if you don't want Tcl to be apparent.


--
---------------------------------------------------------
           J-P. Rosen (rosen@adalog.fr)
Visit Adalog's web site at http://www.adalog.fr





^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: Re; [OT] Best way to isolate a GUI?
@ 2003-02-18 10:26 Lionel.DRAGHI
  0 siblings, 0 replies; 10+ messages in thread
From: Lionel.DRAGHI @ 2003-02-18 10:26 UTC (permalink / raw)
  To: comp.lang.ada



| -----Message d'origine-----
| De: Jano [mailto:402450@cepsz.unizar.es]
...
| 
| One GUI proccess could be a web server (AWS), or could be a 
| GtkAda GUI, 
| or whatever. But that's the point.
| 
| Thoughts?

IMHO, the design with AWS is not comparable to the one with a classical GUI
: there is no big added value to separate AWS from the main program. The GUI
is allready separated, it's your browser.

Lionel Draghi.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: Re; [OT] Best way to isolate a GUI?
@ 2003-02-18 10:57 Lionel.DRAGHI
  2003-02-18 16:29 ` Jano
  0 siblings, 1 reply; 10+ messages in thread
From: Lionel.DRAGHI @ 2003-02-18 10:57 UTC (permalink / raw)
  To: comp.lang.ada



| -----Message d'origine-----
| De: Lionel.DRAGHI@fr.thalesgroup.com
...
| IMHO, the design with AWS is not comparable to the one with a 
| classical GUI
| : there is no big added value to separate AWS from the main 
| program. The GUI
| is allready separated, it's your browser.
it's _for example_ your browser.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Re; [OT] Best way to isolate a GUI?
  2003-02-18 10:57 Lionel.DRAGHI
@ 2003-02-18 16:29 ` Jano
  0 siblings, 0 replies; 10+ messages in thread
From: Jano @ 2003-02-18 16:29 UTC (permalink / raw)


Lionel.DRAGHI@fr.thalesgroup.com wrote in message news:<mailman.15.1045565811.9948.comp.lang.ada@ada.eu.org>...
> | -----Message d'origine-----
> | De: Lionel.DRAGHI@fr.thalesgroup.com
>  ...
> | IMHO, the design with AWS is not comparable to the one with a 
> | classical GUI
> | : there is no big added value to separate AWS from the main 
> | program. The GUI
> | is allready separated, it's your browser.
>  it's _for example_ your browser.

Whereas you have a point, I had thought of that. The point of
separating AWS from the main program is that

1) It really doesn't perform core functionality
2) I need not to develop a definite implementation of the GUI, web
oriented.

I have seen the SOAP module in AWS and I like that approach. Is nearly
equal to my first idea, only that it's standardized. It leaves open
any languaje for the GUI and it's completely isolated. Mmm, anyone
using SOAP for similar purposes?



^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: Re; [OT] Best way to isolate a GUI?
@ 2003-02-18 18:24 Lionel.DRAGHI
  2003-02-18 19:52 ` Jano
  0 siblings, 1 reply; 10+ messages in thread
From: Lionel.DRAGHI @ 2003-02-18 18:24 UTC (permalink / raw)
  To: comp.lang.ada



| -----Message d'origine-----
| De: 402450@cepsz.unizar.es [mailto:402450@cepsz.unizar.es]
..
| Whereas you have a point, I had thought of that. The point of
| separating AWS from the main program is that
| 
| 1) It really doesn't perform core functionality
| 2) I need not to develop a definite implementation of the GUI, web
| oriented.
That's true, my point is not right. Only the display engine is outside, but
the GUI definition is still there...

| I have seen the SOAP module in AWS and I like that approach. Is nearly
| equal to my first idea, only that it's standardized. It leaves open
| any languaje for the GUI and it's completely isolated. Mmm, anyone
| using SOAP for similar purposes?

I'am not a Distributed System Annex specialist, but the DSA seems to provide
a more straightforward way to reach your goal, because there is no need to
define a new protocol on top of SOAP or whatever. You just need to define an
Ada interface between the GUI and the core, and categorize it the right way
(RCI?).
It suppose it should then be easy to build separate partition for the core
and for the GUI (or a single exe if needed), and to get the core partition
able to run independently.

Lionel.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: Re; [OT] Best way to isolate a GUI?
  2003-02-18 18:24 Re; [OT] Best way to isolate a GUI? Lionel.DRAGHI
@ 2003-02-18 19:52 ` Jano
  0 siblings, 0 replies; 10+ messages in thread
From: Jano @ 2003-02-18 19:52 UTC (permalink / raw)


En el mensaje <mailman.17.1045592634.9948.comp.lang.ada@ada.eu.org>, 
Lionel.DRAGHI@fr.thalesgroup.com dice...

> I'am not a Distributed System Annex specialist, but the DSA seems to provide
> a more straightforward way to reach your goal

Yes, I'm completely new to the DSA. I'll read about it and will choose 
between SOAP or DSA. The point I see in favor of SOAP is that doesn't 
force to use Ada for the GUI. But probably DSA is more flexible with 
less starting work. I don't know, really...

-- 
-------------------------
Jano
402450[at]cepsz.unizar.es
-------------------------



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2003-02-18 19:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-18 18:24 Re; [OT] Best way to isolate a GUI? Lionel.DRAGHI
2003-02-18 19:52 ` Jano
  -- strict thread matches above, loose matches on Subject: below --
2003-02-18 10:57 Lionel.DRAGHI
2003-02-18 16:29 ` Jano
2003-02-18 10:26 Lionel.DRAGHI
2003-02-16 10:19 Jano
2003-02-17  0:57 ` Re; " tmoran
2003-02-17  7:25   ` Jano
2003-02-17 14:09     ` Bobby D. Bryant
2003-02-17 21:12       ` Jano
2003-02-18  7:24         ` Jean-Pierre Rosen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox