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



> Ok, Joe, explain to me how JSP is better for interactive web
> pages than CGI.  No, you haven't in the past.  You've used a
> lot of technical terms and jargon, but all in all your
> outputting HTML with either tool.  How can one work better
> than the other.  One may  be easier for you or I because we
> are more familiar with it, but better, no.

I get tired of arguing against your ridiculous assertion that just because
you can do it in RPG, it's as good as doing it in Java.  How silly.  The
extension of that argument is that an MI implementation of an order entry
program is as good as an RPG implementation.  Hey, you can do it!  And if
that's your opinion, I hope I never have to maintain a project you worked
on.


> A great way to explain this would be some code snippets.
> Myself, and others, would love to see what you mean.  Even
> if it's just some psuedocode.

In Java, I have a proxy object that has field objects as attributes.  These
fields in turn have attributes, such as color and protect.  They also have
attributes such as size and length.  When I want to output a field in a
JavaServer Page, I do it as follows:

  <%= proxy.getFormattedField("MYFIELD") %>

This may translate to:

  My field contents

* or *

  <input class=GREENREVERSE type="text" id=fld001 name="MYFIELD"
   value="My Field Contents" onkeypressed="uppercase();">

This is entirely determined at runtime based on both dynamic and static
attributes.  Static attributes are loaded the first time a panel is used.
Because servlets share the same JVM, once these attributes are loaded,
they're available to other servlets.  Dynamic attributes are passed in from
the application at runtime.

Let's say I want to output a subfile.  I do it this way:

  <%
    while (proxy.nextRow())
  %>

  <%= proxy.getFormattedField("FIELD1"); %>
  <%= proxy.getFormattedField("FIELD2"); %>
  (...)

  <%
    }
  %>

And I can continue to extend my classes for whatever reason I need.  Say I
want to override the method used for editing on a specific field.  I could
do that easily:

  <% setEditMethod("myuppercase"); %>
  <%= getFormattedField("MYFIELD"); %>

This is the elegance of using Java as both the formatting language and the
control language.  There is a seamless interaction between the two.  You can
do all of this in CGI, but you have to write new tags for each new feature,
whereas I can simply add a method.  And chances are that a new programmer is
more likely to understand Java method calls than they are to somehow know
your proprietary tag language.

Anyway, I'm not going to convert anyone.  I've said my piece.

You all know my opinion on JSP vs. CGI.  CGI is fine, but flawed.  JSP is
flawed, too, sure, but it's LESS flawed than CGI.  This is sort of like RPG
IV vs. RPG III.  RPG III is perfectly fine for many, many things.  It's not
until you need some of the more advanced features that you need RPG IV.  At
least with RPG, you can buy a nice conversion tool, like CVTILERPG from my
friends at Linoma, to convert your programs.  Once you've wandered down the
CGI path, it's hard to make the move to JSP.

Joe




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.