× 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.



Dieter,

I wouldn't go so far as saying RPG is an OO language, but implementing OO
behaviors in RPG is a truly mind expanding experience, and something that
would benefit Java programmers too.  Java programmers would gain a better
understanding of what's going on underneath the covers, inside the JVM, when
objects are instantiated, extended, morphed, and overridden.

Nathan.


------------------------------

message: 3
date: Fri, 19 Mar 2004 11:12:47 +0100
from: Dieter Bender <dieter.bender@xxxxxxxxxxxx>
subject: Re: Strategic Java Usage/Productivity

Nathan,

in my opinion rpg is very limited to "emulate" or even implement OO; I agree

that you can write better code with some technics, you mentioned, but java
is 
much more productiv in this.

some details I would not agree:

> There are more similarities between ILE and OO languages than most 
> people realize.  For object instantiation in RPG:
>
>  Eval myInstance = myClass_New(parameters)
>
>  Callp myClass_doSomething(myInstance: parameters)
>
> Where myInstance would be a pointer to a data structure containing 
> instance properties, which would be referenced from myClass procedure 
> calls.

The problem here is: you have no qualified naming for referencing methods
and 
you can't have more than one instance of a rpg programm. For example: I have

a rpg implementation of a HashTable (available at my german Freeware page), 
but you can't have two of them in one program!

>
> For inheritance in RPG, create a new module, either importing and 
> wrapping the procedures in a base module, or create a new module 
> containing just procedure overrides, then bind to both modules.

That's by far not the same, even if you avoid static binding at compiletime.

You can't make generic changes as in java and you have 10 times mor code.

>
> For polymorphism in RPG, define data exports in modules, supplementing 
> procedure interfaces, which alter the behavior of procedures based on 
> data content.

That's not polyymorphism, maybe you are thinking of overloading of methods, 
but this would not be as readable as in java.


>
> It's true that most RPG programmers wouldn't consider following OO 
> design patterns, unless they first immersed themselves in OO languages 
> for a period of years.  But I returned to RPG for both performance as 
> well as productivity reasons.

There are nearly none open source components in rpg available and I don't
know 
where you get the better productivity in rpg from??? 
I agree with you, that writing well modularuized code in rpg enhances rpg 
programming productivity, but writing java is faster, if you use available 
components.


Dieter 
>
> Nathan.
>
>
> ----------------------------------------------------------------------
>
> message: 1
> date: Wed, 17 Mar 2004 11:11:23 -0800
> from: "Paul Holm" <pholm@xxxxxxxxxxxxxxxxx>
> subject: Strategic Java Usage/Productivity
>
> Nathan/All
>
> Thanks for the clarification of your points.
>
>  The point I was trying to make is that Java and its OO capability can 
> lead to much much higher levels of productivity than procedural and 
> RPG languages in both utilities and application development projects.  
> I am not an RPG expert so I might be missing something(s), please 
> excuse/correct me if I'm off.  The flexibility and productivity 
> possible via inheritance, polymorphism, frameworks, and interfaces 
> would be very difficult or impossible to match with procedural 
> languages.
>
> I agree that performance can be an issue with complex objects but that 
> all depends on the object/framework design in my experience.  
> Frameworks and components; that's where I enjoy spending most of my 
> time, especially since I can't afford to golf daily which is my other 
> passion</sigh>.  Inquiry objects with inherited "maintenance" method 
> for insert, update, delete, copy can carry minimal overhead and the 
> payback is huge in terms of programmer productivity.
>
> For example, I built and deployed, an additional inquiry operation 
> which returns a completely generic Java component with inherited but 
> overridable maintenance methods (insert, update, delete, copy) and it 
> performs very well.  This "department" inquiry was developed and 
> deployed in 45 seconds using  a set of Java components.  That's where 
> I think AS400 shops and others can benefit from OO and Java 
> technology.
>
> http://www.planetjavainc.com/wow60/runApp?id=298
>
> Java methods are attached to the class so even multiple instances of 
> the components have much less overhead than people suspect.  For 
> example, in addition to the inherited maintenance methods, the 
> framework/component also
> inherits:  MS EXCEL, XML, web services, dynamic field level security and
> validation, dynamic associations for linking files to other files, column
> level sorting (black triangles), dynamic column headers, and several other
> features.  All features inherited, customizable, to any database, on any
> platform with zero programming effort needed; all in 45 seconds.
>
> That's what Java and OO/frameworks can provide.
>
> As far as the XML to HTML performance,  I haven't worked with it too 
> much but I imagine having to parse and regenerate the UI on the fly 
> could be expensive;  I don't know enough about that to comment.  Have 
> a good ne. -Paul Holm
>
>
>
> _______________________________________________
> This is the Java Programming on and around the iSeries / AS400 
> (JAVA400-L) mailing list To post a message email: 
> JAVA400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list 
> options,
> visit: http://lists.midrange.com/mailman/listinfo/java400-l
> or email: JAVA400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/java400-l.

-- 
mfG

Dieter Bender


DV-Beratung Dieter Bender
Wetzlarerstr. 25
35435 Wettenberg
Tel. +49 641 9805855
Fax +49 641 9805856
www.bender-dv.de
eMail dieter.bender@xxxxxxxxxxxx



------------------------------

message: 4
date: Fri, 19 Mar 2004 06:53:55 -0600
from: Glenn Holmer <gholmer@xxxxxxxxxxxxxx>
subject: no SQL error when file is full?

I have a program running on a PC that uses JDBC to do an SQL insert of
payroll records to a file.  This week it got to a certain point and just
hung.  Investigation showed that the file was full (i.e. the DDS had been
compiled without *NOMAX) and we were able to remedy the situation.  But
shouldn't that have thrown an SQLException?  Is there something I can do
differently so that it would?

-- 
____________________________________________________________
Glenn Holmer                          gholmer@xxxxxxxxxxxxxx
Programmer/Analyst                       phone: 414-908-1809
Weyco Group, Inc.                          fax: 414-908-1601


------------------------------

message: 5
date: Fri, 19 Mar 2004 07:07:03 -0700
from: "David Morris" <David.Morris@xxxxxxxxxxxxx>
subject: Re: Strategic Java Usage/Productivity

Nathan,

I just searched for an article I wrote for Midrange Computing that describes
how to build a simple RPGIV component for dynamic data access.I created a
simple version for the article based on one I wrote for another company. The
full version does support native access and file updates (including
recursive and trigger-driven updates).  It took several hundred hours to
write and several thousand lines. I used the Mediator design pattern along
with meta-data to describe the data model and to attach business logic.
Overall, it worked very well. 

That full version of the I/O Mediator is the most useful program I have ever
written and there is a chance I could get someone to allow me to release the
source. At this point, I don't write much RPG and I miss having the ability
to encapsulate business logic in the database layer. I have been biding my
time waiting for trigger performance with Java to come up to speed. At that
time I will rewrite the original version in Java because it is a much better
fit for this type of programming. The original version required quite a bit
of pointer gymnastics to provide local storage for data and to cache
meta-information.

I searched and that article is still available at 

http://www.mcpressonline.com/mc?50@xxxxxxxxxxxxxxxx@.214a309b

David Morris

>>> nandel@xxxxxxxxxxxxxxxxxxx 03/18/04 12:36 PM >>>
Paul,

Your file maintenance utility has inspired me.  I'm considering writing a
generic component in RPG, not for maintaining, but for browsing files. 
I
can envision exporting an api such as the following:

 fileReference = browseClass_Open(Library:File:Member)

 browseClass_SetFileReference(fileReference)
 browseClass_ListFromTop(recordCount)
 browseClass_ListNext(recordCount)
 browseClass_ListPrevious(recordCount)
 browseClass_ListFromBottom(recordCount)
 browseClass_ListFromKey(key:recordCount)

 ...

 browseClass_Other()

I don't think I'd want to bite off generic add, change, and delete
procedures, because such actions are generally subject to complex business
rules that would need to be overridden and adapted to individual
circumstance anyway.

There are more similarities between ILE and OO languages than most people
realize.  For object instantiation in RPG:

 Eval myInstance = myClass_New(parameters)

 Callp myClass_doSomething(myInstance: parameters)

Where myInstance would be a pointer to a data structure containing instance
properties, which would be referenced from myClass procedure calls.

For inheritance in RPG, create a new module, either importing and wrapping
the procedures in a base module, or create a new module containing just
procedure overrides, then bind to both modules.

For polymorphism in RPG, define data exports in modules, supplementing
procedure interfaces, which alter the behavior of procedures based on data
content.

It's true that most RPG programmers wouldn't consider following OO design
patterns, unless they first immersed themselves in OO languages for a period
of years.  But I returned to RPG for both performance as well as
productivity reasons.

Nathan.




------------------------------

_______________________________________________
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
digest list To post a message email: JAVA400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.



End of JAVA400-L Digest, Vol 2, Issue 100
*****************************************




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.