25
Thu, Apr
0 New Articles

What Web 2.0 Development Skills Should an i Programmer Have?

Web Languages
Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

Are you keeping up? Do you even know where to start?

 

Remember when being a triple threat meant RPG-DDS-CL? No more, my friends. Now you need a set of Web-oriented skills to impress people. The problem is, there are so many to choose from. I mean seriously, have you seen the list of Web languages/apps that are out there? So the question becomes, what should your starting point be? What skills are most important to an i professional like you?

Modular Programming

Most RPGers are oriented around the "big program" design philosophy: find out what the driver file is going to be for the program you're building and then add in the edits necessary to create one big program. It might be a monster or it might be a reasonable size, but it's still a single program that contains everything (edit logic, display logic, control logic).

 

The reason for that is relatively simple: RPG has historically been unable to easily (efficiently) call other programs, making it sensible to do things with one program.

 

But ILE—and especially /Free—makes it not only easy but appropriate to create an application with multiple modules. This allows you to write bite-sized modules that are easy to understand and modify while giving you the ability to use the language that is most suited to the task: PHP for displaying the pages, RPG for edits and logic, stored SQL procedures for data access, etc.

 

It's definitely a new way of thinking about things, but it's one that you can easily learn. As you approach a task, think about it from a Model-View-Controller (MVC) point of view. What elements are the model, the actual logic that needs to be executed to do this (edits, etc.)? What elements are the controller: how will you move from one screen to another, what function keys are involved, how does everything relate to everything else? What elements are the view: what pages need to be built, and what kinds of data will be entered or displayed?

 

Once you have everything broken apart by type, you can start creating your programs using the most appropriate language.

 

Related to this is the use of frameworks, special development environments oriented around a given language that allow you to quickly build an application by using existing components. For example, with PHP you have the Zend framework (and a number of others) that can be downloaded for free. This is something we on the RPG side have resisted. Build programs by using common modules? I don't think so. But other languages and ways of thinking have adopted it heartily.

Web-Oriented Design

Generally, when we talk about design in the RPG world, we're talking about the following scenario. Meet with the users (or get an email from them), respond with a design napkin (or send an email back), begin programming, talk to the users when something happens and we don't know what to do about it, demo the application just before moving it to production, and spend the next few months/years modifying the app so that everyone is happy with it. At the end, there are a dozen or so mods listed at the front of the program, and more commented code than unmarked lines.

 

Web design, done properly, is much more interactive. First, it should take advantage of a scrum project-management style. We often think of scrum as something you use if you have a project team, and most RPG projects are just one lonely programmer working away trying to satisfy a herd of impossible-to-please users. But the essence of scrum is quick iterations separated by a full user review. And that's what we want to get into because even a single programmer can use it. Modular programming assists this, of course, because it allows you to create stub programs so that the app can be demoed almost from day 1. You then keep adding detail to the stubs until your application is all growed up.

 

And since you have had continued interaction with your users, each time giving them something they could see and play with, chances are you will be much closer to the target than you would be otherwise. And if you're not, since the users have had hands-on usage right from the start, it's very apparent that the problem is more them than you, and let's face it, that's what's really important. Users are like siblings. Even if you love them, it's still fun when Mom or Dad catches them doing something.

HTML5

OK, on to actual technical skills. And the first one you need is HTML. HTML is a markup language, which means it's not used for logic or if-then garbage or anything except for defining what a Web page should look like. You want to think of it more like the weird markings you used to be able to get in MS Word when you selected "show formatting" for the document.

 

There are several versions of HTML. The first is like HTML 1.0 to 3.0 or something like that. To be honest, I sort of forget. That's old HTML, and it was somewhat limited. Today, many of its functions are done by Cascading Style Sheets (CSS) or have been eliminated totally, but the basics are still there. The second is XHTML. This is a form of HTML based on XML that was supposed to be the future of HTML until a bunch of the people who had to implement it rebelled. They developed the third flavor, which is called HTML5 ,and after a hard-fought battle where there was plenty of gouging and choking, HTML5 has emerged victorious.

 

HTML5 has a ton of really cool features. There's just one problem: HTML5 can have all of the features it wants, but they won't work unless the browser you use to view the page supports those features. At the current time, all browsers are working hard to incorporate the features that HTML5 supplies.

 

The bottom line is that if you use HTML5 on a browser that doesn't support all of it features, the page will still work. It might not be as pretty as it could be, but it will work. So, when you're looking at learning HTML, don't bother with old HTML (like if you have an old book on HTML), just learn HTML5.

 

And you don't need to know everything. Start with the basics: the markup for the document, header, body, divisions, paragraphs, headers. Of particular importance are using the class and ID because much of CSS uses these tags to point to when applying attributes. Much of what you want to do to make it look nice will be done with CSS rather than HTML5 per se.

