• Subject: RE: Web apps on the AS/400
  • From: "Nathan M. Andelin" <nathanma@xxxxxxxxx>
  • Date: Mon, 19 Mar 2001 21:49:25 -0700

I went back and reviewed the exchange on JAVA400-L about how "true OO design
makes a simple program incredible powerful".  While the dialog focused
primarily on principles of encapsulation and polymorphism it quickly became
clear to me that accomplishing the same result in RPG was equally simple and
powerful, though admittedly "object oriented".

Actually I've been using a framework of ILE components to streamline web
development.  One of my components was designed to load HTML files into
memory, and separate them in to fragments that could be referenced by name
and fragment number.  A pointer is returned by the "load" function to refer
to the corresponding HTML file.  Database fields and other values are
inserted into the "HTML Template", for lack of a better term, prior to
delivery to the browser.  Unique tokens identify the points where data is
inserted by the program.

I realized that with a single line of code, I might just as well load an XML
template.  So long as the XML template contained the same tokens to
represent
insertion points, the program wouldn't need any further changes.  Actually I
might use an "If" statement to determine whether to return XML or HTML, but
that's about all I can think of.

Nathan.

<snip from Joe Pluta>
 We just had a fairly long and enjoyable conversation
on JAVA400-L between Brad Stone and I on how true
OO design makes a simple program incredibly powerful.
In this case, we showed how, by changing his design in
some ways that are counter-intuitive to most procedural
programmers, he would be able to add the capability for
his program to return either XML or HTML by changing
just one line of code.
<end snip>




+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.