|
-----Original Message-----represent
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-
bounces@xxxxxxxxxxxx] On Behalf Of Adam Glauser
Sent: donderdag 19 juni 2008 15:04
To: rpg400-l@xxxxxxxxxxxx
Subject: Classes/Objects compared to SRVPGMs
Takken, Cor wrote:
RPG IV is not an object oriented language, Java is. Classes
comparedrunnable code which can only be used once instantiated as an object
(barred static methods), modules and service programs can be
toof
static (so class-level) methods. Classes are abstract descriptions
isobjects, objects are instantiations of classes and represent a classin
a certain state which can behave in a predescribed way (the code inthe
class) as is fit for that state. A module is not a class, a module
afrom
stream of code which can be called from the outside to perform some<snip>
functionality and that is it.
[W]hile I appreciatecopy the same
that there are ways to simulate [instantiation-like] behaviour (e.g.
module to different locations or by renaming the compiled object)that
would still be a simulation and not have the same flexibility asobject
instantiation. The whole programming concept of RPG is different
C++,Object Oriented (or close to Object Oriented) languages as Java,
andC#, etc. You can't compare the two except on the bare line to linecode
basis (comparing if-statements etc.).
I certainly agree with you that comparisons between classes/objects
service programs can only go so far. I also agree about the
flexibility
that the OO model provides.
I do however, think that there is some value in the comparison in that
both structures help to simplify implementation modular designs, and
therefore can be used to accomplish some of the same goals. Well
designed service programs can provide encapsulation and ease reuse
(thereby reducing maintenance efforts).
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.