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



Here's one real-world scenario in support of the occasional requirement to
include "view" instructions in the "model" component: I have a HTML variable
for an error message and there may be several error messages.  Adding a
"<BR>" to force each message to start on a new line, and possibly using some
(variable) color-coding of error messages, significantly increases the
usability of user interface.  Should I give users a poor-quality UI?  No.
Will this complicate conversions, rewrites, upgrades?  Yes, but I hope the
improved user efficiency will offset the incremental (scan for "<BR>",
replace it with something else, etc.) cost of the conversion.

Having 100% isolation between every element in the model-view-controller is
nice theory but hard to implement in a cost-efficient matter (that comment
will bring out the vendors!).  Even in the 5250 environment, we had two
sizes (*DS3, *DS4; we'll forget the S/38 console); monochrome/color, and
various flavors of WS controllers.  While compatibility existed at the
lowest level (5250 vs. 3196, etc.), you're limiting yourself at a geometric
rate (if you have 90% compatibility with each of three elements, you really
only have 72.9% (.9 x .9 x.9) compatibility.  To do the best job in the
"model", you have to understand the view and controller.  I see all
components as highly sensitive to the capabilities of the others.

Brad's words regarding embedding DDS in your program are correct if you
don't consider the program-to-system variable function that allowed you to
set a field's attribute (except for the all-important "PC" attribute)
directly in the program.

-----Original Message-----
From: web400-admin@midrange.com [mailto:web400-admin@midrange.com]On Behalf
Of Brad Stone
Sent: Sunday, January 13, 2002 1:07 PM
To: web400@midrange.com
Subject: Re: [WEB400] First Internet application

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
>

_______________________________________________
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/web400
or email: WEB400-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.



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.