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



Brad wrote:

>Buck, I tend to disagree.  You're comparing writing 
>socket apps in RPG to C, and then applying the 
>difficulty factor (assuming the programmer in 
>question is comfortable with both languages) 
>to web programming.
>
>It's simply not the case.  

Hi Brad!  I agree that this was an extreme example.  But I was trying to get
across the idea that for some functionality, RPG is very strong, and for
other functionality it is not as strong as other languages.

>web apps are really nothing more than another way for 
>us to input and output data.  RPGers have been doing 
>it for years on green screens and green bar
>reports.  The web is no different.  

Well, maybe it's a bit different.  Stream files put enough people in a
dither that it's an issue when teaching.  And there's a fair amount of
education that's required to get people used to the environment - POST vs
GET and so on.  No, that's not language-specific, but RPG + CGIDEV2 isn't as
intuitive as Perl when it comes to writing CGI apps either.

> Outputting HTML or XML or *ml is not rocket science.

No, but it's not an externally defined printer file, either...

>So, the question still remains... why is RPG so 
>bad for outputting HTML?  

I would say not that 'RPG is so bad for outputting HTML'.  I'd almost be
tempted to say that phrased this way, it's a loaded question, akin to 'Does
this dress make me look fat?'  There's no good answer...  Outputting HTML is
only part of the web story, so I think a better question is 'where is RPG
not the BEST choice for a web application?'  One example of an RPG weakness
is XML.  Rather, the indirect reference that XML seems to use.  

It's trivial to hardcode
<Name>
  <Fred Bloggs>
</Name>
in O specs and emit XML.  

It's a bit harder to put that into a file, as a template (a la CGIDEV2), but
well within the reach of RPG (and me!)

It's harder still to read the element names from a file and fetch the
contents of the element from it's file/field.  I want a file like: Trading
partner ID, Element name, Element location.  I can do a read loop on the
file by trading partner ID and get each element name and it's contents.  For
this example, that would be NAME, and CUSTLIB/CUSTMAST MASTRCD/CUSNAM.  I
want to be able to expand the DTD or schema AND cross reference each element
to the proper place in my database.  I can do indirect references with an
API call to the database file field description or by embedded SQL, but with
SQL we're already starting to leave the realm of traditional RPG.

And then comes the task of decoding my trading partner's response, which is
harder still.

Yes, I picked something that seems difficult; on par with writing my own
stream sockets in RPG.  But it's in demand, today.  I completely concur that
spitting out an inquiry screen in simple HTML is a no brainer for RPG.  I
just wanted to show a real example of real demand where RPG is hard pressed
to keep up with Java.

Another example, try making a secure web site where you look at your bill
online and pay for it there if you wish.  Doing that without servlets is
hard, partly because it's rather difficult to secure a CGI-only page.  That
is, it's readily spoofed with easily obtainable tools like GETURI.

I'm not out to bust anybody's chops.  Yes, a multiple language shop is more
difficult to work in than a single language shop.  Yes, RPG can do a lot of
web things quite well.  But it is weak in some areas too, and the informed
programmer is better off than the uninformed one.  That's my only point.  I
know you're not bent out of shape at using multiple languages, and I know
you're enjoying the witty repartée.  But you have to agree with the
statement that 'RPG is not THE BEST language for all functionality in all
environments.'  I think that's all anybody's been trying to say, but I've
been wrong before!
Best regards,
  --buck


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.