Home > AS/400 Tips > iSeries programmer tips > Programming for the Web on the IBM i, what is possible
iSeries 400 Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ISERIES PROGRAMMER TIPS

Programming for the Web on the IBM i, what is possible


Andrew Borts, Contributor
05.01.2009
Rating: -4.62- (out of 5)


iSeries news and advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


[IMAGE]
[IMAGE][IMAGE]
Andrew Borts [IMAGE]
[IMAGE]

"How dost I program on thee Web using IBM i, let me count the ways!"

People ask me what I do on the iSeries, and I tell them I program mostly for the Web on an AS/400, and they giggle. They don't know what's available until I explain everything – and I mean everything is available – you just need to understand where to look. There's even a surprise or two waiting in the wings.

Browser languages for the Web
How we communicate using a browser is not too different from the old days of programming screens using DDS. The only difference is, there are more choices in how you present the information. I can communicate to my users using a cornucopia of elements, including video, graphics, and mice, I can show them maps, I can use external sources for other items from other companies. I may communicate using XML to external sources using software to push these "packages" and receive information that I can serve to people. There are loads of tools available, and all I need to do is know what's there, and I can sew applications and solutions together. All of this can be communicated using secured communications.

Lets start with the universal language for the web, HTML – we need hyper-text-markup-language to deliver our message. This language, like its ancient cousin has a beginning (the <html>, <head>, <,/head>) middle (<body>, </body>) and end (</html>) that wraps everything together. But, it's not necessary to program with these elements in your page, as nearly all browsers will react, and output your results. The problem is – your results may vary. Unless you adhere to the basic rules of HTML, you may not get the same results between all the browsers. Stick to standard HTML, an...


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
Web Tools
Putting data from IBM i on Amazon S3 using i2S3
TAATOOL: Useful tools for programmers on IBM i
Zend Web software teams up with IBM System i
Using geocoding on AS/400 to enhance your Web presence
The iSeries Blog has a new home on IT Knowledge Exchange
The best technologies and tools for System i programmers in 2009
Search400.com Products of the Year 2008
Application modernization strategies for System i
Natively supported Web applications for Power running i
System i PHP authoring tool tries to fill void in Web-coding know-how

RPG iSeries programming
Enhancing RPG with external SQL stored procedures
Introduction to SQLRPGLE on IBM i: Making a report
Making the most of RPG data handling on IBM i
IBM i shop boosts online sales with RPG-based Web platform
Migrating from RPG to EGL on IBM i
Allow access to data from a stored procedure result set using COBOL or RPG
EGL Rich UI on IBM i: Do you Dojo?
A taste of COMMON: ILE, IBM releases, Web applications and new products
Documenting nested program structures on the AS/400
How to: Sort arrays using RPGIV

