Re: Is it possible to use the value of the PROGRAM ID within the source code?

From: Rick Smith (ricksmith_at_mfi.net)
Date: 06/25/04


Date: Thu, 24 Jun 2004 18:45:19 -0400


Robert Wagner <robert.deletethis@wagner.net> wrote in message
news:40d9f6b8.196351819@news.optonline.net...
> riplin@Azonic.co.nz (Richard) wrote:
> >robert.deletethis@wagner.net (Robert Wagner) wrote
[snip]
> >> >What particular OO features do you think that batch programs need ?
[snip]
> >> Packaging ALL logic that operates on a particular datum in one place.
> >
> >Why is that actually an advantage ?
>
> It goes to Yourdon & Constantine's ideas about Cohesion. The goal of
> Structured Design is Functional cohesion. Most batch programs are
> organized for Temporal cohesion. The first line performs
> Initialization, which opens all files. The very last physical line is
> Stop Run. Why? Because that's how we used to design batch jobstreams --
> temporal.

Mr Wagner, structured design, as I understand it, is functional
decomposition and temporal cohesion. It seems to me that
object oriented design is closer to the idea of functional cohesion,
which may also be obtained in some measure with modular
programming.

Steve McConnell, "Code Complete," Microsoft Press, 1993,
page 159, "When to Use Structured Design," writes "Structured
design is mainly a way of breaking a program into routines. It
emphasizes functionality and doesn't stress data. An example
of a functionally oriented problem domain would be a system
that reads data in batch mode, performs predictable processes
on that data in a predictable order, and writes the data."

Here, McConnell seems to be suggesting that the use of structured
design for batch programs is adequate; much as Stroustrup stated.

McConnell goes on to write (referring to Constantine's article,
"Objects, Functions, and Program Extensibility") "If data is likely
to change, the object-oriented approach is appropriate because
it isolates the data likely to change into individual objects (modules).
If functionality is likely to change, the object-oriented approach is not
so appropriate because functionality is spread thoughout many
objects (modules). If the functionality is more likely to change than
the data, you are better off using the functional decomposition of
structured design." [Here 'functionality' seems to refer to the
functionality of a proposed system.]

> When we do maintenance, we're not interested in timeline, we're interested
> in a few particular variables. Under what conditions is this thing
changed?
> Finding hits in numerous programs makes the process unreliable. It's worse
> when the variable is called by different names, for example one name in
> working-storage and a different name in the database. Or when some code
> that changes it is hidden in a stored procedure.
>
> Packaging all logic in one place would make maintenance more reliable.

Or perhaps, Mr Wagner, a bit easier; there sometimes being tools
to help identify all such affected source programs.

Given a fixed asset application with the abstract superclass
DepreciationMethod and subclasses StraightLine and
DoubleDecliningBalance; also, an inventory application with the
abstract superclass ReorderMethod and subclasses EOQ and
OrderToLevel, it is fairly easy to add classes for additional
depeciation methods and reorder methods. But, Mr Wagner
is it really so much more difficult to accomplish this using
structured design as to *need* object oriented design for the
simple, common abstractions found in so many business
applications, ?

Mr Wagner, there is a balance that seems to be related to
complexity and size; as both increase, so does the *advantage*
of object oriented design. Object oriented design has an
additional burden to overcome when batch processing is
involved.



Relevant Pages

  • Re: Language improvement: Add scope to class member fields
    ... every small subset of functionality into seperate classes. ... MyMethodwould check this flag first within a lock and only run the method ... currently stands there is no protection. ... Allowing classes to become more complex is not a terrific design goal, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: news of the week
    ... And as market leader, that company does not have the time to listen to ... When I designs a website, I constantly have to think about why ... didn't design the website for me. ... offers the same functionality, yet. ...
    (rec.games.computer.ultima.dragons)
  • Late Show Fashion #2510
    ... "I have little interest in design. ... I hate placemats that ... Okay all good design is based upon functionality. ... aesthetics, functionality, and comfort. ...
    (alt.fan.letterman)
  • Re: Open architecture automobiles
    ... >> machine by the functional design specs of the parts. ... So, how many kinds of car do we actually need, ... > which we may select our version of optimum? ... cost, functionality, status, life, reliability, maintenance costs, etc. ...
    (sci.physics)
  • Re: Why read CLC?
    ... Yes, Structured Design is a version of top-down, with some heuristics ... influenced by Structured Design, right up to the latest Unified Process ... Constantine squares with my own experience of interacting with the ... Though I may differ with the Agile/XP folks regarding their near- ...
    (comp.lang.cobol)