comp.lang.ada
 help / color / mirror / Atom feed
From: Maciej Sobczak <see.my.homepage@gmail.com>
Subject: Re: Derived private interface
Date: Thu, 11 Aug 2011 06:50:29 -0700 (PDT)
Date: 2011-08-11T06:50:29-07:00	[thread overview]
Message-ID: <f44209e4-8677-4995-8b17-d641bae2b698@hl8g2000vbb.googlegroups.com> (raw)
In-Reply-To: j1v09k$gau$1@munin.nbi.dk

On Aug 11, 12:21 am, "Randy Brukardt" <ra...@rrsoftware.com> wrote:

> But adding new modules without somehow modifying the web server is simply
> not allowed in the problem statement that I had (that is, all code that the
> server can execute is statically compiled into the web server).

I see - but isn't it a special case?

The advantage of OOP is in its run-time nature. That is, the registry
can be modified at run-time according to anything from startup options
to real-time data input. Modifying a giant case statement (or is it a
chain of ifs? after all, URLs are not discrete in the Ada sense) might
be acceptable between deployment cycles of the given system, but
making this structure dependent on some run-time values would be too
much.
Of course, I don't claim that such run-time liberty is always
required, but is certainly more general. This is an important point
when designing reusable components. That is, if you implement the
final web server you might be in a position to define your problem
completely (or not - see the "fragile design" risk that Dmitry
mentioned), but if you implement the web server component for reuse in
potentially many future systems, then targeting the more general
problem seems to be a way to go.

This is why message delivery in YAMI4 is based on callbacks via
interfaces and why the object registration is dynamic - new objects
(they correspond to message targets or inboxes) can be added and
removed on the fly. This still allows a completely static structure
where all components are known statically and wired at program
startup, so in this sense both approaches are addressed without
unnecessary compromises.
I think that web servers are not much different from this - in fact,
they do exactly the same stuff, which is delivering external stimuli
to some program handler. I would certainly use OOP for this part of
any reusable web server component.

--
Maciej Sobczak * http://www.msobczak.com * http://www.inspirel.com



  reply	other threads:[~2011-08-11 13:50 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-05  3:14 Derived private interface Rego, P.
2011-07-05  5:10 ` AdaMagica
2011-07-06  2:24   ` Rego, P.
2011-07-06  4:34   ` AdaMagica
2011-07-06  7:55     ` Georg Bauhaus
2011-07-06  8:30       ` AdaMagica
2011-07-06 12:59         ` Georg Bauhaus
2011-07-06 13:23           ` AdaMagica
2011-07-06 19:06             ` Randy Brukardt
2011-07-06 13:28           ` Simon Wright
2011-07-06 19:45           ` Randy Brukardt
2011-07-06 22:05             ` Georg Bauhaus
2011-07-06 23:56               ` Adam Beneschan
2011-07-07 14:09                 ` Georg Bauhaus
2011-07-07 15:10                   ` Adam Beneschan
2011-07-08  4:29                     ` AdaMagica
2011-07-08 19:08                       ` Randy Brukardt
2011-07-08 19:12                     ` Randy Brukardt
2011-07-07 15:19                   ` Georg Bauhaus
2011-07-07 10:37         ` Stephen Leake
2011-07-07 13:18           ` Georg Bauhaus
2011-07-08 19:23             ` Randy Brukardt
2011-07-08 21:41               ` Jeffrey Carter
2011-07-09  6:14                 ` Dmitry A. Kazakov
2011-07-22 22:59                 ` Randy Brukardt
2011-07-23  7:30                   ` Jeffrey Carter
2011-07-23  9:29                     ` Maciej Sobczak
2011-07-23 10:07                     ` Dmitry A. Kazakov
2011-07-26 21:04                     ` Randy Brukardt
2011-07-26 23:43                       ` Jeffrey Carter
2011-07-27 23:56                         ` Randy Brukardt
2011-07-28  0:18                           ` Jeffrey Carter
2011-07-28 10:06                         ` Maciej Sobczak
2011-07-28 23:24                           ` Randy Brukardt
2011-07-29  6:45                             ` Simon Wright
2011-07-30  0:04                               ` Randy Brukardt
2011-07-30  6:32                                 ` Simon Wright
2011-08-01  9:30                                   ` Alex R. Mosteo
2011-08-01 10:12                                     ` Dmitry A. Kazakov
2011-08-01 21:56                                       ` Randy Brukardt
2011-08-02 10:03                                         ` Dmitry A. Kazakov
2011-08-02 21:16                                           ` Randy Brukardt
2011-08-03  9:01                                             ` Dmitry A. Kazakov
2011-08-03 20:16                                               ` Randy Brukardt
2011-08-04  8:15                                                 ` Dmitry A. Kazakov
2011-08-09 21:10                             ` Maciej Sobczak
2011-08-09 21:35                               ` Randy Brukardt
2011-08-10  9:11                                 ` Dmitry A. Kazakov
2011-08-10 21:56                                   ` Randy Brukardt
2011-08-11  8:07                                     ` Dmitry A. Kazakov
2011-08-12  4:52                                       ` Randy Brukardt
2011-08-12  8:54                                         ` Dmitry A. Kazakov
2011-08-10 10:07                                 ` Maciej Sobczak
2011-08-10 11:26                                   ` Georg Bauhaus
2011-08-10 22:27                                     ` Randy Brukardt
2011-08-10 22:21                                   ` Randy Brukardt
2011-08-11 13:50                                     ` Maciej Sobczak [this message]
2011-08-12  4:43                                       ` Randy Brukardt
2011-08-12  7:00                                         ` Maciej Sobczak
2011-08-12 21:59                                           ` Randy Brukardt
2011-07-06 15:06       ` Adam Beneschan
2011-07-06 16:36       ` Dmitry A. Kazakov
2011-07-06 19:20       ` Randy Brukardt
replies disabled

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