comp.lang.ada
 help / color / mirror / Atom feed
* Should a GUI be separated from the application?
@ 2006-09-26 17:16 Lucretia
  2006-09-27 13:09 ` Stephen Leake
  0 siblings, 1 reply; 9+ messages in thread
From: Lucretia @ 2006-09-26 17:16 UTC (permalink / raw)


Hi,

When developing an application it is *mostly* combined with the GUI, a
lot of toolkits do this. You would extend a UI tagged-type (or class,
or whatever your language uses) and include the code inside the new
tagged-type, an example would be a toolkit which provides event handler
callbacks via primitive types (a la CLAW) thus forcing you to include
your application code into the new derived type.

Is this the best thing to do? Should I give the users the option?

Thanks,
Luke.




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

* Re: Should a GUI be separated from the application?
  2006-09-26 17:16 Should a GUI be separated from the application? Lucretia
@ 2006-09-27 13:09 ` Stephen Leake
  2006-09-27 18:26   ` tmoran
  2006-09-28  6:09   ` Simon Wright
  0 siblings, 2 replies; 9+ messages in thread
From: Stephen Leake @ 2006-09-27 13:09 UTC (permalink / raw)


"Lucretia" <lucretia9@lycos.co.uk> writes:

> When developing an application it is *mostly* combined with the GUI, a
> lot of toolkits do this. You would extend a UI tagged-type (or class,
> or whatever your language uses) and include the code inside the new
> tagged-type, an example would be a toolkit which provides event handler
> callbacks via primitive types (a la CLAW) thus forcing you to include
> your application code into the new derived type.
>
> Is this the best thing to do? 

The users have the option of making the "application code" in the GUI
framework just communicate with the real application, via rendezvous,
sockets or whatever.

> Should I give the users the option?

What other design would you offer?

-- 
-- Stephe



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

* Re: Should a GUI be separated from the application?
  2006-09-27 13:09 ` Stephen Leake
@ 2006-09-27 18:26   ` tmoran
  2006-09-28  6:09   ` Simon Wright
  1 sibling, 0 replies; 9+ messages in thread
From: tmoran @ 2006-09-27 18:26 UTC (permalink / raw)


> The users have the option of making the "application code" in the GUI
> framework just communicate with the real application, via rendezvous,
> sockets or whatever.
   Agreed.  It depends on the complexity and the timing requirements.
If the response to a human-caused event can be done in a fraction of a
second, the code might be included in the GUI event handler, while
responses that take a long time should be separate to avoid blocking other
events.  If the complexity of communication is low - updating a percent
complete display for example - then it's easy to separate app and GUI code
and communicate with something simple like a protected object.  If the
communication is very complex, your user may find even rendezvous
difficult and want to put the app code inside the event handler. One
size doesn't fit all.



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

* Re: Should a GUI be separated from the application?
  2006-09-27 13:09 ` Stephen Leake
  2006-09-27 18:26   ` tmoran
@ 2006-09-28  6:09   ` Simon Wright
  2006-09-28 16:52     ` Pascal Obry
  1 sibling, 1 reply; 9+ messages in thread
From: Simon Wright @ 2006-09-28  6:09 UTC (permalink / raw)


Stephen Leake <stephen_leake@stephe-leake.org> writes:

> What other design would you offer?

What about having a browser as the GUI and using AJAX-style HTTP for
the comms? The back-end would be something like AWS or my EWS
(http://embed-web-srvr.sourceforge.net).

It does mean programming your GUI in HTML/JavaScript which I can agree
is less than pleasant, but I'm not at all sure that GUI programming in
Ada is any less tedious ... and it certainly makes you think about
separation of concerns!

I have yet to get to grips with XML-formatted (ie, structured)
responses. Perhaps I'm reading the wrong book (Professional Ajax from
Wrox).



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

* Re: Should a GUI be separated from the application?
  2006-09-28  6:09   ` Simon Wright
@ 2006-09-28 16:52     ` Pascal Obry
  2006-09-28 18:06       ` tmoran
  2006-09-29  4:56       ` Simon Wright
  0 siblings, 2 replies; 9+ messages in thread
From: Pascal Obry @ 2006-09-28 16:52 UTC (permalink / raw)
  To: Simon Wright

Simon Wright a �crit :
> Stephen Leake <stephen_leake@stephe-leake.org> writes:
> 
>> What other design would you offer?
> 
> What about having a browser as the GUI and using AJAX-style HTTP for
> the comms? The back-end would be something like AWS or my EWS
> (http://embed-web-srvr.sourceforge.net).

Indeed, a very nice way to deal with GUI. This is what I call
pluggable-GUI !

> It does mean programming your GUI in HTML/JavaScript which I can agree
> is less than pleasant, but I'm not at all sure that GUI programming in

No. You can use Ajax-XML based control of the GUI. See the AWS's Ajax
Web Elements demos. The application only output XML actions. No HTML or
Javascript messing, the framework is already done by AWS.

> Ada is any less tedious ... and it certainly makes you think about
> separation of concerns!
> 
> I have yet to get to grips with XML-formatted (ie, structured)
> responses. Perhaps I'm reading the wrong book (Professional Ajax from
> Wrox).

Or you haven't looked at AWS recently :)

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|              http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595



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

* Re: Should a GUI be separated from the application?
  2006-09-28 16:52     ` Pascal Obry
