× 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 13:52:38 -0500
  • Importance: Normal

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.
My reference is ISBN:1-57610-426-5.  Perl Core Language Little Black Book
written by Steven Holzner.

package class1;             # define the class

sub new   {                 # constructor
   my $self = {};
   bless($self);
   return $self;
}

sub DESTROY   {                       # destructor
   print "Object is being destroyed!";
}

sub data   {                          # define method data
   my $self = shift;
   if (@_) ($self->{DATA} = shift;
   return $self->{DATA};
}

return 1;

use class1;
$object1 = class1->new();             # create an object of the class
$object1->data("Hello!");             # call the class method
print "Here's the data in the object: " . $object1->data;

# this will print ... Here's the data in the object: Hello!

These are simplistic examples however the ability is there to create classes
and build upon them.  These can be used in CGI or any Perl program.  There
is a Perl DBD for DB2 UDB
http://www-4.ibm.com/cgi-bin/db2www/data/db2/udb/winos2unix/support/document
.d2w/report?fn=db2v7a0db2a0172.htm#Header_700 for direct database access.

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
+---

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.