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



That, however, is not what the "PHP for the i" crowd is saying. They're

saying to use PHP as your primary scripting language, which means your
HTML is generated by your PHP, which in turn means that your JavaScript
is generated by your PHP. It's a bizarre Rube Goldberg technique, but
that's what you get if your architecture is just an extension of PHP 4
coding techniques, which sadly is the bulk of PHP programming out there.

Balderdash... I have not heard anyone in the "PHP for i" crowd or
otherwise speak of generating JavaScript from PHP. Doesn't mean it hasn't
happened, but that would be just plain crazy. I have heard talk about
mixing PHP with HTML to write individual pages, and you would then add
JavaScript into the same page if you needed it, but the PHP is generating
neither the static HTML, nor the JavaScript in that instance. While it is
certainly a possibility, I would classify that under the heading of "You
Can Write Bad Code in Any Language". If you use a MVC framework such as
the one from Zend, then You can keep the HTML and PHP separate, and use
PHP as a server side programming language, and HTML as a markup language
with some minimal PHP to echo variables within the HTML.

I think the confusion is coming from people trying to say that you can
write your PHP very much like you write your RPG. One script per page,
put everything for the page into that one script. And may RPG programmers
like that. But, even then you are not generating JavaScript, with PHP,
and you can write the page so that you generate only the dynamic portions
of your HTML. Even though you can write PHP in a monolithic manner, it
isn't considered a good way to do things in the PHP community. Just as
you can use RPG IV the same way you use RPG III, but then you aren't
really writing RPG IV are you. If you really want to write RPG IV you
need to start writing reusable sub-procedures, and remove yourself from
the monolithic programming practices of the past.

If you think about it that way, both RPG IV and PHP can be the path to
learning modern programming techniques on the iSeries. BTW, I continue to
find myself slipping deeper into the 15, 20, even 30+ years of experience
category you spoke of, and I feel your pain as many of my colleagues still
only program in RPG III, and don't have the time to learn modern
productivity enhancing techniques. I usually tell them I have too much to
do to not learn them.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.