iSeries Java programming
Groovy programming on IBM i
EGL Rich UI on IBM i: Do you Dojo?
Database performance comparisons on IBM i
Database drivers on the i: MySQL vs. IBM Toolbox
How to: Output SQL script to a text file from an AS/400
Application modernization for the iSeries: Why bother?
JDBCODBC functionality -- Java to Excel for complex workbooks
Necessity leads to iSeries Watchdog development
Accessing AS/400 data using Excel ODBC drivers
Top 10 System i white papers
iSeries Java programming Research

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
WebSphere Development Studio Client (WDSC)  (Search400.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


d you're going to be fine in most cases.

Javascript is another portion of every Web page you're going to write. Why? It's your first line of defense for keeping the data kosher. Every input field on the Web is a nasty text only representative of what it should be. Numbers all are sent as texts, and your job is to put them into the format needed to save in your files. How do we achieve this? First, you can prevent people from entering and pasting numbers into the fields. You do this through small mini local "events," which get fired when people are inputting into a text field. You can do this or you can thoroughly test the data before it is submitted as a form into your pages, it's your choice. Regardless, you're going to become friends with Javascript, and possibly VBScript. Also remember, you have friends that have done this before. Javascriptsource.com is a great location to see exactly what you can do with your pages to make them shine.

Communicating with Web browsers from IBM i
Now we understand the language of the browsers, but what can you do with the IBM i?

Apache: (a play on words with "a-Patchy") is an essential part of serving at least 85% of the Web. You need this component to "talk" to the browsers hitting you. Getting the latest PTF's is highly recommended, as you will receive security patches frequently. Once you get this down, you need to setup your Web server for serving common gateway interface (CGI) programs, where the back end serves data to the Web dynamically.

RPG: RPG has been on the Web from the very beginning when the AS/400 could serve to a browser. We were using programs as examples to play with, called the CGIDEV libraries, and now it's younger cousin, the CGIDEV2 libraries. Both toolsets were written by the Rochester, Minn., IBM team, but then shown to the world by GB Peroti in Italy. Go to Easy400.net and you'll see the results of some amazing programs written in RPG. These programs are living proof that RPG can do more then we've expected. RPG is using "C" API's (advanced programmer interfaces) to read what we webbies call "standard input" and respond with "standard output" (the basic "rhythm" of the Web). Once downloaded, and observed, your CGI programs could be in RPG?!? Bet you never thought that could happen. But it's been a snappy quick way to talk to the Web for over 10 years.

Net.Data: A basic macro language shipped with every iSeries system, and it has been there for over 10 years. Net.Data isn't the swiftest kid out there, but it'll do its share of quick written applications. Why? It's quick to get started: All of the materials are on the CDs delivered with your OS. You can serve dynamic things, get used to it, but I suggest if you start here, you graduate as quickly as you can to other Web tools. Please keep in mind, the IBM i is one of many OSes that have Net.Data available.

PHP: Yes, PHP! Zend technologies now offers a Zend core, PHP runtime, free download for IBM i. Zend's offering actually is now shipped with the i5 OS for free since V5R3, the PASE environment where you actually have a version AIX running (can anyone say Qshell?). This environment runs a parallel copy of Apache to serve PHP pages, and MySQL all from IBM i. The neatest part of this is the HUGE amounts of sample code available to download that you can run right on your i without modifications. This is also a very fast and efficient way to serve on the internet. PHP offers tools you see on mature modern systems, such as PDF creation tools, verifications tools to make sure there's a person on the other side of the browser (you've seen those weird looking graphics you need to type the letters for verification?). All this and more plug-ins and software than you can shake a stick at.

Other: After this, who could ask for more? Well, Java has been a friend on the i that is very robust, enterprise worthy, and you don't need to break the bank to use it. Tomcat is a functional part of Apache, and is included when you install Apache. Tomcat can be configured to serve JSP pages as long as you don't get too fancy. Once you graduate into tougher software, and need more robust tools, graduating into WebSphere isn't a bad thing. WebSphere is a standard, robust toolset to help you get your jobs on the Web done.

So many Web options for IBM i, so little time
We've only spoken about a fraction of the capabilities of what you can do. iSeries Express also offers tools to open up .Net and VB programming, or ASP pages running from a Windows server isn't out of the question. Within each of these toolsets opens up a HUGE world of communications you can do with other web servers all over the world. You can screen scrape Web sites with an AS/400 if you need to in order to get your job done. Now is this Lazy? No, but it opens up a bag of tricks that you can show to people when they ask what you can do with your "i for business."

ABOUT THE AUTHOR: Andrew Borts is Webmaster at United Auto Insurance Group in North Miami, Fla. He is a frequent speaker at COMMON and is past president of The Southern National Users Group, an iSeries-AS/400 user group based in Deerfield Beach, Fla.

Rate this Tip
To rate tips, you must be a member of Search400.com.
Register now to start rating these tips. Log in if you are already a member.




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



iSeries Security - Security Tools, Physical Security and System Security
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts