Hi Tim

Thanks for responding - this makes a lot of sense to me. I especially appreciate your comment about "...embedding SQL statements in a spaghetti of HTML..." because I maintain a website (for a community band I play in) using classic ASP in just that fashion - and it's not my idea of a good time! It is something I inherited and just don't have time to transform it into a different approach.

But it's better than the original late '80s stuff using a table to present a gradient of colored cells in a 5x5 block!!

Regards
Vern

On 5/25/2020 8:21 AM, Tim Fathers wrote:
You're right, and I made some assumptions about what was being asked too - namely that the OP was attempting to generate HTML "subfile" tables using PHP in its original form. By this I mean embedding SQL statements in a spaghetti of HTML to render the front-end which, IMO, is absolutely not the right way to go about creating a modern web application. It's also fair to say that PHP has moved on significantly from when I last used it but my understanding is that it can be used to write the back-end only code also but even here I would ask why you'd do that, especially if you are using it to write business logic. If the purpose is to create a pure RESTful JSON API (which it should be I think) then you might as well use the power of SQL and express your business logic behind stored procedures in the native language of your choice and use IWS or some slim Node/PHP layer to connect the webserver and the stored procedures. Not only does this minimise the learning curve and keep most people
on more familiar territory, it's more secure in my view. We use a Java interface for this that I co-wrote and I have also written a Node version too (albeit for MariaDB and Postgres not yet for IBM i), which is no more than a few dozen lines of code. On our platform I don't see any benefit to writing backend logic using Node, PHP or any other type of "non-native" language when everything can be done using SQL and tools we already know.

For the front end it's a different story, I love the SPA architecture and I think it's about as close to the elusive split between a client/server that we've come up with. That said, the learning curve is very steep, we use Angular, and I'm happy with that choice still but I won't pretend it's not difficult to get to grips with. Angular JS is what Angular was originally called before it went through a major rewrite for version 2, because it was such a radical change (and rewritten using Typescript) it was rebranded, with the original Angular being referred to as "AngularJS" and the new version simply "Angular" - AngularJS is dead and deprecated.

Tim.



________________________________
From: WEB400 <web400-bounces@xxxxxxxxxxxxxxxxxx> on behalf of Vernon Hamberg <vhamberg@xxxxxxxxxxxxxxx>
Sent: 25 May 2020 14:07
To: Web Enabling the IBM i (AS/400 and iSeries) <web400@xxxxxxxxxxxxxxxxxx>
Subject: Re: [WEB400] PHP webform as an alternative for subfiles

Hi Tim

Your assertion, for me, needs more to be said, more to say just what you
mean - my first reaction was to ask, is it PHP vs Angular (or one of the
other frameworks you list), absolutely? I did a little googling and
found several places saying they serve different purposes. PHP the
back-end, Angular the front-end. Yes - and I step into realms I've not
visited very much - PHP __can__ be used for the presentation - but it
doesn't have to be, it can be used to create REST APIs - as I
understand it, Angular, or whatever is the latest flavor-of-the-year,
doesn't create the APIs, it consumes them.

Now maybe some other language is more suitable for the back-end -
node.js comes to mind, as it uses JavaScript and the front-ends might,
as well - I see Angular called AngularJS (is that a different animal or
is it just a kind of rename?).

On a side note about this thread - it is maybe best if we break it off,
some concern has been raised as to the validity of the original post.
Nonetheless, the topic has moved into interesting territories.

Regards
Vern

On 5/25/2020 3:29 AM, Tim Fathers wrote:
Don't bother with PHP, learn one of the front-end frameworks like Angular, React or Vue and make your application a Single Page Application (SPA).

Tim.

________________________________
From: WEB400 <web400-bounces@xxxxxxxxxxxxxxxxxx> on behalf of techie21 IT <techiei876@xxxxxxxxx>
Sent: 22 May 2020 18:04
To: web400@xxxxxxxxxxxxxxxxxx <web400@xxxxxxxxxxxxxxxxxx>
Subject: [WEB400] PHP webform as an alternative for subfiles

Hi,

However webpages can not replace subfiles even though a lot of similar
functionality could be achieved using php so for the same i was trying to
solve one of the webform related problem using PHP.
Below is the link for the same so need expert's guidance to solve it
further:-

https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcode.midrange.com%2Ff622a96008.html&amp;data=02%7C01%7C%7C04a86253cfd145c2a5c208d800a1ef76%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637260042786832129&amp;sdata=Y%2BT6QVGJ9uym0LgpviYnIeE2W1Xim5Mx%2FuWkqMCRjKo%3D&amp;reserved=0


Thanks much...
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.midrange.com%2Fmailman%2Flistinfo%2Fweb400&amp;data=02%7C01%7C%7C04a86253cfd145c2a5c208d800a1ef76%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637260042786832129&amp;sdata=Cr%2BYvSdGyEO%2BOpzsU73Yi0RSbpsO5i7c31ej72njNIw%3D&amp;reserved=0
or email: WEB400-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchive.midrange.com%2Fweb400&amp;data=02%7C01%7C%7C04a86253cfd145c2a5c208d800a1ef76%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637260042786832129&amp;sdata=p3sBGQILqVRl3QHzxAjpm0bOpDeJwPu2q%2BeA1BGHkrs%3D&amp;reserved=0.

--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.midrange.com%2Fmailman%2Flistinfo%2Fweb400&amp;data=02%7C01%7C%7C04a86253cfd145c2a5c208d800a1ef76%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637260042786842118&amp;sdata=n6j1da%2FF2N3EzVSZSC0%2BDb5WLKFIH8tiyFTf3S2c%2F7c%3D&amp;reserved=0
or email: WEB400-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchive.midrange.com%2Fweb400&amp;data=02%7C01%7C%7C04a86253cfd145c2a5c208d800a1ef76%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637260042786842118&amp;sdata=gWsneqT93OoLyhSVncp4pwkvcydfCBhhmQ2KQlkgnMI%3D&amp;reserved=0.




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.