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

Audience

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..