× 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 12:24:39 -0500
  • Importance: Normal

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.

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


Yeah, I know it sounds simplistic, Brad.  And it's hard to explain
sometimes - I almost can't explain it myself.

You see, my widgets themselves do the update.  All the servlet does is tell
the widget to update itself.  It needs no knowledge of the database; all
that knowledge is encapsulated in the widget object.  Why is this important?
Because I can write generic servlets that process the widgets.

For example, I currently have a system that maintains four files via the
web.  All four files are maintained by the exact same servlet.  All I do is
pass it a server ID in the HTTP Request (a hidden field in my form) and it
automatically creates a widget that wll update that file.  I recently added
a fifth file to the database - the servlet will not change!  At all!  When
the Factory object creates the Server object, all the information is
encapsulated.  When I then create a Widget from the Server, the Widget knows
which Server it is talking to.  The servlet then simply takes the
HttpRequest data, and passes it to the Widget, who in turn communicates with
the appropriate server.

You can do something similar in CGI, but you'll have to have SOME code
SOMEWHERE that checks to see which server needs to be called.  That work is
done for me automatically through inheritance and polymorphism.  This is the
essence of OO.

Tonight I'll try to post an example servlet, but just to give you an idea,
my servlets are roughly 20 lines of code.  Their only purpose in life is to
take the HttpRequest and pass it to the widget, who then does what he needs
to do.  The servlet then passes control to the next JSP.

Joe



---------- Original Message ----------------------------------
From: "Stone, Brad V (TC)" <bvstone@taylorcorp.com>
Reply-To: JAVA400-L@midrange.com
Date: Wed, 28 Feb 2001 09:20:45 -0600

>>  And finally, CGI is output-only - my widgets also
> support the update
> of data using the data input on the form, with pretty much no
> code in the
> servlet.

Joe,

I don't follow this statement.  Are you saying that CGI programs can't
update files, can't read forms, etc?  I'm sure some of my CGI programs
update files using data read from input forms.  And not much code to it
either.

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