John Valance presents PHP and web topics to NHMUG

John Valance presented PHP and web topics at the NHMUG meeting on Thursday February 11th, 2016

Connecting the Dots: Building Web Applications with PHP, HTML, CSS, and Javascript

New to web development, or trying to get started? Have you taken a PHP course, but are having trouble understanding how to build complete applications for the web? Or maybe you're a manager trying to get an understanding of how web applications work at a high level. This presentation will provide an overview of how browser-based database applications work, with an IBM i / RPG audience in mind. It will demonstrate the client-side languages - HTML, CSS and JavaScript - and show how PHP scripts running on a server can dynamically build web pages including content from an IBM i DB2 database.

We will discuss the HTTP protocol and how web servers work with HTML and PHP, look at some common formatting techniques in HTML and CSS, demonstrate how HTML forms interact with PHP scripts, and show what JavaScript is and how it makes the browser more functional. With these basics concepts in mind, you should be able to make better decisions about how to sort through the many options available for web-enabling your legacy databases.

This presentation is for beginner to novice web programmers, or those who would like to understand the technologies and languages involved in a typical web application.

This session is a recommended (not mandatory) pre-requisite for John's labs on HTML, PHP, and JavaScript.

Learning Objectives

  • Provide an overview of how browser-based database applications work, with an IBM i / RPG audience in mind
  • Help RPG programmers and managers, with little or no web development experience, understand the major concepts and technologies involved in building web applications.
  • Provide demos and code examples of the major languages involved in typical web applications: HTML, CSS, JavaScript, PHP and SQL
  • Provide a conceptual introduction to my 3 web development labs: 1) HTML and CSS; 2) PHP and DB2 on i; and 3) JavaScript introduction.

Audience

  • This presentation is for beginner to novice web programmers, or those who would like to understand the technologies and languages involved in a typical web application.
  • RPG programmers interested in starting out with web development
  • Managers who would like to understand the major concepts and languages involved in developing web applications on IBM i.

PHP – Beyond the Basics

This presentation will cover some intermediate topics in PHP programming that you can use to go beyond the basics of PHP syntax and SQL selects, enabling you to create some useful business applications. Topics covered will include: logic for paging through large record sets, session management and cookies, easily creating CSV files from DB2 data and streaming them to the browser, and sending email with attachments and HTML formatting using Zend Framework. A basic familiarity with PHP syntax is assumed.

OO and Ahh! The Power of Object Oriented PHP

While PHP allows for both a procedural as well as an object-oriented coding style, today most professional PHP application packages are created using object-oriented techniques. Why? – because this results in code that is more organized, easier to maintain and extend, with fewer bugs. This session will start with a review of PHP functions and data scope – concepts that are fundamental to understanding objects. It will then cover the basics of creating classes and instantiating objects. The concepts will be presented in the context of a real-life example: creating an HTML form input class, which can be used to build an input form for displaying and updating database record contents. We will also extend this class to handle more specialized classes for select and textarea tags.This is an introductory session on OO – – no prior OO experience is required, but a familiarity with PHP syntax and web application development is helpful.

Easy Web Reports and Documents with JODReports

Would you like to be able to provide your users or customers with PDF reports and documents via a web interface? Looking for a low cost or no cost solution, involving minimal programming? JODReports is an open source solution that allows you to define report templates in a word processor supporting the Open Document Text (ODT) standard. You can easily design a document using Open Office Writer, and specify variable fields that can receive data from your IBM i applications. Single page documents such as invoices, order confirmations, statements, work orders, etc., as well as database reports are easily merged with data supplied as XML, and the resulting document can be retrieved as PDF, which can be delivered immediately to a web user to be viewed, printed, saved, or sent as an email attachment. You can also add simple scripting within your document to conditionally display parts of a document based on a test expression, repeat a document portion (e.g. a table row), and more. Setup is simple, and requires a windows server to run OpenOffice as a service, plus a Tomcat web server to run the JODReports jar file, both of which are free and easy to install.

