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
- Next message: William M. Klein: "Re: Os/390 Environment variable in Cobol"
- Previous message: Mike: "Re: Os/390 Environment variable in Cobol"
- In reply to: Robert Wagner: "Re: Is it possible to use the value of the PROGRAM ID within the source code?"
- Next in thread: Rick Smith: "Re: Is it possible to use the value of the PROGRAM ID within the source code?"
- Reply: Rick Smith: "Re: Is it possible to use the value of the PROGRAM ID within the source code?"
- Reply: Robert Wagner: "Re: Is it possible to use the value of the PROGRAM ID within the source code?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- Next message: William M. Klein: "Re: Os/390 Environment variable in Cobol"
- Previous message: Mike: "Re: Os/390 Environment variable in Cobol"
- In reply to: Robert Wagner: "Re: Is it possible to use the value of the PROGRAM ID within the source code?"
- Next in thread: Rick Smith: "Re: Is it possible to use the value of the PROGRAM ID within the source code?"
- Reply: Rick Smith: "Re: Is it possible to use the value of the PROGRAM ID within the source code?"
- Reply: Robert Wagner: "Re: Is it possible to use the value of the PROGRAM ID within the source code?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|