• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Integrating PHP With System-i using Web Services
 

Integrating PHP With System-i using Web Services

on

  • 12,025 views

Presentation about Web Services in PHP for IBM System-i users. Sam Pinkhasov (Zend) did most of the presentation, I did the general part on PHP (first 9 slides). Presentation was done at the IBM ...

Presentation about Web Services in PHP for IBM System-i users. Sam Pinkhasov (Zend) did most of the presentation, I did the general part on PHP (first 9 slides). Presentation was done at the IBM Future Proof event in Eindhoven (june 5th, 2007)

Statistics

Views

Total Views
12,025
Views on SlideShare
11,092
Embed Views
933

Actions

Likes
7
Downloads
368
Comments
1

33 Embeds 933

http://as400blog.blogspot.com 689
http://as400blog.blogspot.in 35
http://as400blog.blogspot.co.uk 21
http://www.slideshare.net 19
http://as400blog.blogspot.de 17
http://as400blog.blogspot.ca 17
http://as400blog.blogspot.it 16
http://as400blog.blogspot.com.es 13
http://as400blog.blogspot.cz 12
http://as400blog.blogspot.fr 11
http://as400blog.blogspot.com.au 9
http://as400blog.blogspot.jp 8
http://as400blog.blogspot.nl 7
http://as400blog.blogspot.co.il 7
http://as400blog.blogspot.mx 7
http://as400blog.blogspot.com.ar 6
http://as400blog.blogspot.pt 5
http://translate.googleusercontent.com 5
http://onwebdev.blogspot.com 4
http://as400blog.blogspot.sg 4
http://as400blog.blogspot.co.nz 3
http://as400blog.blogspot.hk 3
http://as400blog.blogspot.ch 2
http://as400blog.blogspot.dk 2
http://www.techgig.com 2
http://as400blog.blogspot.tw 2
http://as400blog.blogspot.hu 1
http://as400blog.blogspot.co.at 1
http://as400blog.blogspot.se 1
http://10.150.200.57 1
http://74.6.238.254 1
http://www.as400blog.blogspot.com 1
http://as400blog.blogspot.com.br 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

11 of 1 previous next

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • As a management instructor I appreciate viewing the work of others. This is one of the best demonstration on planning I've viewed.
    Teisha
    http://dashinghealth.com http://healthimplants.com
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Integrating PHP With System-i using Web Services Integrating PHP With System-i using Web Services Presentation Transcript

    • June, 2007 Integrating PHP with System i using Web Services Sam Pinkhasov Ivo Jansch
    • Agenda • PHP overview • PHP products for i5/OS • How to create a Web Service wrapper for an RPG program • Q&A #2
    • What is PHP? • PHP is an easy to use, open source, platform independent scripting language  Designed for web application development  4.5+ Million PHP Developers • PHP is the leading scripting language deployed on the Internet  22+ Million Internet domains  Out Pacing Microsoft’s ASP* • Thousands of PHP applications are available www.sourceforge.org  Web applications tied to databases  www.hotscripts.com, Content management  Wikis and Blogs www.phpjunkyard.com/ www.phpfreaks.com/ www.phpfreebies.com/ * Source: 2005 Netcraft Survey http://www.php.net/usage.php #3
    • Drivers for PHP growth • The Migration to Web Applications  When did you last install a desktop application?  Emerging generation of software services (Web2.0)  Web becoming the new UI to existing backend applications • PHP is the perfect Web Integration Platform  Perfect front-end glue language  Best support for browser based rich client applications (Ajax)  Strong support for Web Services, XML & legacy systems  Powerful SOA capabilities enable new IT approaches (“mashable assets”) for reducing application backlogs • PHP is backed by a very strong community  Very easy to learn and adopt  ~ 1000 committers, ~ 4.5M developers (corporate/community)  Thousands of opensource projects and applications  Hundreds of thousands of commercial deployments #4
    • How does PHP work? 1. Browser requests a Web page (HTML) from the Web server. 2. The user enters data or performs an action. 3. The browser sends a request for a PHP file to the Web server. 4. The Web server forwards the PHP file to the PHP engine 5. The PHP engine processes the PHP code, optionally accessing server resources (such as a database) or performing calculations. 6. The PHP engine replaces the PHP code with the results of its processing 7. The result (all HTML code) is sent to the Web server. 8. The Web server sends the result as a response to the browser 9. The browser loads the response code. #5
    • PHP Example Original HTML HTML Processed by PHP Engine <html> <html> <head><title>Test page></title></head> <head><title>Test Page</title></head> <p> <p> PHP Code <?php This is my php test page echo “This is my PHP test page” ?> </p> </p> </html> </html> #6
    • Why use PHP? • Easy to learn with a large support community • Most popular server side language on the Web • Thousands of free PHP applications are available • Fairly lightweight runtime environment  Easy to administer (Zend provides tools) • Provides many extensions for particular programming tasks  Database APIs (DB2, MySQL, Oracle, SQLServer, etc.)  i5 PHP Toolkit (only available with Zend Core or Zend Platform)  XML  PDF  Cryptography  Web services #7
    • Why Do Developers Use PHP? Zend's June 2003 market snapshot of the PHP community. The survey had over 10,000 respondents. http://www.zend.com/zend/php_survey_results.php #8
    • What Types of Applications in PHP? Zend's June 2003 market snapshot of the PHP community. The survey had over 10,000 respondents. http://www.zend.com/zend/php_survey_results.php #9
    • Zend Technologies • The founders of Zend have been key contributors to the PHP language since 1997 • Zend delivers commercial products that enable developers and IT personnel to deliver and operate business-critical PHP applications  Zend has been the leading supplier of PHP products and solutions for the last six years. Its products and solutions are being used by more than 15,000 companies worldwide. The Zend Engine (the PHP kernel) is being utilized on more than 22 million websites today  Zend takes the open source PHP code through rigorous testing for additional quality assurance and adds over 35 popular PHP extensions to deliver their PHP runtime environment • Zend provides enterprise level support for the PHP environment # 10
    • What are System i Customer’s Doing with PHP? – Consolidation: Move PHP applications that are running on Windows or Linux that access data in DB2 to run in i5/OS to speed up or reduce complexity of the applications. – Modernization: Use PHP to web-enable green screen applications. – New application development: Create new applications with PHP on i5/OS including applications for the intranet, reporting, websites, and extranets. – Leveraging PHP portfolio: Run commercial or opensource PHP applications on i5/OS. # 11
    • Market – Products • Zend Core for i5/OS (Free) A fully tested and enhanced version of the open source PHP runtime environement. • Zend Studio for i5/OS (Free) Provides an integrated IDE for building and debugging PHP applications • Zend Support (Free & Chargeable) Free web-based support and chargeable premium support • Zend Platform for i5/OS (Chargeable) A robust PHP production environment providing performance, scalability, and monitoring for PHP applications • Zend Guard (Chargeable) Provides code protection and license mgmt tools for solution providers • Services (Chargeable): Training and Pro Service # 12
    • Zend Core TM Certified and Supported PHP + Database Integration
    • Zend Core for i5/OS • Zend Core is a distribution of PHP maintained through a partnership between IBM and Zend  Native DB2/400 UDB/Cloudscape support  Toolkit - Native access System i objects : • Programs, Service programs(*SRVPGM) and CL commands • Spooled file, Data Queue, User Space, Job logs  WebEnabler Technology  Zend Studio Server for remote debugging  Everything you need to get started • You can download Zend Core for free  Contains everything you need to start building applications (Apache web server, PHP 5.x.x and most common extensions) # 14
    • PHP Environment After Installation System i5 i5/OS URL: PASE http://myproxy:89/core/registration.php I5/OS Request HTTP:89 HTTP:8000 resources Server Server (Reverse Proxy) Response PHP Module HTML + PHP Zend Core DB2 UDB Zend Platform # 15
    • Zend Core: DEMO # 16
    • i5 Toolkit APIs • Are shipped with Zend products  Zend core for i5/OS • Geared towards accessing i5 data and resources from PHP  Similar in purpose to the IBM Tookbox for Java # 17
    • i5 Toolkit APIs • Native file access • Data retrieval • Connection management  i5_open i5_connect  i5_fetch_array  i5_addnew i5_close  i5_fetch_assoc i5_adopt_authority  I5_edit  i5_fetch_object i5_error  I5_delete  i5_fetch_row i5_errno  i5_cancel_edit  i5_info i5_errormsg  i5_setvalue  i5_field_len  i5_update  i5_field_name • Command calls  i5_range_from  i5_field_scale i5_command  i5_range_to  i5_field_type  i5_range_clear  i5_list_fields • Program calls  i5_data_seek  i5_num_fields i5_program_prepare  i5_seek i5_program_prepare_PCML  i5_result  i5_bookmark i5_program_call i5_program_close  i5_free_file  i5_new_record  i5_update_record  i5_get_keys # 18
    • i5 Toolkit APIs • System values • Job logs • User space i5_get_system_value i5_jobLog_list i5_userspace_crearte i5_jobLog_list_read i5_userspace_prepare • Data areas i5_jobLog_list_close i5_userspace_get i5_data_area_prepare i5_userspace_put • Active jobs i5_data_area_receive • Data Queue i5_data_area_send i5_job_list i5_data_area_close i5_job_list_read i5_dtaq_prepare i5_job_list_close i5_dtaq_recieve •Print/Get spooled file i5_dtaq_send • Objects list i5_dtaq-close i5_spool_list i5_object_list i5_spool_list_read i5_object_list_read i5_spool_list_close i5_object_list_close i5_spool_get_data i5_spool_from_file # 19
    • Demo Application – WRKACTJOB # 20
    • Demo Application – WRKSPLF # 21
    • Demo Application – WRKUSRPF # 22
    • PHP DEVELOPMENT ENVIRONMENTS The Most Complete Development Environment for PHP
    • Zend Studio Professional for i5/OS • Special, freely-available version for i5/OS servers • The most productive development environment for PHP  Highly advanced PHP editor  Client/Server debugging & profiling  Database integration  Fully supports PHP 5 and the latest technologies  Runs on Windows, Linux, MAC  Tightly integrated with the Zend product line # 24
    • Zend Studio DEMO # 25
    • Zend Studio for i5/OS System Requirements Supported Operating Systems, Platforms and OS versions:  Windows x86 2000, XP, 2003  Linux x86  Linux x86-64  Mac OS X Power 10.4 • Zend Studio Client - PHP Compatibility: Supports all PHP versions # 26
    • Zend Platform Complete Web Production Management
    • Zend Platform for i5/OS Complete Web Production Management Performance Scalability & Reliability Integration  Central Hub-and-Spoke  Proactive Monitoring, PHP  Run-time Code Management Intelligence Optimization   Event Consolidation Run-time Profiling and  Code Acceleration and  Performance Monitoring Centralized PHP Pre-Compilation Configuration  Report and Track Run-time  Full Caching Solution  Job Queues Issues  Download Optimization   Java Bridge Audit trail (Error Re-creation and Acceleration and Full Problem Context  Business Intelligence &  Benchmarking and Insight  Reporting Tools (BIRT) Online Debugging Validation  Web-based Management  Performance Tuning # 28
    • PHP Production Environment Stack # 29
    • Reliability - PHP Intelligence Fix Errors Immediately - Ensures full business availability Integration with Zend Studio provides direct access to the affected source code - Immediate Debugging & Profiling enables code problems to be identified and fixed within seconds # 30
    • Integration - Java Bridge Java Bridge – Easy Integration  Integrating with Java is as simple as instantiating the object, and using it  Java objects are mapped to PHP objects <? $system = new Java(quot;java.lang.Systemquot;); print $system.quot;nquot;; // will use toString in PHP5 print quot;Java version=quot;.$system->getProperty(quot;java.versionquot;).quot; <br>nquot;; print quot;Java vendor=quot;.$system->getProperty(quot;java.vendorquot;).quot; <p>nnquot;; print quot;OS=quot;.$system->getProperty(quot;os.namequot;).quot; quot;. $system->getProperty(quot;os.versionquot;).quot; on quot;. $system->getProperty(quot;os.archquot;).quot; <br>nquot;; ?> # 31
    • Integration - BIRT Reporting Reporting Framework Integration • Create graphical reports using Actuate API through PHP • Based on the Eclipse Open Source Business Intelligence Reporting and Tools (BIRT) project # 32
    • Zend Guard
    • Zend Guard for i5/OS • Encoding & Obfuscation  Enables the PHP source code protection, against copyright infringement and reverse-engineering, of commercial PHP applications  Provides IT Managers with a solution that prohibits modification of their internal PHP application source code so they can effectively support them • Licensing  Allows ISVs to impose a variety of licensing policies on commercial PHP applications  Vendors can increase their revenue by choosing from a variety of licensing models such as concurrent users, time limited, segment of network, server specific or i5/OS processing group • Product Components  Front End GUI  Encoder CLI  Zend Optimizer # 34
    • Zend Guard for i5/OS # 35
    • Zend PHP Components for i5/OS Windows/Linux System i Browser Zend Studio Apache Zend Guard webserver Pgm, CMD, Spooled file Business Zend Core with Database Toolkit APIs Zend Platform DB2/400 # 36
    • Let’s create a Web Service for an RPG program
    • Web Services • Definition  The W3C defines a Web service as a software system designed to support interoperable machine-to-machine interaction over a network. Web services are frequently just application programming interfaces (API) that can be accessed over a network, such as the Internet, and executed on a remote system hosting the requested servicesg group • A Web Service enables an application to expose what it does or what it knows so that other applications can make use of it. . # 38
    • Web Services • Web Services web site www.programmableweb.com • Lists more than 350 APIs • Web Services opens the door for software applications written in different languages to be able to exchange data and services. # 39
    • Web Services • Web Service is not a trivial task • Knowledge of OOP, XML and SOAP. • Zend’s products shield developers from development complexity • Demo:  Create Web Service using Zend’s tools that will wrap existing RPG program # 40
    • Web Services 0022.00 *************** 0023.00 C *ENTRY PLIST 0024.00 C PARM CODE 10 0025.00 C PARM NAME 10 0026.00 ********************** 0027.00 C CODE IFEQ '1' 0028.00 C movel 'IBM' name 0029.00 C ELSE 0030.00 C CODE IFEQ '2' 0031.00 C movel 'Zend' name 0032.00 C ELSE 0033.00 C movel 'wrong code' code 0034.00 C ENDIF 0035.00 C ENDIF 0036.00 C* 0037.00 C SETON LR 0038.00 C RETURN • • # 41
    • Web Services # 42
    • Web Services # 43
    • Web Services # 44
    • Web Services # 45
    • Web Services # 46
    • Web Services # 47
    • Zend DevZone • Devzone.zend.com http://devzone.zend.com/node/view/id/1912 # 48
    • Web Services Benefits • Shortens the development cycle • Re-usability • Building blocks for SOA # 49
    • Zend for i5/OS Resources • Monthly Newsletter - Email JDILLARD@ZEND.COM to receive Zend i5/OS Newsletter • WWW.IBUILDINGS.NL Dutch PHP Zend partner • PHP Tutorial http://php.net/manual/en/tutorial.php • Zend forum for i5/OS http://www.zend.com/forums/index.php?t=index&cat=7 • IBM Redbooks: Building SOA-based Solutions for IBM System i5 Platform http://www.redbooks.ibm.com/redpieces/abstracts/sg247284.html?Open • IBM RedWiki  PHP Zend for i5/OS http://www-941.haw.ibm.com/collaboration/ibmwiki/display/sg247327/Home # 50
    • Zend for i5/OS Resources • Check out the thousands of PHP scripts available that can be used as-is or as the starting point for Web projects.  http://www.hotscripts.com  http://www.phpjunkyard.com/  http://www.phpfreaks.com/  http://phpfreebies.com/ # 51
    • Q&A