Come to this presentation and learn how to generate PDF reports and documents dynamically, with no licensing costs! In this session we will use a PHP script to call JODReports, but any language that can generate XML and can process an HTTP request/response can make use of this free tool.

Biography

John Valance has worked on the IBM midrange platform since 1983 and on web development since 1998. As a consultant and developer, John specializes in database and web application development on the IBM i platform. He is also a trainer for Zend Technologies, teaching PHP Foundations for IBM i Programmers, and is a Zend Certified Engineer. He has extensive programming experience in RPG, Java, PHP, and JavaScript, and he enjoys explaining new programming concepts to RPG programmers. John is a frequent presenter at user groups, and has created presentations and labs on many web development topics. John is the president and founder of Division 1 Systems, a software and services firm based in Burlington, Vermont (www.div1sys.com).

Growing up in New York City, John started his career in the NY area, but moved to Vermont in 1994 to raise a family and has been there ever since. John is also an accomplished musician, playing a variety of instruments and styles.

John can be reached at This email address is being protected from spambots. You need JavaScript enabled to view it..


 Ted Holt Came to NH!

Ted Holt presented at the NHMUG meeting on Thursday December 3rd, 2015

Easily Modify Report Programs (Because You Have Better Things to Do)

Easily Modified Reports.ppt
Easily Modified Reports a.pdf
Easily Modified Reports b.pdf
Easily Modified Reports c.pdf
Easily Modified Reports d.pdf

No matter how much hardware and software technologies change, some things always stay the same. A prime example is the generation of columnar reports. Whereas columnar reports were once printed on green-bar paper, nowadays they show up in spreadsheets, PDF files, and web browsers.

You have challenging work that needs to be done, so why spend hours making simple modifications to report programs? Let Ted Holt show you how to write report programs that are quickly and easily modified as requirements change.

Programming with Assertions

Assertions.ppt
assert.prototype.rpgle.txt
assert.rpgle.txt

An assertion is a routine that checks the validity of an assumption and stops execution if it finds the assumption to be false. When used during program development and maintenance, assertions save time and effort by pointing out errors. Each problem that an assertion brings to light is a problem you don't have to search for. Assertions also work well in production, where you can use them to cancel programs before errors can occur.

Assertions have long been used in the Unix world. Now they are available in the world of i for business, and Ted Holt shows you how to put them to work for you.. Attend this presentation and add a powerful tool to your programming toolbox.

Fun!(damental) and Fun!(ctional) Table-driven Programming

Table-driven Programming.ppt
Table-driven programming a.pdf
Table-driven programming b example program.pdf
Table-driven programming c example output.pdf

In table-driven programming, a programmer specifies program logic in an array (also known as a table) instead of coding procedural control statements.  In this presentation, Ted Holt begins by contrasting procedural and table-driven programming. Next he walks through an example that demonstrates that table-driven programming can solve problems that procedural programming can’t. Finally Ted illustrates the power of table-driven programming by sharing a utility he developed using table-driven techniques. 

Programmers who attend this session will be exposed to new ideas and techniques that will augment their tool chests.  Managers will be challenged to think of new ways to develop applications that support end users.

Thirty SQL Tips in Sixty Minutes

20 SQL Tips.ppt

SQL is THE data access language. It runs interactively from green screens and System i Navigator. It's in RPG and COBOL programs, in ODBC and JDBC. It's ubiquitous, and it's everywhere, too! You can't know too much about SQL. In this session, Ted Holt presents an assortment of powerful, effective, and easily implemented SQL tips and techniques.

These tips and techniques are based on DB2 for i, but many of them apply equally to other platforms. There's something for everyone, from the SQL novice to the advanced user. Come learn some new techniques and reacquaint yourself with some you may have forgotten.

Biography

Ted Holt is a Senior Software Developer with Profound Logic Software, a provider of modernization solutions for the IBM i world. He has worked within the information technology industry since 1981, primarily with IBM midrange computers. His industry experience includes the fields of manufacturing, healthcare, education, retail, and wholesale. He holds a master's degree in computer science from the University of Southern Mississippi and has taught in community colleges, universities, and vocational/technical schools.

