As far as the MVC on the client, I believe considering HTML rendering purely a client responsibility is severely misguided. Too many sites follow this philosophy, and as a result, they make their users wait on elephantine scripts to run before they can use their app.
Some of the IBM i vendor demo pages that I've seen suffer from this responsiveness problem.
Another, but extremely prominent, example of this was Twitter. Prior to May, they downloaded a JavaScript application that then requested tweets in JSON format. Unsatisfied with the response time, they moved rendering to the server and reduced one of their critical metrics -- "time to first tweet" -- to 1/5 of what it was.
A truly modern architecture will leave its options open, choosing the best location for rendering based on how well it services its user needs.
-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Niels Liisberg
Sent: Monday, December 10, 2012 6:46 AM
To: AS400 iSeries
Subject: Re: [WEB400] Web Enabling Applications
Gent;
The beauty is when you can have it with both vanilla AND chocolate. I don't believe in "one-size-fits-all". Therfore IceBreak can produce JSON / JSONP data stores directly from SQL statements in one line of RPG-code. - this will do the trick for like 80% for typical queries run against the IBMi. However the remaining 20% might be more sophisticated data stores: For that reason IceBreak also has an RPG serializer / deserializer for JSON. You can POST JSON content and use simple X-PATH language to query the JSON within RPG. Then decorate the JSON or build a new response from scratch and return the response with the serializer..
So in Jim's case i'll go with the simple IceBreak one-liner to produce the JSON with what Henrik refers to as the "black-box" . IMHO serializing/deserializing is not on the plate of an 101-course in web technology where your focus should be on jQuery / HTML and other front-end related technologies.
Also - I'm on the same page as Jim; Thinking MVC - Model View Control leaves the IBMi to handle all the services and serve the resources which it is so good at, and we can even bring young people to the platform since the can have focus on the UI and the controller part of the app which will be written in JavaScript.
Best regards
Niels Liisberg
Chief Software Architect
System & Method
Håndværkersvinget 8
DK-2970 Hørsholm
Phone: +45 70 20 30 10
Fax: +45 70 20 30 11
Direct: +45 45 166 135
Mobile: +45 31 158 861
E-mail: nli@xxxxxxxxxxxxxxxxx
Web: www.system-method.com and www.Icebreak.org
From: Jim Cooper <Jim.Cooper@xxxxxxxxxxxxxxxxx<mailto:Jim.Cooper@xxxxxxxxxxxxxxxxx>>
Reply-To: AS400 iSeries <web400@xxxxxxxxxxxx<mailto:web400@xxxxxxxxxxxx>>
Date: Sat, 8 Dec 2012 00:27:57 +0100
To: AS400 iSeries <web400@xxxxxxxxxxxx<mailto:web400@xxxxxxxxxxxx>>
Subject: Re: [WEB400] Web Enabling Applications
Henrik,
As a college instructor of Web technologies, I do not teach or use the approach of generating HTML code from a server-side program. Only JSON data is generated from the server-side program. I'm not sure what approach Niels is currently using, but regardless, I believe the modern approach is to split the application into separate tiers where the HTML is generated at the client-side tier and the server-side tier generates JSON data. If I generated HTML at the server-side tier, the application would not be portable. Also, it would be difficult to teach client-side Web technologies where the web content was generated from a server-side program. My student would go crazy and complain. I teach the client-side Web technologies first so students can learn how to develop the UI and then tie it to a back-end server-side language like RPG for the JSON data. IBM i folks need to consider this development model so they can hire people with current skills. The RPG skills required to generate JSON data can be taught quickly to someone that Web technologies skills.
Jim Cooper
Program Coordinator
Lambton College
jim.cooper@xxxxxxxxxxxxxxxxx<mailto:jim.cooper@xxxxxxxxxxxxxxxxx>
519-542-7751 ext. 3219
________________________________________
From: web400-bounces@xxxxxxxxxxxx<mailto:web400-bounces@xxxxxxxxxxxx> [web400-bounces@xxxxxxxxxxxx<mailto:web400-bounces@xxxxxxxxxxxx>] on behalf of Henrik Rützou [hr@xxxxxxxxxxxx<mailto:hr@xxxxxxxxxxxx>]
Sent: Friday, December 07, 2012 5:41 PM
To: Web Enabling the AS400 / iSeries
Subject: Re: [WEB400] Web Enabling Applications
Jim,
yes it is, even Niels like to put the code into "black boxes" instead of making the node support more straigt forward. But things may have changed since we abandoned the originally IceNreak/Portfolio project 5 years ago done by 3 ISV's after 8 month of developing.
On Fri, Dec 7, 2012 at 11:33 PM, Jim Cooper <Jim.Cooper@xxxxxxxxxxxxxxxxx<mailto:Jim.Cooper@xxxxxxxxxxxxxxxxx>>wrote:
Generating JSON from an RPG program is quite simple with IceBreak. Minimal to no learning curve.
Jim Cooper
Program Coordinator
Lambton College
jim.cooper@xxxxxxxxxxxxxxxxx<mailto:jim.cooper@xxxxxxxxxxxxxxxxx>
519-542-7751 ext. 3219
________________________________________
From: web400-bounces@xxxxxxxxxxxx<mailto:web400-bounces@xxxxxxxxxxxx> [web400-bounces@xxxxxxxxxxxx<mailto:web400-bounces@xxxxxxxxxxxx>] on behalf of Allen, Todd [Todd.Allen@xxxxxxxxxxxxxxxxx<mailto:Todd.Allen@xxxxxxxxxxxxxxxxx>]
Sent: Friday, December 07, 2012 5:11 PM
To: Web Enabling the AS400 / iSeries
Subject: Re: [WEB400] Web Enabling Applications
The only potential hitch there is generating the JSON data in the HTTP response with RPG. I know there is JSON functionality that is readily available in most web development languages. I don't know if there is a good option for dealing with JSON data in RPG. Rolling your own JSON library in RPG is not something I'd relish doing.
Thanks,
Todd
-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx<mailto:web400-bounces@xxxxxxxxxxxx> [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Jim Cooper
Sent: Friday, December 07, 2012 5:05 PM
To: Web Enabling the AS400 / iSeries
Subject: Re: [WEB400] Web Enabling Applications
I think Todd is saying the same thing I was saying. If you generate your Web application with client-side technologies (HTML5, JavaScript, jQuery, etc), and make requests to a server-side program (RPG on IBM i) for JSON data, the application is much more portable since the user interface is not being generated by a server-side application. The function of the server-side program (RPG) is to provide the data in JSON. Much cleaner as well.
Jim Cooper
Program Coordinator
Lambton College
jim.cooper@xxxxxxxxxxxxxxxxx<mailto:jim.cooper@xxxxxxxxxxxxxxxxx>
519-542-7751 ext. 3219
________________________________________
From: web400-bounces@xxxxxxxxxxxx<mailto:web400-bounces@xxxxxxxxxxxx> [web400-bounces@xxxxxxxxxxxx<mailto:web400-bounces@xxxxxxxxxxxx>] on behalf of Allen, Todd [Todd.Allen@xxxxxxxxxxxxxxxxx<mailto:Todd.Allen@xxxxxxxxxxxxxxxxx>]
Sent: Friday, December 07, 2012 4:40 PM
To: Web Enabling the AS400 / iSeries
Subject: Re: [WEB400] Web Enabling Applications
We're talking about 2 different things - jQuery is a client-side Javascript library while CGIDEV2 is a server-side application. Javascript libraries can be used with any server application, obviously. You also lose all portability that way in that only an IBM i system can run your server-side app. Using PHP allows the flexibility to put your web server on most any platform. (The back end stays on the IBM i.) That may not be a concern now but it may be in the future.
Can you create web applications with CGIDEV2? Sure, but I would think long and hard before going down that road.
Thanks,
Todd
-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx<mailto:web400-bounces@xxxxxxxxxxxx> [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Vernon Hamberg
Sent: Friday, December 07, 2012 3:06 PM
To: Web Enabling the AS400 / iSeries
Subject: Re: [WEB400] Web Enabling Applications
Allen
there's no reason you can't use things like jquery when using CGIDEV2 - the latter is just a way to externalize HTML, similar to how it is done with DSPFs.
I'm converting to use CGIDEV2 in one of our products. I see it as very similar in concept to tags as used in PHP or Java.
Again, doesn't JQUery have plugins for JSON?
Just as I said to someone who said about this facelifted interface - I didn't know you could do that on the iSeries. I said, HTML is just text
- you can do anything!
Same with CGIDEV2 - it's just a streamlined way to put out the text that comprises HTML.
Just the humble opinion of a newbie to CGIDEV2 and lovin' it!
Regards
Vern
On 12/7/2012 1:06 PM, Allen, Todd wrote:
I may be in the minority here but I'd shy away from using CGIDEV2 for
any sort of web development. I say minority on this list only. The percentage of all web developers that have used or heard of CGIDEV2 is probably less than .001%. We've found that RPG developers are hard to find. RPG developers that have web experience are even harder to find. If JSON is a requirement then I'd also be concerned about processing JSON data with RPG. There are plenty of libraries out there for JSON processing but I don't know if you'll find one for RPG.
You could stand up a Linux server running an Apache web server with
PHP
and connect to your SQL stored procedures on the i fairly easily. There are JSON functions built in to the PHP language. You did not mention Java so I assume that is not an option.
A big consideration for you is the expertise in your organization.
That
may help drive your decision. If you have access to a lot of RPG developers then CGIDEV2 may be worth a look but keep an eye on the future.
That's my biggest hesitation with CGIDEV2.
Thanks,
Todd
-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx<mailto:web400-bounces@xxxxxxxxxxxx>
[mailto:web400-bounces@xxxxxxxxxxxx]
On Behalf Of Michael Ryan
Sent: Friday, December 07, 2012 11:55 AM
To: Web Enabling the AS400 / iSeries
Subject: [WEB400] Web Enabling Applications
Ok...wide ranging topic I'm sure, but it's Friday. Here's what I'm
looking for...opinions, solutions, ideas regarding web enabling
(browser access) to i applications. A couple of points: The logic on
the i will be written
(re-written) to be accessed by a procedure call. I'm pretty sure I
want
the returned data to be in JSON format. I'm obviously concerned about security and session state. This application would be for in-house users, not the public.
I'm thinking three main middleware paths - PHP, CGI, and vendor
proprietary...others?
Some products/frameworks that I know of are easy CGIDEV2, Renaissance,
Zend, powerEXT..others?
Feel free to contact me off list if desired. I look forward to the
comments.
Thanks!
For More Than 80 Years-Delivering Solutions That Exceed Expectations.
This communication and any transmitted documents are intended to be confidential. If there is a problem with this transmission, please contact the sender. If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited.
--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx<mailto:WEB400@xxxxxxxxxxxx>
To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx<mailto:WEB400-request@xxxxxxxxxxxx>
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.
P Please consider the environment before printing this email This e-mail may be privileged and/or confidential, and the sender does not waive any related rights and obligations. Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized. If you received this e-mail in error, please advise me (by return e-mail or otherwise) immediately.
--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx<mailto:WEB400@xxxxxxxxxxxx>
To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx<mailto:WEB400-request@xxxxxxxxxxxx>
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.
--
Regards,
Henrik Rützou
http://powerEXT.com <
http://powerext.com/>
--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx<mailto:WEB400@xxxxxxxxxxxx>
To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx<mailto:WEB400-request@xxxxxxxxxxxx>
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.
--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx<mailto:WEB400@xxxxxxxxxxxx>
To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx<mailto:WEB400-request@xxxxxxxxxxxx>
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.
--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
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.