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



My answer to your second question would be to look at Single Page Web Applications (SPAs) and some sort of framework, I use Angular as I have mentioned, but Vue and React are two other popular ones. You are going to take some pain learning the client-side stuff, in fact a lot of pain perhaps, but I see absolutely no merit in learning PHP or some other server-side technology, in order to create dynamic HTML on the server, for a modern web application (I believe PHP could be used to create the web service itself, which is fine).

IMO you need to treat this whole exercise are two completely separate things, which you've started to do already. There's the web service, which is the bit where you need to bring together the old and the new world, so you need to create some sort of RESTful(ish) API which can consume and produce JSON from your RPG/SQL or whatever and that also manages security etc. etc. Your entire application should be usable by calling your web-services alone, albeit not exactly user friendly!

Step two is to start learning one of the frameworks above, they are totally independent of the IBM i and you don't need to care about any server side technology at all, the resulting web app (which will be a bunch of files in a folder) can be literally dumped into your HTTP server folder in the right place at it will work. This is where you're going to have to invest time in HTML, Javascript, CSS and all the other things you need. The web app using one of these Frameworks can be scaffolded very quickly to produce a working skeleton app and it will use your web-service to get the data to display and perform operations on the back-end. They also run locally on your PC during development so as soon as you change your source code the web-page will immediately refresh and you can see the effect - I can assume you, it's a far-cry from developing RPG!

I suspect this might be a controversial suggestion but I think it's far easier in the long run, you'll at least be learning what is the current state of the art and 90% of it will be portable knowledge, not tied the IBM i and nor will you have to faff around with IBM specific server side stuff to create your pages.



________________________________
From: WEB400 <web400-bounces@xxxxxxxxxxxxxxxxxx> on behalf of Booth Martin <booth@xxxxxxxxxxxx>
Sent: 08 April 2019 23:05
To: Web Enabling the IBM i (AS/400 and iSeries)
Subject: Re: [WEB400] CORS header 'Access-Control-Allow-Origin'

Yes they are two different things.

Thing 1: I have an SQLRPGLE service program that provides json data
to an application server that I set up using IWS. If I type the url
for that web service into most any browser I get a screen like this:

dayOut "2019-03-06 is a Wednesday"
httpStatus 0
httpHeaders
0 "Valid day-name was found."

That is Thing 1 and works just fine. Very happy with it.

Thing 2: Now we need to consume the data. Just telling the web
people "Here's the data!" works but puts everything out of our
control. So I want a web server, on the i, serving up that data in
the way I want it served up. That's where my latest round of
troubles start. Can I put the web page on the same server as
provides the web services? I have no idea, i don't even want to
know. I can consume that data off my PC's browser with no problem
but from a server at the same root url? Things go all wobbly, which
I suspect is a reflection upon my ignorance of the processes involved.



On 4/7/2019 7:32 PM, Scott Klement wrote:
Booth,

Are you confusing Web Services (APIs) with Web Pages? These are two
completely different things. I don't understand what home pages have
to do with web services. If you have some reason why they'll need to
work together in your scenario, please explain it.
--
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://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.midrange.com%2Fmailman%2Flistinfo%2Fweb400&amp;data=02%7C01%7C%7C4d6ada31364e487b831b08d6bc65f9b8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636903543493783729&amp;sdata=K%2FPppg%2FfdBz%2BFtv5jDbhV7bfC7B%2Fbp6wO3kw79qE2Cg%3D&amp;reserved=0
or email: WEB400-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchive.midrange.com%2Fweb400&amp;data=02%7C01%7C%7C4d6ada31364e487b831b08d6bc65f9b8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636903543493783729&amp;sdata=vLiEBVMxuElA0CjAzYc1QpFOMpZBnwlNV5M4aNqMt7E%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.