Ted is the author of several books on programming topics, including OpenQuery File Magic!, Complete CL, Power CL, Qshell for iSeries and the MC Press Encyclopedia of Tips, Techniques, and Programming Practices for iSeries and AS/400. He is a regular speaker for the RPG and DB2 Summit and serves as technical editor and writer for Four Hundred Guru, a technical newsletter published by itjungle.com.


 AAron Bartell In NH

Aaron Bartell spoke to the NHMUG user group on Thursday October 1, 2015

Links to presentation materials:

Here are the links to the presentation materials:

Intro to Node.js

Node.js is here. Yep, Javascript on the server side of things. Is this a good thing? That's what we'll be looking to decipher as we walk through the following points at a high level, all the while relating it to the RPG programmer mindset to more easily draw similarities.

In this session we will learn about the following:

  • Why Node.js? We already have Java, PHP, Ruby.
  • How to obtain and install Node.js
  • Make Node talk to your RPG and DB2
  • What's this i/o blocking stuff I hear about Node.js?
  • Javascript syntax - brief intro
  • Javascript callbacks - they're everywhere, but how do they affect your programming in Node?
  • Create a simple "hello world" app without using frameworks.

Node.js, DB2, RPG - Talking at Last

Let’s say you’re considering learning Node.js but know one primary requirement is that existing DB2 tables and RPG business logic must be easily accessible from Node.js. Problem solved, because that’s where IBM's Node.js DB2 for i driver and XMLSERVICE fits in.

The Node.js DB2 for i Connector was provided by IBM and provides capabilities to interact with existing DB2 tables.

XMLSERVICE is a single library of open source RPG code that enables XML scripting calls of IBM i resources using most any language available on your platform.

In this session we will walk through the various features and ways to communicate with existing DB2 tables and RPG programs directly from a Node.js program that is running on the same IBM i! We will also be walking through how to do iterative development using the Node.js REPL capabilities (programming in a real-time response environment) - a great tool and approach for learning how to code in Node.js.

Node.js: Building Your First App With Expressjs

Node.js is a hot topic in IBM i circles because of its recent port. Doing a "Hello World" app in Node.js is very simple, but what about developing something more substantial with full model-view-controller capabilities? This session aims to take you beyond your first pass at Node.js and show how to use one of the most popular Node.js web frameworks, Express.js.

In this session we will learn about the following:

  • Installing ExpressJs with npm (Node Package Manager)
  • Model: DB2 for i access
  • View: Template Engines and how to use them
  • Controller: Routing requests
  • Implement web sockets to make the app insanely interactive

Git on IBM i

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Git is easy to learn and has a tiny footprint with lightning fast performance. It outclasses SCM tools like Subversion, CVS, Perforce, and ClearCase with its feature set. It is arguably the most popular way to manage source code versions industry wide.

Some things to know about Git:

  • It keeps a history of everything that has changed in a source file
  • You can group changes together so you can gain perspective of what all changed for a particular feature request
  • You can create branches which have many purposes with one being you can eliminate the need to make backup copies of source members before making your changes. We often make backups so we can see how it originally was. Branches also make it easy to quickly test something and throw it away if it didn't work out without affecting the primary code base.
  • Another feature of branches is to facilitate process flow (i.e. branches for development, test, staging, production)
  • Git has some very excellent merging capabilities which is nice for when two developers were working on the same source member and their changes need to be combined back into one

Here's the kicker… did you know you can use Git on IBM i? Did you know you can use it for all your source including RPG?

Attend this session for an introduction to Git, install instructions, how it works, basic features, and how it can be used in your environment.

Biography

