× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Adam,

I completely agree, well designed programs, be they modules, service
programs or regular programs are all good for reuse and decreasing
maintenance.

What I do want to point out - and yes, I will keep on hammering about
that ;) - is that 'old fashioned' programming styles (what we are used
to and love in RPG, Cobol, C and what have you in that area) can never
be compared in functionality and use to OO programming styles with the
whole concept of inheritance and reuse through classes/objects and what
have you which is used in Smalltalk, Java, C++ and the likes.

Comparison can be used to clarify some similarities; what you have to be
wary about is that the comparison is perceived as gospel. That will
inevitably lead to grave mistakes.

Regards,

Cor

-----Original Message-----
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
represent
runnable code which can only be used once instantiated as an object
(barred static methods), modules and service programs can be
compared
to
static (so class-level) methods. Classes are abstract descriptions
of
objects, objects are instantiations of classes and represent a class
in
a certain state which can behave in a predescribed way (the code in
the
class) as is fit for that state. A module is not a class, a module
is
a
stream of code which can be called from the outside to perform some
functionality and that is it.
<snip>
[W]hile I appreciate
that there are ways to simulate [instantiation-like] behaviour (e.g.
copy the same
module to different locations or by renaming the compiled object)
that
would still be a simulation and not have the same flexibility as
object
instantiation. The whole programming concept of RPG is different
from
Object Oriented (or close to Object Oriented) languages as Java,
C++,
C#, etc. You can't compare the two except on the bare line to line
code
basis (comparing if-statements etc.).

I certainly agree with you that comparisons between classes/objects
and
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.



This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.