CSS

In the olden days, everything was done with HTML: colors, formatting, font size, etc. But today, HTML is used mostly to set up the organization of the page, while CSS are used to make it pretty. The general rule of thumb is that content (the actual words you want to appear on the page) should go in the HTML, and the formatting (how it looks) is done via the CSS.

 

Most good books on HTML also have sections on CSS (CSS3 is the latest version of that) because the two are so closely related. I won't talk about it too much here, but every Web page should have its own style sheet that carries all of the CSS3 formatting information. The important thing to remember is that most CSS3 formats will be applied using a class or ID selector, so it will be important to use those appropriately in your HTML5.

JavaScript/jQuery

This is a relatively new entry into the skill set competition. JavaScript is a language that works with HTML (like CSS3 does) and allows you to do some cool things that you could do with CSS3. JavaScript is the base language, and jQuery is a library of JavaScript subroutines that can be easily used in your Web page.

Why not just use CSS3 and bypass this step? The main reason is that the amount of CSS3 support that you will get depends on the browser that the page is rendered (shown) in. That's because different browsers vary in terms of the amount of new CSS3 features they support. But JavaScript is a language that you pull into your Web page (using a style reference). Hence, the support you get there is the same no matter what browser you're using. It's a safer way of doing things, so even though it's one more language to learn, it does help provide a more consistent user interface.

 

An easy way to start is to learn jQuery. That will let you do tons of stuff, but it's a smaller subset of functions than full JavaScript.

SQL

I am in general not in favor of replacing your current DDS-based files and calls with DB2 tables and SQL functions. For 99 percent of database access, there's just no point. Yeah, it's cool and all and some people think it's the only way to go, but like I said, most of the time it's just not worth the effort.

 