Aaron Bartell provides hands-on application development services using open source technologies for companies running on IBM i. Through virtual consulting engagements, Aaron is able to jump-start development initiatives while serving as an extension of your internal development team. Aaron facilitates adoption of open source technologies through internal staff training, speaking engagements at conferences, and the authoring of best practices within IBM i industry publications and www.litmis.com. As Director of IBM i Innovation for Krengeltech, Aaron pursues initiatives which enable IBM i shops to embrace today’s leading technologies including Ruby on Rails, Node.js, and Git to facilitate GitHub/BitBucket communications. Aaron is a passionate advocate of modern technologies and active within their corresponding online communities. Connect with Aaron via email at This email address is being protected from spambots. You need JavaScript enabled to view it.

Aaron lives with his wife and five children in Southern Minnesota. He enjoys the vast amounts of laughter having a young family brings, along with camping and music. He believes there's no greater purpose than to give of our life and time to help others.


27th Annual New Hampshire / Vermont IBM i User Group Meeting

Tuesday, June 23, 2015 - Fireside Inn, West Lebanon NH

This event was free to IBM i professionals, and sponsored by NHMUG and VTMUG

IBM Announcements - Steve Fier, IBM

IBM has made some exciting new enhancements to the POWER family. POWER8 low-end I/O enhancements will be coming. Also, there will be new and additional functionality for both IBM 7.1 and 7.2 Steve Fier will review these latest updates.

Security Topics - Robin Tatam, CISM CBCA,PowerTech | A Division of HelpSystems

Part 1 - Security by Obscurity - Insight into a Failed Approach

PowerTech has audited thousands of IBM i servers over the past 12 years, gaining extensive, real-world insight into the deployment state of IBM i security controls.

The results of this wildly popular study, The State of IBM i Security, have revealed vulnerabilities that even auditors miss—providing invaluable insight in six configuration categories:

  • Network-initiated commands & data access
  • Server-level security controls
  • Profile and password settings
  • Administrative capabilities
  • Public accessibility to corporate data
  • System event auditing

Robin Tatam, analyst and author of the study for the past 6 years presents his personal insight into the shocking - and often scary - reality behind IBM i security.

Part 2 - Getting Started with IBM i Security

The IBM i operating system is lauded as one of the most secure available. But, as previously discussed, reaching this state requires many changes to system settings. Its time to take a critical step toward protecting your corporate data assets - regardless of regulatory compliance.

This session, hosted by certified auditor and renowned IBM i expert Robin Tatam, will teach you how to achieve better security through increased awareness of important considerations, including:

  • What controls security configuration?
  • Who has administrative privileges?
  • How to do event auditing for free?
  • What are “black hole” commands?
  • What the heck is public versus private authority?
  • How do users accomplish scary things?

Security and regulatory compliance, although not the same thing, are in the forefront of virtually every CIO's mind. Make sure that you are adequately prepared when the bad guys come knocking!

Robin joined HelpSystems' PowerTech division in 2009 extending an AS/400 and IBM i consulting career that extends more than a quarter century. He has consulted with domestic and international clients on security and compliance issues.

Application Modernization - David Andruchuk - CSDA, Inc

The Why and How of the iModerinze(d) Application Architecture

For most IBM i shops, an ongoing initiative is to take advantage of the new offerings IBM has made to the IBM i hardware and software that has defined and set our platform apart from competitors. The process of converting your non data centric architecture to a data centric architecture can appear to be beyond the reach of many IT staffs.

While the performance gains of modernizing can be easily quantified, the added benefit of flexibility often goes unheralded. Being able to provide faster response to constantly changing business requirements and ever increasing large data demands placed on our environments can be achieved without having to recompile your current programs.

Adapting your database access and software development practices is as much a necessity as changing your business to constantly changing market requirements and security concerns we are now required to comply with.

In this session we will discuss:

  • The process of converting your DDS defined PF and LFs to DDL defined tables, views and indexes
  • Taking advantage of the scalability and flexibility gains offered by modern technologies, both in hardware and in software engineering
  • Adopting the use of views and stored procedures to gain separation between your data model and your programs
  • Designing your system to become easier to implement your web based or graphical UI layer
  • Adding encryption to your table columns using DB2 Field Procedures