comp.lang.ada
 help / color / mirror / Atom feed
From: Christopher Browne <cbbrowne@acm.org>
Subject: Re: Advantage of XML based GUI? (was Re: Ada-inspired OS/Language)
Date: 15 Sep 2002 19:49:09 GMT
Date: 2002-09-15T19:49:09+00:00	[thread overview]
Message-ID: <am2o7k$27t6j$4@ID-125932.news.dfncis.de> (raw)
In-Reply-To: 3D7DF095.C5C705BA@acm.org

After takin a swig o' grog, Marin David Condic <mcondic.auntie.spam@acm.org> belched out...:
> But do keep in mind that to a large extent, the price is already
> being paid. Any GUI already takes up a bunch of resources just by
> being a GUI rather than a command line. When someone builds
> something like Explorer or Netscape, they've got to ride on top the
> OS doing a lot of redundant work. Doing something where the GUI
> engine is also basically a browser means you're consolidating
> functions and probably the net result is you're using fewer
> resources. Isn't Windows already increasingly trying to use Explorer
> as the basis for many OS functions? I think the trend is already
> started and creating an Ada OS or Ada development/execution
> environment that uses XML in some manner as the basis for its GUI is
> just a natural extension of what is already happening in the world.

Let me suggest another possibility, namely that there may be no
significant "price" in this to worry about.

I'll point at GTk's Glade system as an example.

Many (most?) modern applications based on the GNOME application
framework use an XML-based GUI description scheme called Glade.

It can load in, on demand at run time, a fair-sized horde of UI
specifications, including:

 a) A Glade file that specifies the sets of menus that appear at the
    top of the main window;

 b) Many GTK specifications for dialog windows that only get loaded
    occasionally, including:

     advanced-filter.glade col-width.glade exp-smoothing.glade
     mean-tests.glade search-replace.glade analysis-tools.glade
     colrow.glade font-sel.glade moving-averages.glade search.glade
     anova-one.glade consolidate.glade formula-guru.glade names.glade
     sheet-order.glade anova-two.glade correlation.glade
     fourier-analysis.glade plugin-manager.glade sheet-rename.glade
     autocorrect.glade covariance.glade function-select.glade
     print.glade solver.glade autoformat.glade delete-cells.glade
     goalseek.glade random-generation.glade summary.glade
     autosave-prompt.glade descriptive-stats.glade graph-guru.glade
     rank.glade tabulate.glade autosave.glade dialog-stf-export.glade
     hf-config.glade regression.glade variance-tests.glade
     cell-format.glade dialog-stf.glade histogram.glade
     row-height.glade workbook-attr.glade cell-sort.glade
     dialog-zoom.glade insert-cells.glade sampling.glade

With all of these, there is _nothing_ that makes it important that
they be 'compiled' in order to be especially efficient.  They all
represent functions that will get run periodically, and where the user
will _have_ to do some thinking about what to do with the results.  If
it were to take 0.2s to load in the XML file to get the GUI running,
that is unlikely to appreciably injure the "user experience."

Furthermore, for particular UIs that are of particular "performance
importance," nothing prevents you from using some sort of "compiler"
process to transform the XML into native code.

There are compilers for Glade for various languages, including C, C++,
Eiffel, OCaml, Perl, and even (go, figure) Ada95.

You thus generally have a choice:
 a) Load in the XML at runtime, dynamically evaluating and binding it;
 b) Compile it into your code.

Both have advantages and disadvantages:
  -> Compiled code is faster;
  -> Compiled code tends to be bigger (oops);
  -> Compiled code can't be modified at runtime.

The Common Lisp folk have discovered an interesting thing in the realm
of compiling that parallels this; they often like to have both the
ability to compile to bytecode as well as to native machine code.

Native machine code is fastest, and is very valuable for the code that
runs a lot.

On the other hand, bytecode is a LOT more compact.  I found a typical
"factor of five" difference, myself.  Code that doesn't run very often
or in which performance is not critical ought to be bytecode-compiled,
as that provides substantial savings.

There's also another parallel that can be drawn that involves pretty
much the same conclusions:  CORBA.

Most CORBA implementations compile protocol specifications in the IDL
language into native code for the "stubs" and "skeletons" for
marshalling arguments to and from the language's native form into the
form described by the IDL.  In scripting languages, it is not uncommon
for the IDL to dynamically be read at runtime, thus being
'interpreted' in much the same way XML or bytecode would be.

The _exact same results_ fall out.  

If you have a desparate need for marshalling speed, compiled code is
far and away the best way to go.  On the other hand, the compiled
"stubs" and "skeletons" expand into a pretty big blob of compiled
code, so that the speed comes at some cost in memory consumption.
-- 
(reverse (concatenate 'string "moc.enworbbc@" "enworbbc"))
http://cbbrowne.com/info/languages.html
"I'd much rather punch my timecards with a punch awl and blood
spattered fist than use the Solomon IV "Timekeeper" module."
-- Peter da Silva



  reply	other threads:[~2002-09-15 19:49 UTC|newest]

Thread overview: 97+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-20 14:10 Ada-inspired OS/Language Ryan
2002-08-20 14:34 ` Jim Rogers
2002-08-20 14:59 ` Darren New
2002-08-20 17:57 ` Warren W. Gay VE3WWG
2002-08-29 22:24   ` Nick Roberts
2002-08-30 13:33     ` Marin D. Condic
2002-08-31  3:38       ` Nick Roberts
2002-08-31 13:54         ` Marin David Condic
2002-09-04 16:47         ` Jacob Sparre Andersen
2002-09-04 17:24         ` Darren New
2002-09-05  3:16           ` Nick Roberts
2002-09-05  8:41             ` Georg Bauhaus
2002-09-12  2:17             ` Rod Haper
2002-09-06 17:31     ` Richard Riehle
2002-09-07  0:23       ` Nick Roberts
2002-09-07 13:43         ` Marin David Condic
2002-09-07 15:18           ` Nick Roberts
2002-09-08 22:14           ` Robert C. Leif
2002-09-09 10:27             ` Advantage of XML based GUI? (was Re: Ada-inspired OS/Language) Preben Randhol
2002-09-09 14:27               ` Larry Kilgallen
2002-09-09 14:02                 ` Marin David Condic
2002-09-09 14:43                   ` Preben Randhol
2002-09-09 21:58                   ` Ryan Tarpine
2002-09-11 16:40                   ` Warren W. Gay VE3WWG
2002-09-12 10:01                     ` Georg Bauhaus
2002-09-12 16:43                       ` Warren W. Gay VE3WWG
2002-09-12 18:54                         ` Georg Bauhaus
2002-09-12 21:22                           ` Warren W. Gay VE3WWG
2002-09-13 12:15                             ` Georg Bauhaus
2002-09-10  5:21                 ` Robert C. Leif
2002-09-10  5:21               ` Robert C. Leif
2002-09-10 12:31                 ` Preben Randhol
2002-09-10 13:16                   ` Marin David Condic
2002-09-15 19:49                     ` Christopher Browne [this message]
2002-09-10 22:32                   ` achrist
2002-09-11  4:45                     ` Christopher Browne
2002-09-11  5:59                       ` achrist
2002-09-12 14:55                         ` Christopher Browne
2002-09-11  2:28               ` Ted Dennison
2002-09-11 13:54                 ` Robert C. Leif
2002-09-11 14:06                   ` Programmer Dude
2002-09-11 19:48                 ` Nick Roberts
2002-09-12  8:02                   ` Preben Randhol
2002-09-12 14:27                     ` Chad R. Meiners
2002-09-18 17:49                       ` Andrew Berg
2002-09-18 23:13                         ` Chad R. Meiners
2002-09-12 16:12                     ` Nick Roberts
2002-09-12 16:45                       ` Preben Randhol
2002-09-12 17:03                         ` David C. Hoos
2002-09-13  7:57                           ` Preben Randhol
2002-09-13 19:55                             ` Nick Roberts
2002-09-14 12:59                               ` Marin David Condic
2002-09-16  5:20                                 ` Robert C. Leif
2002-09-16  8:16                                 ` Preben Randhol
2002-09-16 11:47                                   ` Marin David Condic
2002-09-16 12:08                                     ` Preben Randhol
2002-09-17 12:04                                       ` Marin David Condic
2002-09-12 18:57                         ` Georg Bauhaus
2002-09-13  8:01                           ` Preben Randhol
2002-09-13 12:23                             ` Georg Bauhaus
2002-09-13 15:32                               ` Preben Randhol
2002-09-13  1:53                         ` Nick Roberts
2002-09-13  8:24                           ` Preben Randhol
2002-09-13 19:55                             ` Nick Roberts
2002-09-14 15:42                               ` Warren W. Gay VE3WWG
2002-09-14 16:19                                 ` Chad R. Meiners
2002-09-15  3:31                                   ` Nick Roberts
2002-09-15  5:50                           ` Mark Biggar
2002-09-15  8:38                             ` achrist
2002-09-15 21:54                               ` Nick Roberts
2002-09-16 15:26                                 ` Larry Kilgallen
2002-09-17  2:36                                   ` Nick Roberts
2002-09-17  4:07                                 ` Larry Kilgallen
     [not found]                                 ` <jHHM$fQsCilo@eisneOrganization: LJK Software <bNwUY4VpTlxs@eisner.encompasserve.org>
2002-09-17 22:05                                   ` Nick Roberts
2002-09-12 17:23                       ` Larry Kilgallen
2002-09-13  0:45                         ` Robert C. Leif
2002-09-13  8:10                           ` Preben Randhol
2002-09-13 17:44                             ` Robert C. Leif
2002-09-13  1:53                         ` Nick Roberts
2002-09-13  3:02                           ` Robert A Duff
2002-09-13 10:50                           ` David C. Hoos, Sr.
2002-09-13 17:00                           ` Larry Kilgallen
2002-09-13 19:55                             ` Nick Roberts
2002-09-12 20:36                       ` chris.danx
2002-09-13  1:53                         ` Nick Roberts
2002-09-13 12:14                       ` Marin David Condic
2002-09-13 15:29                         ` Robert A Duff
2002-09-13 17:02                           ` Larry Kilgallen
2002-09-14 12:49                             ` Marin David Condic
2002-09-16  8:14                               ` Preben Randhol
2002-09-16 11:56                                 ` Marin David Condic
2002-09-13 17:27                           ` Jeffrey Carter
2002-09-16  7:55                             ` Mats Karlssohn
2002-09-13 15:34                       ` Warren W. Gay VE3WWG
2002-09-09 10:00           ` Ada-inspired OS/Language Peter Hermann
2002-08-30 23:56   ` Samuel Tardieu
     [not found] <000201c25b4d$2a9eba10$789a0844@robertqgx6k4x9>
2002-09-14  6:17 ` Advantage of XML based GUI? (was Re: Ada-inspired OS/Language) Robert C. Leif
replies disabled

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