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


  • Subject: RE: beans and JSPs and stuff...
  • From: "Dan Hoover" <dan@xxxxxxxxxxxxx>
  • Date: Wed, 28 Feb 2001 15:40:50 -0500
  • Importance: Normal

I was only being very simplistic but here is the code to inherit from a base
to derived class.  You are correct there is no encapsulation with Perl.
Cannot determine security from object to object.

package class1;

sub new   {
   my $class = shift;
   my $self = {};
   bless($self, $class);
   return $self;
}

sub gettext   {
   return "Hello!"
}
return 1;

package class2;
use class1;
@ISA = qw(class1);

sub new   {
   my $self = class1->new;
   bless($self);
   reutrn $self;
}
return 1;

use class2;
my $object = class2->new();
print "The object says: ". $object->gettext;

Thanks for the link!  I already installed it and ran a program.  Works
great!
Dan H.
-----Original Message-----
From: owner-java400-l@midrange.com
[mailto:owner-java400-l@midrange.com]On Behalf Of Joe Pluta
Sent: Wednesday, February 28, 2001 2:13 PM
To: JAVA400-L@midrange.com
Subject: RE: beans and JSPs and stuff...


1. The ability to create "classes" doesn't make a language object-oriented.
We did similar things in C.  The trick is to support inheritance and
polymorphism.  But we needn't quibble on that.

2. Here's the link to the AS/400 Perl page, which in turn contains links to
the CPAN AS/400 port of Perl.  I couldn't access the files, though.

http://www.as400.ibm.com/tstudio/workshop/tiptools/perl.htm

HTH

Joe

---------- Original Message ----------------------------------
From: "Dan Hoover" <dan@hooversys.com>
Reply-To: JAVA400-L@midrange.com
Date: Wed, 28 Feb 2001 13:52:38 -0500

>Unfortunately I have not written anything in Python.  I really cannot speak
to the language.

Perl however is OO.  You can create classes, constructors, destructors, and
the like.

[snip]

I run Apache, ApacheJrun (servlets), and Perl on Linux and Win32.  So I can
do either Perl or Java as application, Perlscript or Javascript, database
access JDBC or DBI.  If you or someone else on the forum knows of a Perl
interpreter for the AS/400 I would be interested.

Thanks
Dan H.

-----Original Message-----
From: owner-java400-l@midrange.com
[mailto:owner-java400-l@midrange.com]On Behalf Of Joe Pluta
Sent: Wednesday, February 28, 2001 12:56 PM
To: JAVA400-L@midrange.com
Subject: RE: beans and JSPs and stuff...


Thanks, Dan, for the comments!

And yes, this is primarily a Java forum, but since at this point I think
Java for the AS/400 revolves primarily around presentation, I've felt that
considerable latitude in discussing CGI is merited.

I do have a question... from my understanding, while Perl is definitely a
CGI, I was given to believe that it's not really OO.  In fact, I thought
that Python was more OO than Perl.  Perl is an acronym for "Practical
Extraction and Report Language", and is primarily a text processing
language.  As such, it's perfectly suited for CGI processing, which is
really little more than throwing strings around, when you get down to it.
But I didn't think that it supported inheritance and polymorphism and all
those goodies.

It was my understanding that Python is the true object-oriented scripting
language, using inheritance and polymorphism.  Not only that, there is a
100% Pure Java implementation, JPython, that should be able to run in any
webserver.  But that remains to be seen.

The reason I bring it up in this forum is the fact that one of the uses of
Python is to quickly prototype web applications which can then be translated
to Java.  It seems possible that Python might be a viable way for we in the
AS/400 community to quickly test certain capabilities and techniques, and
then translate them back to Java.

I'd be interested in hearing your take on this.  Of course, we might quickly
revert to something way off-topic, so don't be surprised if I take the
discussion offline <smile>.

Joe Pluta

P.S. Just as an aside, there is (or was) an unsupported Perl interpreter for
the AS/400 - I'm not sure what it's status is these days.
Moderator


---------- Original Message ----------------------------------
From: "Dan Hoover" <dan@hooversys.com>
Reply-To: JAVA400-L@midrange.com
Date: Wed, 28 Feb 2001 12:24:39 -0500

>First, thanks for the insight into JSP.  I have written servlets and ASP.
But I have not been involved in a shop or project were there is distinction
between content development and programmers as it were.  They have usually
been one in the same group.  This is helpful in looking at building
interfaces that can distinguish the two.

Second,  I would like to distinguish there is a difference between CGI and
OO.  Perl is OO and CGI.  From inheritance, instantiation, polymorphism, and
encapsulation.  I do not believe there is a Perl interpreter for the AS/400.
This gives the appearance that CGI is not OO and only good as the host
language being called.  Which for the AS/400 would be a non OO language.
Therefore Perl and CGI can be built upon in classes on other platforms (
mainly Unix derivatives and  Win32 ) using CGI.pm.

These classes can be built using any number of aesthetic approaches to
reading data and displaying it with CSS inline or called.  As with any OO
these classes can be packaged by differentiating data calls from the
presentation layer.

Thanks again for the enlightning discussion.  Sorry I know this is a Java
forum.
Dan H.

+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---

+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---

+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---

+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.