Sessions - PHP

2019 Sessions will include:

  • PHP Tricks for RPG’ers: Graphics, Excel, PDFs, E-Mail and More 
  • PHP and Db2 Essentials 
  • PHP – Beyond the Basics 
  • OO and Ahh! The Power of Object Oriented PHP 
  • Zend Studio Tips and Techniques 
  • PHP Arrays for the RPG Programmer – (Intermediate) 
  • 30 PHP tips on IBM i in 60 Minutes (All levels) 
  • Exploring Db2 Data Access in PHP (Beginner) 
  • PHP and RPG Integration Examples (All levels)

PHP Tricks for RPG’ers: Graphics, Excel, PDFs, E-Mail and More (Alan Seiden)

Ever want to enhance RPG programs with PDFs, spreadsheets, charts and graphics, or connect to web services, without complicating your RPG program? Help is here from PHP and Db2. PHP not only builds websites, but it can be called by RPG programs. Alan will show how to accomplish marvelous tasks by calling PHP from ordinary RPG programs via Db2’s web service support, a fast, flexible technique that’s a handy trick in itself.

Examples will include:
Creating graphs and charts based on Db2 data
Excel spreadsheets from your data
PDF files from your data
Connecting to external JSON-based web services while keeping the RPG simple
Send flexible email messages, including HTML format and attachments, and using any SMTP server, including an Exchange server

You will come away brimming with ideas to add pizzazz to your applications.

Learning Objectives
1.How to use SQL to call a web service, including a simple PHP-based web service
2.How RPG can use SQL to call the web service
3.Put it together: RPG calls PHP via a web service, creating graphical output from RPG in a simple manner

PHP and Db2 Essentials (Alan Seiden)

Db2 is the heart of IBM i. For PHP applications, the Db2 database provides performance, data integrity, remote connectivity, and security. This session will show the right way to use Db2 with PHP. Topics include: NEW features of Db2 and ibm_db2 that can make life easier for developers, performance tips, prevention of SQL injection, library list options, and how to connect IBM i’s Db2 from Windows and Linux.

Learning Objectives
1.Understand how to get the best performance from Db2 with PHP on IBM i
2.Take steps to secure applications by using parameter markers (prepared statements)
3.Learn about new features that help performance and stability
4.Make the right choices when configuring your application for library lists and more

PHP – Beyond the Basics (John Valance)

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 (John Valance)

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, syntax, and terminology will be introduced using a very simple Person class, and an application that makes use of this class. We will cover constructors and other magic methods, public vs. private visibility, setter and getter methods, the "$this" object, error handling, exceptions and try/catch blocks. After covering all the basics, we'll step it up a notch and present a more realistic example: creating an HTML form input class, which can be used to build an input form for displaying and updating database record contents. 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.

Zend Studio Tips and Techniques (John Valance)

If you're new to using Zend Studio, or if you haven't yet had training in using this tool, you may not be aware of many of its features, some of which can save you a lot of time and frustration. Zend Studio is the PHP editor provided free to IBM i customers with a full year of free support and upgrades. Using a live version of Zend Studio, we will cover some basic concepts of the IDE and demonstrate my favorite features and techniques. I will discuss perspectives and contrast the Remote System Explorer with the PHP Perspective, and demonstrate some of the advantages of the PHP perspective for developing larger projects. We'll also cover editing shortcut keys, creating templates, using filters, and more.

PHP Arrays for the RPG Programmer – (Intermediate) (Mike Pavlak)

Until recently, RPG has neglected the sophistication of elegant array processing while PHP has supported the use of arrays since its inception. This session examines why array processing is so important and how many of the over 70 array functions relate to RPG operation codes and built-in functions. Participants will see how arrays are used to pass parameters between functions and programs, as well as how arrays can be used to supplant nearly all of the purposes data structures serve in RPG. This intermediate level session is important for the RPG programmer exploring PHP for production purposes.

30 PHP tips on IBM i in 60 Minutes (All levels) (Mike Pavlak)

Inspired by longtime presenters at the Summit, this discussion looks at the most popular tweaks, hacks and just plain good practices the for IBM i PHP community to enjoy. Sometimes you just need a shopping list of things to watch out for and many of the tips that are scattered throughout these presentations are consolidated in a single place. Performance, security and best practices and more will be discussed.

Learning Objectives:
1) Many key points of PHP will be explored
2) Performance tips will be reviewed
3) Common mistakes to overcome in PHP development

Exploring Db2 Data Access in PHP (Beginner) Mike Pavlak

The Db2 extension built in to PHP is a curious beast and works well right out of the gate. But could there be more to look at? In this presentation we explore the basics of the Db2 connection and review examples of how to manipulate library lists. In addition, we’ll explore concepts of standard connect & persistent connections and review when it’s best to use each. Also, an exploration of performance optimization techniques and recent changes will be reviewed.

Learning Objectives:
1) Learn basics of Db2 data access in PHP.
2) Cover all aspects of the Library List usage in PHP
3) Explore many key features of PHP and IBM i.

PHP and RPG Integration Examples (All levels) (Mike Pavlak)

In this session we will explore several examples of how PHP scripts can use the Open Source Toolkit to access RPG Business Logic. Implementation of the toolkit will be reviewed along with examples of simple RPG program calls, RPG Subprocedure calls, complex interfaces like data structures and more.