ibm impact 2009 session 3100 - dynamic scripting and rich web 2.0 interfaces with ibm cics®...

38
© 2009 IBM Corporation Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server #3100 Rob Nicholson Senior Technical Staff Member – WebSphere sMash Fraser Bohm Senior software engineer – CICS Web Service Lead

Upload: robert-nicholson

Post on 11-May-2015

3.498 views

Category:

Technology


1 download

DESCRIPTION

Session 3100 at IBM IMPACT 2009 Conference.

TRANSCRIPT

Page 1: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

© 2009 IBM Corporation

Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS®Transaction Server

#3100

Rob Nicholson Senior Technical Staff Member – WebSphere sMashFraser Bohm Senior software engineer – CICS Web Service Lead

Page 2: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

2© 2009 IBM Corporation

AbstractCICS has been powering the world's transactions for forty years, continually

evolving and adopting new technologies. Many customers see CICS's adoption of a technology as validation that it's ready at the enterprise level. Through WebSphere sMash, CICS brings seamless integration of rich Web 2.0 interfaces to your core CICS applications. WebSphere sMash is a new agile Web application platform for developing and running modern Web 2.0 applications. It can be used to create RESTful Web services and rich AJAX interfaces using popular Web technologies such as PHP and Groovy. This session explores the integration of CICS and sMash and the role of dynamic scripting in the enterprise world. The session will explain and demonstrate the SupportPac CA1S provides the ability to use PHP scripts in CICS as an option to service enable your applications in a RESTful style. We will also show how easy it is to create situational applications using sMash with CICS via the CICS Transaction Gateway.

Page 3: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

3© 2009 IBM Corporation

Agenda

• Web 2.0• Situational Applications• WebSphere sMash for CICS• Demonstrations• ProjectZero.org

Page 4: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

4© 2009 IBM Corporation

Agenda

• Web 2.0• Situational Applications• WebSphere sMash for CICS• Demonstrations• ProjectZero.org

Page 5: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

5© 2009 IBM Corporation

Web 2.0 Definitions• Google:

A perceived ongoing transition of the World Wide Web from a collection of websites to a full-fledged computing platform serving web applications to end user. Ultimately Web 2.0 services are expected to replace desktop computing applications for many purposes.

• Tim O’Reilly (the person who coined the term):The business revolution in the computer industry caused by the move to the Internet as platform, and an attempt to understand the rules for success on that new platform.

• Tim O’ReillyA true Web 2.0 application is one that gets better the more people use it.

Page 6: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

6© 2009 IBM Corporation

Web 2.0 – Philosophy – not just Technology

• An important trend in delivering software applications

• An enabler for richer web applications– New business models– Peer-to-peer user participation– New technologies – Interactive filtering, presentation, data entry

• A combination of core technology components– Rich user experience (maps, grids, animation, D&D, etc)– Loose-coupling, composite applications via reuse and “mash-ups”– Technologies (SOAP, REST, JSON, ATOM, Java, PHP, Dojo, Ruby, Python, Perl,

etc)

Page 7: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

7© 2009 IBM Corporation

Web 2.0 Application Characteristics

• Rich user experience with minimal page transitions

• Dynamic content

• Data asynchronously retrieved via REST or SOAP service calls

• Client-side validation

• User encouraged to add value

• Simplified user interface

• Integration of relevant data from multiple sources

Page 8: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

8© 2009 IBM Corporation

Web 2.0 for the Enterprise?• Web 2.0 is

– Creating new markets– Lowering competitive barriers– Encouraging creativity to come from anywhere– Harnessing community created media– Tapping into the wisdom of the crowds– Enhancing communications and making

information more impactful

• What does it means for the enterprise?– Greater collaboration and innovation across the

value chain– Increased levels of customer intimacy– Simplification of complex IT and business

infrastructure– Business model flexibility to capitalize on new

market opportunities

It’s fast becoming a Web 2.0 business world, where innovation

never goes out of style.According to GartnerMissing out on the non-

technology aspects of Web 2.0 means that many

organizations will also miss out on some of the positive

business benefits

According to GartnerMissing out on the non-

