The main thing that caught my attention while researching Node.JS is that it's a run time environment for JavaScript. It lets you run JavaScript on a server. This is analogous to the way the Java Runtime Environment (JRE) lets you run Java on a server.
You have to bring a few things together in order to have a Node.JS web environment ready for production.
1. Node.JS is very opinionated. You HAVE to use event-loop programming with call backs. You will want to find debugging tools to help you deal with this type of programming. I know some IDE's are also providing coding and debugging support for Node.JS development (e.g., WebStorm).
2. Coding a simple web server in Node.JS is extremely easy (a handful of lines of code), but you don't get all the functionality of a more mature web server like Zend's web server, Apache, or WebSphere. You might end up having to code quite a bit more for your particular production needs.
3. You probably want to use a web application framework. There are plenty to choose from (
http://www.devsaran.com/blog/10-best-nodejs-frameworks-developers).
4. IBM has kindly provided a JavaScript toolkit that will let you take advantage of XMLSERVICE from scripts running on Node.JS. I'm guessing this will make your life much, much easier.
5. Since you will likely want to develop RESTful services using Node.JS at some point, you will probably a package to help create and parse JSON.
6. Don't forget some kind of version control system for your JavaScript code.
Thanks,
Kelly
-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Joe W Holt
Sent: Monday, July 13, 2015 10:20 AM
To: Web Enabling the IBM i (AS/400 and iSeries)
Subject: Re: [WEB400] The responsive web site debate
I'll be curious to see how Node.js can work on the 400. I've gotten the Hello World out of it. Then I had to stop and actually work.
***
Regards,
Joe W Holt
Sr Programmer/Developer
Jack Onofrio Dog Shows, LLC
405.427.8181
From: Kevin Turner <kevin.turner@xxxxxxxxxxxxxxxxxxxx>
To: "Web Enabling the IBM i (AS/400 and iSeries)"
<web400@xxxxxxxxxxxx>
Date: 07/13/2015 10:09 AM
Subject: Re: [WEB400] The responsive web site debate
Sent by: "WEB400" <web400-bounces@xxxxxxxxxxxx>
My well intentioned (I promise) email about using a nodeJS solution on the IBMi seems to have been immediately side-tracked into a debate about whether or not this is the correct forum. Oh well....
-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Mark Murphy/STAR BASE Consulting Inc.
Sent: 13 July 2015 12:22
To: Web Enabling the IBM i (AS/400 and iSeries)
Subject: Re: [WEB400] The responsive web site debate
Seems to me that if IBM i is being used to serve these applications, this is the correct place to discuss them. While the technologies are essentially platform agnostic, particularly the part that is running on the client, there are pieces of the server side that are largely specific to IBM i, for example DB2 for i. Besides, if we kick out these discussions we are intentionally diminishing the IBM i community. If we really want IBM i to be viewed as a modern server, which it is, we need to be discussing modern technologies in these lists. IBM i does have a modern UI, it runs in a browser, and we are discussing it here. So what if the technology is platform agnostic.
Mark Murphy
STAR BASE Consulting, Inc.
mmurphy@xxxxxxxxxxxxxxx
-----Kelly Cookson <KCookson@xxxxxxxxxxxx> wrote: -----
To: "Web Enabling the IBM i (AS/400 and iSeries)" <web400@xxxxxxxxxxxx>
From: Kelly Cookson <KCookson@xxxxxxxxxxxx>
Date: 07/12/2015 11:57AM
Subject: Re: [WEB400] The responsive web site debate
It seems to me if we're going to build web sites and hybrid apps that use
DB2 data and/or programs on an IBM i, we need to know our options for developing the front ends of those sites and apps. HTML, CSS and JavaScript have become de facto web standards for the front end. Responsive web sites and single page apps (not the same thing) are two options we have for the front ends or web sites and hybrid apps that are different than traditional web pages for desktop browsers.
When we use PHP on the IBM i to develop a responsive web site, are questions having to do with the responsive front end of that web site questions for WEB400? When we use Java or the Integrated Web Services to create a RESTful services that pulls DB2 data into a single page app, are questions about the single page app on the front end suitable for WEB400?
What about when we try to create a hybrid mobile app using HTML, CSS, JavaScript or Cordova? None of these are IBM technologies. But the IBM Mobile First\Worklight initiative has made Cordova a central tool for developing mobile apps. Are questions about the HTML, CSS or JavaScript code inside a Cordova hybrid app proper for WEB400?
I really like the Midrange.com lists, and I'm happy to play by the rules.
So here's my question:
Is WEB400 an appropriate forum for discussing the front ends of all the web sites and mobile apps we are building?
Or is WEB400 only appropriate for the back ends of those web and mobile technologies (web servers, server-side scripts, CGI programs, web services, RESTful services, etc.) when those back ends are running on an IBM i?
Thanks,
Kelly
-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Henrik Rützou
Sent: Sunday, July 12, 2015 5:29 AM
To: Web Enabling the IBM i (AS/400 and iSeries)
Subject: Re: [WEB400] The responsive web site debate
Kevin
You are quite right, WEB400 or any other IBM i specific forum/groups isn’t the right place to discuss either SPA or web client frameworks.
This will tend to be discussions between very few people where any web client framework has their own specific forums/groups that seldom are server centric or specific.
I use EXT JS and am a member of a cross server platform group specific to EXT JS and HTML5. Most of the members is PHP or .NET guy’s but we are also
4 IBM i ISV’s that participates and we meet much more regular that any IBM i user group.
There are clear advantages to participate in other groups, they are Front End related, they are able to attract experts on the technology and frameworks they cover and they widens ones network of people with a common technical preference outside the IBM i frame.
In regards to their main forums there is however a drawback. There are many people in them (up to 500.000) so the coziness and the personal relations we experience in IBM i forums are gone and it is very hard to get answers on ‘newbie’ questions or personal guidance to specific problems.
With all due respect for Kelly and Nathan’s interesting discussion I have been following on the side line I personal don’t think it is the right path. They use hours to try to set up a simple SPA homepage you are able to make in WordPress in two hours. But more important – WordPress creates applications that is content management not business applications. Kelly and Nathan are playing with the same – simple content management, while
90-95 % of a business application is handling menu’s, grid’s and form’s that has to interact with each other and services on the server. To me that’s a whole other ballgame.
But that is another discussion – e.g. are the IBM i suitable for running CMS and business applications side by side even though it can?
On Sun, Jul 12, 2015 at 11:11 AM, Kevin Turner < kevin.turner@xxxxxxxxxxxxxxxxxxxx> wrote:
Oh, and it also uses web sockets to communicate with the nodeJS server
as well as HTTP.
-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Kevin
Turner
Sent: 12 July 2015 10:03
To: Web Enabling the IBM i (AS/400 and iSeries)
Subject: [WEB400] The responsive web site debate
"How would Bootstrap be an improvement?"
I didn't really see an answer to this question, and as I had no real
practical experience of bootstrap I decided to have a go at a
prototype that used it so that I can judge for myself. This topic is
not really anything to do with the IBMi platform, it is more to do
with general web design and tooling - perhaps WEB400 is not the right
forum?
Anyway, one of the things we want to do pretty soon is have a platform
agnostic solution - something that we can run on the IBMi and any
other platform (Unix, Windows) if it is appropriate. So as well as
trying out something that used bootstrap, I also wanted to try
something that used a nodeJS server solution rather than Apache.
While I was at it, I might as well get some practical experience of
Angular as well, so that I can really compare it with our own
Renaissance
6 Framework.
So this is the opposite end of the spectrum. Nathan is rather "anti"
frameworks and libraries as they can be allegedly over scoped. This
little prototype at http://kpturner.co.uk:1337 will therefore fill him
with horror, because I have used Angular, Bootstrap, JQuery and a
NodeJS server
- all glued together with a Framework called Sails (sailsjs.org). I
haven't created any documentation for it at the moment - it is just a
proof of concept really so that I can get to understand what all these
libraries have to offer. However, the source can be viewed on github (
https://github.com/kpturner/sails_events). As an aside, we are now
using Git on our IBMi to manage all our source code, RPGLE etc included.
I haven't reached any hard and fast conclusions yet. I have had plenty
of problems trying to fathom out the best way to do things, mainly due
to my lack of experience in the tools/libraries. I would definitely
consider using bootstrap in Renaissance, but Angular (so far) I find
less
intuitive
than our own offering (no surprise there then). What really is exciting
(can't believe I am using that word in this context) is the use of
nodeJS as the server platform. JavaScript is by far my favourite
language, so being able to write the server-side code in JavaScript is
liberating. I can debug using node-inspector, and have access to all
those node goodies (node-machines included).
The only fly in the ointment so far, with regard to running it on the
IBMi, is the database access. This prototype uses MySQL. The SailsJS
framework uses an ORM called Waterline that provides an integration
layer to lots of different databases, but DB2 isn't one of them. That
is a hole that I intend to fill one way or another.
Anyway, I thought I would share my experiences as well as making
Nathan feel nauseous :)
Kevin
-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Nathan
Andelin
Sent: 07 July 2015 20:07
To: Web Enabling the IBM i (AS/400 and iSeries)
Subject: Re: [WEB400] 7 lessons from my first responsive web site
Aaron,
Yes, I've already read about Bootstrap's "grid" options and played
with them on one project. But I'd like to hear about some practical
examples of people using them, to better understand what might be
entailed. My understanding, which is admittedly limited, is that
developers may select from "extra small", "small", and "large" CSS
classes for HTML elements. CSS Class names indicate whether they are
targeted for use with various screen sizes. But what is "responsive"
about that? What about GUI elements that automatically adapt to screen
sizes?
Kelly's site demonstrated the use of "media queries" which
automatically toggle the visibility of a "menu bar" for larger screens
or an optional "drop-down" menu for smaller screens. How would
Bootstrap
be an improvement?
On Tue, Jul 7, 2015 at 12:48 PM, Aaron Bartell <aaronbartell@xxxxxxxxx
<mailto:aaronbartell@xxxxxxxxx>>
wrote:
*>For those who advocate for Bootstrap, what does it really take to
make it adapt to multiple screen sizes?*
Check this out: http://getbootstrap.com/css/#grid-options
Aaron Bartell
--
This is the Web Enabling the IBM i (AS/400 and 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 email has been scanned by iomartcloud.
http://www.iomartcloud.com/
________________________________
NOTICE: The information in this electronic mail transmission is
intended by CoralTree Systems Ltd for the use of the named individuals
or entity to which it is directed and may contain information that is
privileged or otherwise confidential. If you have received this
electronic mail transmission in error, please delete it from your
system without copying or forwarding it, and notify the sender of the
error by reply email or by telephone, so that the sender's address
records can be corrected.
----------------------------------------------------------------------
----------
CoralTree Systems Limited
Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton
Hampshire
SO15 2EA
VAT Registration Number 834 1020 74.
--
This is the Web Enabling the IBM i (AS/400 and 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.
___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/
________________________________
NOTICE: The information in this electronic mail transmission is
intended by CoralTree Systems Ltd for the use of the named individuals
or entity to which it is directed and may contain information that is
privileged or otherwise confidential. If you have received this
electronic mail transmission in error, please delete it from your
system without copying or forwarding it, and notify the sender of the
error by reply email or by telephone, so that the sender's address
records can be corrected.
----------------------------------------------------------------------
----------
CoralTree Systems Limited
Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton
Hampshire
SO15 2EA
VAT Registration Number 834 1020 74.
--
This is the Web Enabling the IBM i (AS/400 and 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.
--
Regards,
Henrik Rützou
http://powerEXT.com <
http://powerext.com/>
--
This is the Web Enabling the IBM i (AS/400 and 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.
--
This is the Web Enabling the IBM i (AS/400 and 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.
--
This is the Web Enabling the IBM i (AS/400 and 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.
___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/
________________________________
NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected.
--------------------------------------------------------------------------------
CoralTree Systems Limited
Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton
Hampshire
SO15 2EA
VAT Registration Number 834 1020 74.
--
This is the Web Enabling the IBM i (AS/400 and 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.
--
This is the Web Enabling the IBM i (AS/400 and 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.