|
Loyd, again I agree to a certain point. The reason I asked my questions is because it was said changing the user interface requires no programming. It wasn't explained that this did not mean adding or removing input fields. To some, they may assume this. I just wanted to make sure it was understand that it was not that easy. Thanks for defining what this "change" was. Now, controlling "how" data looks really consists of two layers. 1. How the data itself is presented, ie a table, dropdown box, list, text box, etc. 2. How the data "looks". ie. it's style. This can easily be done using stylesheets, font HTML codes, etc. I assume you are referring to #1 when speaking of templates. Templates can make your job easier, yes. But as the projects become more complicated, the templates (which will multiply very quickly) do as well. Changing the display of data from a table to a dropdown box is not always as easy as changing the template. I created quite a large system for the company I used to work for. I did not use templates (that doesn't mean I don't think they are a valuable option). Instead, I chose to put the "how" into the programming using control files. This way the user of the pages themselves could choose what data is displayed, and how it was displayed using simple interfaces. In this case, there were not actual html files to change. And each user could have their own unique display, including what data, how it was displayed, and what display attributes were used (font, color, etc...) As far as "you shouldn't ANY put HTML in your CGI programs", I just disagree. You say that you don't put DDS keywords in your programs. That should read "you really CAN'T" put DDS keywords in your programs. If you could put DDS keywords into your RPG programs, I can know that people would. You can already control color, positioning and other attributes for display files using RPG programs (similar to using Stylesheets with HTML). If it were easy to build an "on the fly" display file as it were an HTML page, I wager it would go over quite well. Also, the two are really not good comparisons of a user interface. HTML web pages are not near as interactive as a display file. There are more than five ways to skin a cat, and there will be more in the future. I just don't like it when people say "you shouldn't do this", especially when it's to sell a product or service. In reality, most (even outside the iSeries arena) do put HTML in their CGI applications. And to little or no consequence. And I'm not talking about head to toe HTML in a CGI program. Take care, Brad www.bvstools.com On Sun, 13 Jan 2002 11:20:26 -0600 Loyd Goodbar <loyd@blackrobes.net> wrote: > 1. When we talk about "a change to the user > interface...", it doesn't mean > user interface elements such as new input fields, but the > presentation of > data. It's totally understood that if new input is > required from the user, the > program must necessarily change. Duh. But, CGIDEV2, > Nathan's Relational-Web, > and FastTemplate (Perl or PHP, take your pick) allow the > program to dump all > that nasty HTML code to template files. > > The template defines HOW to display the output. All the > program should do is > fill in variables. This way, you can change the > presentation without > changing/recompiling the program supplying the data. Want > to change from 3 > columns to 3 stack? Change the template. Want to > italicize or boldface an > item? Change the template. Want to add a new field to the > output? OK, then you > need to change both the template and the program. > > Properly constructed, you never need to recompile the > program when you change > the template. Program = WHAT, template = HOW. > > 2. This is not saying a program is not needed, but that a > program should not > contain HTML. CGIDEV2 is all about RPG (and COBOL), and I > use it because it > provides a separation between what I display and how I > display it. As a matter > of fact, if I wanted to create XML, I could do so easily > by creating an XML > template file (using the same section and variable > names), and (probably) only > add selection logic to the RPG program to determine which > template to use. > > NOTE: I do not work for Relational Data, and I do not use > Relational Web. I do > not resell their product. > > Examples of CGIDEV2, Relational-Web, and NET.Data can be > found here: > <http://www.relationaldata.com/p.roducts/rweb/cgi/mainfs.htm>. > All allow for > some degree of HTML/logic separation. Relational-Web & > CGIDEV2 allow the most, > and NET.Data mixes HTML + macros. > > You do not put DDS keywords in your RPG programs. Why > should you put HTML > keywords in your programs? > > HTH, > Loyd >
As an Amazon Associate we earn from qualifying purchases.
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.