technology aspects of Web 2.0 means that many

organizations will also miss out on some of the positive

business benefits

Page 9: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

9© 2009 IBM Corporation

Agenda

• Web 2.0• Situational Applications• WebSphere sMash for CICS• Demonstrations• ProjectZero.org

Page 10: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

10© 2009 IBM Corporation

The Application LandscapeU

sage

Number of Applications

ERP

CRM

SCMEnterprise applications

Traditional developers building strategic applications

Developers building simple applications and services to solve simple problems

IT created applications User created applications

Sales analysis Dashboards

Page 11: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

11© 2009 IBM Corporation

Page 12: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

12© 2009 IBM Corporation

Goal: Integration between a manufacturer and a small supplier. Provide manufacturer with better view of available inventory; provide supplier with forecast and order information.

WebSphere sMash used at supplier to more quickly integrate supplier information with the manufacturer’s ERP system.

Scenario: Simple Supply Chain Integration

Forecast

Orders

LargeEnterprise

ERP

Forecast

Orders

CustomERP

sMash

sMashRTE

Page 13: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

13© 2009 IBM Corporation

Agenda

• Web 2.0• Situational Applications• WebSphere sMash for CICS• Demonstrations• ProjectZero.org

Page 14: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

14© 2009 IBM Corporation

WebSphere sMash• Speed

– Dynamic scripting languages (PHP and Groovy – with Java as system language)

– Core application constructs: templates, pre-built services

• Simplicity– Built-in browser-based composition tools:

Visual tools (for web page construction or scripting activities into a flow) and scripting tools(server-side dynamic scripting)

– REST-style architecture – simple ways to expose and consume services

• Agility– Simple deployment (application “is” the server)– Runtime Characteristics (clean, cost effective,

short-lived)

Lightweight platform with browser-based

composition Tools

Page 15: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

15© 2009 IBM Corporation

Agenda

• Web 2.0• Situational Applications• WebSphere sMash for CICS• Demonstrations• ProjectZero.org

Page 16: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

16© 2009 IBM Corporation

Demonstrations

• Build Web 2.0 Interface to existing CICS Assets.– Quickly.

• Build Situational Apps based on CICS– Quickly and Cheaply.

SpeedSimplicity

Agility

Page 17: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

17© 2009 IBM Corporation

Demonstrations

• sMash with CICS Transaction Gateway.• sMash with Atom feeds from CICS • Generating REST resources using

scripting within CICS – PHP SupportPac CA1S

Page 18: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

18© 2009 IBM Corporation

Demonstrations

• sMash with CICS Transaction Gateway.• sMash with Atom feeds from CICS • Generating REST resources using

scripting within CICS – PHP SupportPac CA1S

Page 19: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

19© 2009 IBM Corporation

sMash with CTG

sMash application

index.html

book.php

LibraryCTG

CICS

LIBRARY

JZOS

ECI

Browser

REST

Java Bridge

book.json

CTG client

Page 20: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

20© 2009 IBM Corporation

Interacting with CICS Programs

• Build a Java object representation of your COMMAREA with JZOS– JZOS is included in the IBM JDK for zOS

• Use the CTG Java Client Libraries– From Groovy– From PHP via the Java Bridge

ADATA

Java Class for

COMMAREA

ctgclient.jar

PHP Java Bridge

Compiler JZOSCOBOLSource

COMMAREA

Page 21: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

21© 2009 IBM Corporation

CICS REST Service in PHPImport CTG and COMAREA classes

Send Request to CICS

Process Results

Page 22: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

22© 2009 IBM Corporation

What is REST ?

• REST is the acronym for „Representational State Transfer“–It is the architectural model on which the World Wide Web is based

• Principles of REST–Resource centric approach–All relevant resources are addressable via URIs–Uniform access via HTTP – GET, POST, PUT, DELETE–Content type negotiation allows retrieving alternative representations from

same URI

• REST style services–are easy to access from code running in web browsers, any other client or

servers

• More info: http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm

Page 23: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

23© 2009 IBM Corporation

RESTful Resources

RESTful DesignCollection ModelAction can be taken on the entire collection or a specified member of the collectionURI and HTTP method define the resource request

REST and WebSphere sMashWebSphere sMash supports URI and HTTP method define the collection resource modelEach script in the <apphome>/app/resources directory represents a resource handlerURL convention for interacting with resources based on

/resources/<collectionName>[/<memberID>[/<pathInfo>]]where the actions are defined as follows:

HTTP Method

URI Description

GET /people List members

POST /people Create member

GET /people/1 Retrieve member

PUT /people/1 Update member

DELETE /people/1 Delete member

Resource GET PUT POST DELETE

Collection list putCollection create deleteCollection

Member retrieve update postMember delete

Page 24: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

24© 2009 IBM Corporation

Demonstration

Page 25: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

25© 2009 IBM Corporation

Demonstrations

• sMash with CICS Transaction Gateway.• sMash with Atom feeds from CICS • Generating REST resources using

scripting within CICS – PHP SupportPac CA1S

Page 26: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

26© 2009 IBM Corporation

ATOM support in CICS TS 4.1http://winmvs2c.hursley.ibm.com/atom/cicsfile/filea

URIMAPPATH(atom/*) USAGE(ATOM)

ATOMSERVICEATOMTYPE(FEED) STATUS(ENABLED) RESOURCENAME(FILEA) RESOURCETYPE(FILE) BINDFILECONFIGFILE

XSDBIND file <cics:atomservice type="feed“<cics:feed cics:window="window-size"><cics:resource name=“FILEA" type=“FILE“/>. . .

<atom:feed xmlns:atom="http://www.w3.org/2005/Atom">. . . .<atom:content cics:resource="cics-resource-name"

cics:type="cics-resource-type"/></atom:feed>

</cics:atomservice>

Page 27: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

27© 2009 IBM Corporation

sMash with CICS Atom feedssMash Application

.html

Situational Business Logic

PHP or Groovy or Flow

CICS

FILE

Browser

REST/

ATOM

.json

ATOMSERVICEATOM

TSQProgram

Page 28: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

28© 2009 IBM Corporation

Demonstrations

• sMash with CICS Transaction Gateway.• sMash with Atom feeds from CICS • Generating REST resources using

scripting within CICS – PHP SupportPac CA1S

Page 29: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

29© 2009 IBM Corporation

CICS PHP: Interfacing with CICS CA1S supportPac

HFS

pipelineconfig

URIMAP

CICS TS V3TCPIPSERVICE

CPIHCWXNRequester

URIMAPmatching

CSOL

Pipeline

RFPHNDLR

HTTP

JVM

PHP Interpreter

PIPELINE

PHPScripts

PHP Script

Page 30: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

30© 2009 IBM Corporation

PHP in CICS:Interacting with CICS Programs

• PHP in CICS has a Java Bridge– Build a Java object representation of your COMMAREA with JZOS– LINK to your business program using the provided API– LINK, Syncpoint, and Rollback supported

CICS TS V3 PHP Script

COBOLSource

COBOLProgram

COMMAREAJZOSADATA

LoadModule LINK

Data toCOMMAREA

Data fromCOMMAREA

Compiler

1

2

3

4

5

2

1 3

4

5

Generate ADATA from compiler (data layout info)

Generate Java Data object using JZOS

Set data in COMMAREA object

LINK to business logic

Get data from COMMAREA object

Page 31: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

31© 2009 IBM Corporation

Summary of CA1S Features• Handle HTTP requests with PHP code• Call CICS commarea programs from PHP• Access DB2 databases from PHP• Manage units of work from PHP (commit/rollback)• Use event handlers to easily create RESTful Web

Services• Debug PHP scripts with Eclipse PDT• Access any Java classes from PHP code using the

PHP/Java Bridge

Page 32: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

32© 2009 IBM Corporation

sMash with CA1S

CICS

LIBRARY

CA1S

PHP

sMash Application

.html

Situational Business Logic

PHP or Groovy or Flow

Browser

REST/

ATOM

.json

REST

Page 33: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

33© 2009 IBM Corporation

Agenda

• Web 2.0• Situational Applications• Introducing WebSphere sMash• Demonstrations• ProjectZero.org

Page 34: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

34© 2009 IBM Corporation

WebSphere sMash based on IBM’s Project Zero incubation effort

www.projectzero.org

Community Site

WebSphere sMash

Based on Project Zero

• Project Zero is the development and incubation community– Live on the Internet since June 2007

• Project Zero represents– The people that build and use

WebSphere sMash – The incubation of new technology– The community of 3rd party assets that

leverage the WebSphere sMash platform

• All released versions are called WebSphere sMash

Page 35: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

35© 2009 IBM Corporation

Resources:• WebSphere sMash - http://www-01.ibm.com/software/webservers/smash/

– Project Zero - http://projectzero.org

• CA1S – PHP Support Pac– More info about CA1S: http://tinyurl.com/phpOnCics– Video of CA1S: http://tinyurl.com/phpOnCicsVideo

• CA8k – Atom Support Pac http://www-01.ibm.com/support/docview.wss?uid=swg24018619

• JZOS - http://www-03.ibm.com/servers/eserver/zseries/software/java/products/jzos/overview.html

ATOM - http://rollerweblogger.org/downloads/presentations/TriXML2006-BeyondBlogging.pdf

REST - http://doc.opengarden.org/REST/REST_for_the_Rest_of_Us

CICS Supportpac CA8K - http://www-01.ibm.com/support/docview.wss?uid=swg24018619

Page 36: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

36© 2009 IBM Corporation

Page 37: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

37© 2009 IBM Corporation

We love your Feedback!

• Don’t forget to submit your Impact session and speaker feedback! Your feedback is very important to us, we use it to improve our conference for you next year.

• Go to www.impact09guide.com on a smartphone device or a loaner device

• From the Impact 2009 Online Conference Guide;– Select Agenda– Navigate to the session you want to give feedback on– Select the session or speaker feedback links– Submit your feedback

Page 38: IBM IMPACT 2009 Session 3100 - Dynamic Scripting and Rich Web 2.0 Interfaces with IBM CICS® Transaction Server

38© 2009 IBM Corporation

© IBM Corporation 2009. All Rights Reserved.

The workshops, sessions and materials have been prepared by IBM or the session speakers and reflect their own views. They are provided for informational purposes only, and are neither intended to, nor shall have the effect of being, legal or other guidance or advice to any participant. While efforts were made to verify the completeness and accuracy of the information contained in this presentation, it is provided AS IS without warranty of any kind, express or implied. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, this presentation or any other materials. Nothing contained in this presentation is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software.

References in this presentation to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities referenced in this presentation may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way. Nothing contained in these materials is intended to, nor shall have the effect of, stating or implying that any activities undertaken by you will result in any specific sales, revenue growth or other results.

Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput or performance that any user will experience will vary depending upon many factors, including considerations such as the amount of multiprogramming in the user's job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance can be given that an individual user will achieve results similar to those stated here.

All customer examples described are presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual environmental costs and performance characteristics may vary by customer.

The following are trademarks of the International Business Machines Corporation in the United States and/or other countries: ibm.com/legal/copytrade.shtmlAIX, CICS, CICSPlex, DataPower, DB2, DB2 Universal Database, i5/OS, IBM, the IBM logo, IMS/ESA, Power Systems, Lotus, OMEGAMON, OS/390, Parallel Sysplex, pureXML, Rational, Redbooks, Sametime, SMART SOA, System z , Tivoli, WebSphere, and z/OS.

A current list of IBM trademarks is available on the Web at “Copyright and trademark information” at ibm.com/legal/copytrade.shtml.

Adobe, the Adobe logo, PostScript, and the PostScript logo are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States, and/or other countries.IT Infrastructure Library is a registered trademark of the Central Computer and Telecommunications Agency which is now part of the Office of Government CommerceJava and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other countries, or both.ITIL is a registered trademark, and a registered community trademark of the Office of Government Commerce, and is registered in the U.S. Patent and Trademark OfficeIntel and Pentium are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries.UNIX is a registered trademark of The Open Group in the United States and other countries.Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.