@ 2006-09-28 18:06       ` tmoran
  2006-09-28 18:46         ` Pascal Obry
  2006-09-29  4:56       ` Simon Wright
  1 sibling, 1 reply; 9+ messages in thread
From: tmoran @ 2006-09-28 18:06 UTC (permalink / raw)


> > What about having a browser as the GUI and using AJAX-style HTTP for
> > the comms? The back-end would be something like AWS or my EWS
> ...
> You can use Ajax-XML based control of the GUI. See the AWS's Ajax
> Web Elements demos. The application only output XML actions. No HTML or
   Could you make a Pong game that way?  Or a music synthesizer?
Or does "GUI" mean a limited subset of graphical user interfaces?



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

* Re: Should a GUI be separated from the application?
  2006-09-28 18:06       ` tmoran
@ 2006-09-28 18:46         ` Pascal Obry
  0 siblings, 0 replies; 9+ messages in thread
From: Pascal Obry @ 2006-09-28 18:46 UTC (permalink / raw)
  To: tmoran

tmoran@acm.org a �crit :
>>> What about having a browser as the GUI and using AJAX-style HTTP for
>>> the comms? The back-end would be something like AWS or my EWS
>> ...
>> You can use Ajax-XML based control of the GUI. See the AWS's Ajax
>> Web Elements demos. The application only output XML actions. No HTML or
>    Could you make a Pong game that way?  Or a music synthesizer?
> Or does "GUI" mean a limited subset of graphical user interfaces?

I think with the current state of the technology a "limited subset"
only. But in some years from now, we a nice SVG support... who knows!
At least with Ajax the limited subset is far more advanced than it used
to be.

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|              http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595



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

* Re: Should a GUI be separated from the application?
  2006-09-28 16:52     ` Pascal Obry
  2006-09-28 18:06       ` tmoran
@ 2006-09-29  4:56       ` Simon Wright
  2006-09-29 17:54         ` Pascal Obry
  1 sibling, 1 reply; 9+ messages in thread
From: Simon Wright @ 2006-09-29  4:56 UTC (permalink / raw)


Pascal Obry <pascal@obry.net> writes:

>> It does mean programming your GUI in HTML/JavaScript which I can agree
>> is less than pleasant, but I'm not at all sure that GUI programming in
>
> No. You can use Ajax-XML based control of the GUI. See the AWS's Ajax
> Web Elements demos. The application only output XML actions. No HTML or
> Javascript messing, the framework is already done by AWS.

I suppose that the _necessary_ JS is created by AWS, then. Doesn't
that make it hard to use a 'standard' web designer to create the pages
and just add a little interaction here & there?

>> Ada is any less tedious ... and it certainly makes you think about
>> separation of concerns!
>> 
>> I have yet to get to grips with XML-formatted (ie, structured)
>> responses. Perhaps I'm reading the wrong book (Professional Ajax from
>> Wrox).
>
> Or you haven't looked at AWS recently :)

You might have a point there :-)

On the other hand I'm not sure I should, copyright/GMGPL issues ...



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

* Re: Should a GUI be separated from the application?
  2006-09-29  4:56       ` Simon Wright
@ 2006-09-29 17:54         ` Pascal Obry
  0 siblings, 0 replies; 9+ messages in thread
From: Pascal Obry @ 2006-09-29 17:54 UTC (permalink / raw)
  To: Simon Wright

Simon Wright a �crit :
> I suppose that the _necessary_ JS is created by AWS, then. Doesn't

AWS comes with an Ajax runtime.

> that make it hard to use a 'standard' web designer to create the pages
> and just add a little interaction here & there?

It must depend on the way you work. Usually that's not that hard.

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|              http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595



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

end of thread, other threads:[~2006-09-29 17:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-26 17:16 Should a GUI be separated from the application? Lucretia
2006-09-27 13:09 ` Stephen Leake
2006-09-27 18:26   ` tmoran
2006-09-28  6:09   ` Simon Wright
2006-09-28 16:52     ` Pascal Obry
2006-09-28 18:06       ` tmoran
2006-09-28 18:46         ` Pascal Obry
2006-09-29  4:56       ` Simon Wright
2006-09-29 17:54         ` Pascal Obry

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