At the same time, SQL is becoming more and more commonplace, especially in the Web world, and many platforms now have support for DB2 SQL access (like Zend's new DBi product). So I guess you have to learn SQL. There are enough SQL books out there that you should be able to do so. Just don't go crazy. Use it when you have to, but if you can use good old DDS, don't feel bad. But you might want to get connected with an SQL forum for really weird things, because really weird things seem to happen with SQL.

PHP or CGIDEV

Finally, you have the choice of PHP or CGIDEV to build your Web pages. That is, you create a Web page out of HTML and CCS and jQuery (or hard-core JavaScript), but PHP or CGIDEV will be the language that you actually use to display that page. That is, you need something that will interface with RPG to show your Web page, and HTML does not.

 

You seriously don't need to know both. The question is, which should you use? Dude, do you expect me to tell you everything? OK, I will. It's actually an emotional decision. I was listening to a Webinar once with Jon Paris and Paul Touhy discussing this (which to use), and one favored one and one the other. I don't really remember which way it went, but what I do remember is they almost got into a fist fight over it. And this was an audio-only Webinar, and they're very good friends! Like I said, it's a very emotional issue. I chose PHP because it's a valid Web language and I thought it was cool to know a Web language. Chicks dig it, and that's important to me. Both work well. CGIDEV is more RPG-oriented; it's a series of APIs that can be called from within an RPG program. With CGIDEV, you'll use primarily RPG, but to be honest the learning curve for both is pretty similar. And PHP has some awesome array functionality in it. Plus, PHP can be written as procedural (like RPG), but it also incorporates classes and OO functionality, so it's a great way to get your feet wet with the whole OO scene. Bottom line? It's up to you. I honestly don't care.

Summary

And that's it. There's lots more you can learn, but that will get you started. Excited? Nervous? Terrified? Yeah, I can dig it. It seems like a lot, and you already know a great deal about RPG-DDS-CL. In some ways, it doesn't seem fair. But who said fairness had anything to do with it, eh, pal? The real question is: Do you want to be cool? Or do you want to be like you are now? Up to you. Slick.

 

 

David Shirey

David Shirey is president of Shirey Consulting Services, providing technical and business consulting services for the IBM i world. Among the services provided are IBM i technical support, including application design and programming services, ERP installation and support, and EDI setup and maintenance. With experience in a wide range of industries (food and beverage to electronics to hard manufacturing to drugs--the legal kind--to medical devices to fulfillment houses) and a wide range of business sizes served (from very large, like Fresh Express, to much smaller, like Labconco), SCS has the knowledge and experience to assist with your technical or business issues. You may contact Dave by email at This email address is being protected from spambots. You need JavaScript enabled to view it. or by phone at (616) 304-2466.


MC Press books written by David Shirey available now on the MC Press Bookstore.

21st Century RPG: /Free, ILE, and MVC 21st Century RPG: /Free, ILE, and MVC
Boost your productivity, modernize your applications, and upgrade your skills with these powerful coding methods.
List Price $69.95

Now On Sale

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$0.00 Raised:
$

Book Reviews

Resource Center

  • SB Profound WC 5536 Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application. You can find Part 1 here. In Part 2 of our free Node.js Webinar Series, Brian May teaches you the different tooling options available for writing code, debugging, and using Git for version control. Brian will briefly discuss the different tools available, and demonstrate his preferred setup for Node development on IBM i or any platform. Attend this webinar to learn:

  • SB Profound WP 5539More than ever, there is a demand for IT to deliver innovation. Your IBM i has been an essential part of your business operations for years. However, your organization may struggle to maintain the current system and implement new projects. The thousands of customers we've worked with and surveyed state that expectations regarding the digital footprint and vision of the company are not aligned with the current IT environment.

  • SB HelpSystems ROBOT Generic IBM announced the E1080 servers using the latest Power10 processor in September 2021. The most powerful processor from IBM to date, Power10 is designed to handle the demands of doing business in today’s high-tech atmosphere, including running cloud applications, supporting big data, and managing AI workloads. But what does Power10 mean for your data center? In this recorded webinar, IBMers Dan Sundt and Dylan Boday join IBM Power Champion Tom Huntington for a discussion on why Power10 technology is the right strategic investment if you run IBM i, AIX, or Linux. In this action-packed hour, Tom will share trends from the IBM i and AIX user communities while Dan and Dylan dive into the tech specs for key hardware, including:

  • Magic MarkTRY the one package that solves all your document design and printing challenges on all your platforms. Produce bar code labels, electronic forms, ad hoc reports, and RFID tags – without programming! MarkMagic is the only document design and print solution that combines report writing, WYSIWYG label and forms design, and conditional printing in one integrated product. Make sure your data survives when catastrophe hits. Request your trial now!  Request Now.

  • SB HelpSystems ROBOT GenericForms of ransomware has been around for over 30 years, and with more and more organizations suffering attacks each year, it continues to endure. What has made ransomware such a durable threat and what is the best way to combat it? In order to prevent ransomware, organizations must first understand how it works.

  • SB HelpSystems ROBOT GenericIT security is a top priority for businesses around the world, but most IBM i pros don’t know where to begin—and most cybersecurity experts don’t know IBM i. In this session, Robin Tatam explores the business impact of lax IBM i security, the top vulnerabilities putting IBM i at risk, and the steps you can take to protect your organization. If you’re looking to avoid unexpected downtime or corrupted data, you don’t want to miss this session.

  • SB HelpSystems ROBOT GenericCan you trust all of your users all of the time? A typical end user receives 16 malicious emails each month, but only 17 percent of these phishing campaigns are reported to IT. Once an attack is underway, most organizations won’t discover the breach until six months later. A staggering amount of damage can occur in that time. Despite these risks, 93 percent of organizations are leaving their IBM i systems vulnerable to cybercrime. In this on-demand webinar, IBM i security experts Robin Tatam and Sandi Moore will reveal:

  • FORTRA Disaster protection is vital to every business. Yet, it often consists of patched together procedures that are prone to error. From automatic backups to data encryption to media management, Robot automates the routine (yet often complex) tasks of iSeries backup and recovery, saving you time and money and making the process safer and more reliable. Automate your backups with the Robot Backup and Recovery Solution. Key features include:

  • FORTRAManaging messages on your IBM i can be more than a full-time job if you have to do it manually. Messages need a response and resources must be monitored—often over multiple systems and across platforms. How can you be sure you won’t miss important system events? Automate your message center with the Robot Message Management Solution. Key features include:

  • FORTRAThe thought of printing, distributing, and storing iSeries reports manually may reduce you to tears. Paper and labor costs associated with report generation can spiral out of control. Mountains of paper threaten to swamp your files. Robot automates report bursting, distribution, bundling, and archiving, and offers secure, selective online report viewing. Manage your reports with the Robot Report Management Solution. Key features include:

  • FORTRAFor over 30 years, Robot has been a leader in systems management for IBM i. With batch job creation and scheduling at its core, the Robot Job Scheduling Solution reduces the opportunity for human error and helps you maintain service levels, automating even the biggest, most complex runbooks. Manage your job schedule with the Robot Job Scheduling Solution. Key features include:

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • LANSAWhen it comes to creating your business applications, there are hundreds of coding platforms and programming languages to choose from. These options range from very complex traditional programming languages to Low-Code platforms where sometimes no traditional coding experience is needed. Download our whitepaper, The Power of Writing Code in a Low-Code Solution, and:

  • LANSASupply Chain is becoming increasingly complex and unpredictable. From raw materials for manufacturing to food supply chains, the journey from source to production to delivery to consumers is marred with inefficiencies, manual processes, shortages, recalls, counterfeits, and scandals. In this webinar, we discuss how:

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • Profound Logic Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application.

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: