IBM i Application Development Strategy

excitingwonderlakeInternet και Εφαρμογές Web

13 Δεκ 2013 (πριν από 3 χρόνια και 5 μήνες)

148 εμφανίσεις

1
© 2011 IBM Corporation
IBM Power Systems
IBM i Application Development
Strategy
Tim Rowe
Application Business Architect, Development Environments, IBM i Development
© 2011 IBM Corporation
IBM Power Systems
2
New Development Paradigms
￿ Graphical User Experiences
– Grown from GUIs to Experiences
￿ Agile Development
– Work in highly collaborative groups
– Time line is strict
– Small adaptive modules
￿ Framework Development
– Consistency in code creation
– Component based
– Model – View – Controller
– Agile
￿ Services Orientation
– Componentized code
– Business based
– Distributed function
2
© 2011 IBM Corporation
IBM Power Systems
3
Services Orientation - SOA
￿ Modular
￿ Reusable
￿ Loosely Coupled
￿ Standards based
3
© 2011 IBM Corporation
IBM Power Systems
5
Application Development Strategy for IBM i
Compilers
Embrace Open Source Solutions and
Partners to Complete Application
Development Portfolio
Common developer desktop across
operating systems
and languages
4
© 2011 IBM Corporation
IBM Power Systems
7
Integration
i Architecture
Single Level Store
Object Based Architecture
Work Management
Technology Independent Machine Interface
......
Provides built-in application virtualizationIntegrates business components, e.g. database
Enables integrity, security, virus-resistanceAutomates & optimizes storage management
Ensures application compatibility across multiple technology generations
5
© 2011 IBM Corporation
IBM Power Systems
9
Rational Development Studio for i
5770-WDS
Compilers on IBM i
￿ Rational Development Studio
– RPG, COBOL, C, and C++ compilers for IBM i
– Previously called WDS: “WebSphere Development Studio for System i”
– Designed for creating modern business applications
6
© 2011 IBM Corporation
IBM Power Systems
11
/FREE
read file; // Get next record
dow not %eof(file); // Keep looping while we have a record
if %error;
dsply ‘The read failed’;
leave;
else;
chain(n) name database data;
time = hours * num_employees
+ overtime_saved;
pos = %scan (‘,’: name);
name = %xlate(upper: lower : name);
exsr handle_record;
read file;
endif;
enddo;
begsr handle_record;
eval(h) time = time + total_hours_array (empno);
temp_hours = total_hours - excess_hours;
record_transaction();
endsr;
/end-free
Modern RPG
© 2011 IBM Corporation
IBM Power Systems
12
7
© 2011 IBM Corporation
IBM Power Systems
13
13
8
© 2011 IBM Corporation
IBM Power Systems
15
RPG Application
Handler Defined
WRITE record
program
I/O buffer
IBM i
Handler code to manage building the
interface and proprietary information
RPG Runtime Display Manager
?
Rational Open Access: RPG Edition
*DSPF example
Other information:
•state
•names
•pointers
© 2011 IBM Corporation
IBM Power Systems
16
IBM i Open Source Strategy
￿ Encourage Open Source vendors to port to IBM i (PASE)
￿ Encourage Open Source vendors to provide support
￿ PHP and MySQL run on IBM i
￿ IBM i PASE Development Team is testing other Open Source products
9
© 2011 IBM Corporation
IBM Power Systems
17
Over one-third of the Web runs on PHP
10
© 2011 IBM Corporation
IBM Power Systems
19
Modernization on IBM i with PHP
| 22-Sep-11 | 19
11
© 2011 IBM Corporation
IBM Power Systems
21
PHP Integration with i - ToolKit
Easy access to IBM i data and resources from PHP
(similar to IBM ToolBox for Java)
–DB2 for i – SQL and Native
–Program call
–Procedure call
–Data Area
–Data Queue
–Message Queue
–Commands
–System values
–Spool files
http://174.79.32.155/wiki/XMLService/XMLService
© 2011 IBM Corporation
IBM Power Systems
22
XMLSERVICE RAW XML PHP Interfaces
￿ The basic idea of XMLSERVICE is to allow any scripting language to use XML input/output
documents to drive XMLSERVICE job(s) calling PGMs, SRVPGMS, CMDs, PASE shells.
￿ Call ILE or shell scripts from local PHP OR remote PHP environment
￿ XML based
12
© 2011 IBM Corporation
IBM Power Systems
23
Leveraging Open Source Application Portfolio
13
© 2011 IBM Corporation
IBM Power Systems
25
Rational Developer for Power: RPG and COBOL
Remote System Explorer (RSE)
￿ Perspective for access to
remote IBM i servers
￿ Reusable actions, dialogs,
widgets, APIs
￿ Editor for traditional IBM i
application code
– RPG, COBOL, C,
C++, Java & DDS
￿ Interface to the compilers
￿ Debugger
– Multi-language
© 2011 IBM Corporation
IBM Power Systems
26
14
© 2011 IBM Corporation
IBM Power Systems
27
Why RD Power? Developer View (the fun stuff!)
Modern
, Eclipse-based, development tools for IBM i
Visual editors, outline views, content assist, integrated language help
Integrated
file management, search, edit, compile/build, debug capabilities
Analysis tools (application diagram, call hierarchies, type hierarchies)
Easily debug batch, interactive, and Web applications and Web services with a common
visual debugger
Visual DDS design tools: Screen and Report Designer
Integration with Rational Team Concert
© 2011 IBM Corporation
IBM Power Systems
28
Remote Systems LPEX Editor
￿Show me the features
© Copyright 2011 IBM Corporation
28
15
© 2011 IBM Corporation
IBM Power Systems
29
From this…
© Copyright 2011 IBM Corporation
29
PDM & SEU – the editor…
© 2011 IBM Corporation
IBM Power Systems
30
To this…
￿ SEU look and feel
– Prefix commands
– Format bar
￿ Modern look and feel
– Colors!
– Modern editor features
Best of Both Worlds
16
© 2011 IBM Corporation
IBM Power Systems
31
Undo / Redo
￿ Unlimited undo / redo inside of LPEX editor
– Undo changes right back to when member was originally opened
– Even if editor was saved during the editing period
– Edit > Undo | Redo or use more common keyboard shortcuts Ctrl + Z | Ctrl + Y
Number of changes
made since last save.
* means editor has
unsaved changes
© Copyright 2011 IBM Corporation
31
© 2011 IBM Corporation
IBM Power Systems
32
Copy and Paste
17
© 2011 IBM Corporation
IBM Power Systems
33
Outline View and Content Assist
Cross reference
information
Content assist helps jog
your memory (opcodes,
BIFs, fields)
Templates provide a quick way
to insert common code patterns
(free form and SQL). Predefined
or define your own!
© Copyright 2011 IBM Corporation
33
© 2011 IBM Corporation
IBM Power Systems
34
From this…
© Copyright 2011 IBM Corporation
34
Compile Errors
18
© 2011 IBM Corporation
IBM Power Systems
35
…To This
Launch compiles
directly from editor or
pop-up menu.
Compile errors
automatically downloaded
and shown in Error List
Double clicking on an error opens editor and
positions to the line
© Copyright 2011 IBM Corporation
35
© 2011 IBM Corporation
IBM Power Systems
36
From this…
© Copyright 2011 IBM Corporation
36
Application Diagram ???
19
© 2011 IBM Corporation
IBM Power Systems
37
Application Diagram
ORDENTR member
expanded to view a
call graph
ORDENTR member
expanded to view a
call graph
Subroutine WrtDtaQ calls
program QSNDDTAQ
Subroutine ChgOrder calls
something inside the
ROUTINES member
Subroutine RqsPart calls
subroutine Process
© Copyright 2011 IBM Corporation
37
© 2011 IBM Corporation
IBM Power Systems
38
Application Diagram
￿ Application Diagram
– Provides developers with a graphical overview of the structure of their native i5/OS
applications
Call graph showing subroutine, procedure, and program calls
ILE program and service program bindings
– Currently supports ILE RPG, ILE COBOL, CL, programs and service programs
© Copyright 2011 IBM Corporation
38
20
© 2011 IBM Corporation
IBM Power Systems
39
From this…
© Copyright 2011 IBM Corporation
39
Build DDM Screens
© 2011 IBM Corporation
IBM Power Systems
40
Use properties view to
modify attributes and
keywords for the file,
records and fields.
Outline view for
navigating in the editor
and selecting the file,
records and fields.
Design area
Design, source and
preview modes
Screen controls allow you
to specify which records
should be visualized
together in the design area.
Palette: drag and drop
parts from the palette
to the design area.
Screen Designer
© Copyright 2011 IBM Corporation
40
Report Designer &
21
© 2011 IBM Corporation
IBM Power Systems
41
From this…
© Copyright 2011 IBM Corporation
41
Integrated Debugger
© 2011 IBM Corporation
IBM Power Systems
42
Debug View controls
the debugger
Work with breakpoints
(enable / disable, remove,
add, conditional)
Real time monitoring
of the field values
© Copyright 2011 IBM Corporation
42
Breakpoint (set / remove
by double clicking)
22
© 2011 IBM Corporation
IBM Power Systems
43
Launching the Debugger
One Click Actions
Attach to a job
(STRSRVJOB)
Always use Service Entry
Points to debug any ILE
program / service program!
Single click debug for batch
(don’t use for interactive – use
service entry points or debug
job)
© Copyright 2011 IBM Corporation
43
© 2011 IBM Corporation
IBM Power Systems
44
JVM Improves Java Performance
￿ IBM 32-bit & 64-bit Java™Virtual Machine
– Shared technology with AIX & Linux improves performance & portability
￿
Exceptional Java environment and performance. Built by IBM for Power
– Fully compatible with other industry standard Java applications
– Can be called by APIs or directly from RPG
￿ IBM Java ToolBox
– Pre-coded Java classes to access native IBM i artifacts – files, data queues, etc
0
200
400
600
800
1000
1200
1400
Native JDBC Toolbox JDBC
V5R4 GA
V6R1 GA
+68%
+78%
Transactions per Second
23
© 2011 IBM Corporation
IBM Power Systems
45
IBM Rational Application Developer (RAD)

Eclipse-based Java development environment

Full support for J2EE, web, web services, etc
© 2011 IBM Corporation
IBM Power Systems
46
Rational Application Developer Standard Edition
￿ Java Web Development tool
￿ Use RAD SE to build rich Java internet
applications
– improve online user experience
– increase customer satisfaction
￿ Visual development for Web 2.0
– significant productivity benefits
￿ Award winning! – 2009 Evans Data Users Choice:
Software Development
24
© 2011 IBM Corporation
IBM Power Systems
47
25
© 2011 IBM Corporation
IBM Power Systems
49
IBM
Confidenti
al
RPG: New built-in function %SCANRPL
Problem solved by %SCANRPL:
￿Hand-written versions of scan-and-replace tend to be large, error prone,
and difficult to maintain.
￿The %SCANRPL built-in function replaces all occurrences a string with
another string.
fileErr = ’File
&1
not found. Please create
&1
.’;
msg = %scanrpl (’
&1
’: filename : fileErr);
// msg = ’File MYFILE not found. Please create MYFILE.’
© 2011 IBM Corporation
IBM Power Systems
50
IBM
Confidenti
al
RPG: New built-in function %PARMNUM
D myProc pi 10A OPDESC
D company 25A OPTIONS(*VARSIZE)
D city 25A OPTIONS(*VARSIZE)
CEEDOD (
2
: more parms); // hard to understand
CEEDOD (
%PARMNUM(city)
: more parms); // better
Problem solved by %PARMNUM:
￿Parameter-information APIs such as CEEDOD or CEETSTA
require a parameter’s number.
￿The %PARMNUM built-in function returns a parameter’s
position in the parameter list.
￿Soft-coding the parameter’s number makes the code easier to
read and maintain.
26
© 2011 IBM Corporation
IBM Power Systems
51
IBM
Confidenti
al
RPG: Implicit CCSID conversion - parms
￿
Implicit CCSID conversion is now supported for prototyped parameters passed by VALUE
and by read-only reference (CONST)
￿
This reduces the number of code changes that have to be made when a database field is
changed from alphanumeric or DBCS to Unicode (UCS-2 or UTF-16).
￿
Prior to this change, if the type (A, C or G) of a passed parameter was not the same as the
prototype, the compiler would issue a diagnostic. With this change, the compiler will
implicitly convert the passed parameter to the type of the prototype.
In the example below, there is only one “makeTitle” procedure with a UCS-2 parameter and return
value. If the passed parameter is alpha or DBCS, it will be converted to UCS-2 on the call. The
procedure will work with the UCS-2 parameter and return a UCS-2 value. This returned value can
then be converted on assignment to alpha or DBCS, if necessary.
// makeTitle() upper-cases the parameter
// and centers it within the provided length
alphaTitle = makeTitle(alphaValue: 50);
ucs2Title = makeTitle(ucs2Value : 50);
dbcsTitle = makeTitle(dbcsValue: 50);
© 2011 IBM Corporation
IBM Power Systems
52
27
© 2011 IBM Corporation
IBM Power Systems
53
28
© 2011 IBM Corporation
IBM Power Systems
55
29
© 2011 IBM Corporation
IBM Power Systems
57
30
© 2011 IBM Corporation
IBM Power Systems
59
IBM
Confidenti
al
RPG XML-INTO: new option datasubf
The new datasubf
option enables XML-INTO to support XML elements in this form
<emp type=“regular” id=“13573”>John Smith</emp>
Problem solved by datasubf:
￿ When an XML element has attributes or child elements, the XML element (emp)
itself matches an RPG data structure and the attributes (type, id) match the
subfields. (Child elements would also match subfields.) If there is text data for the
data structure (“John Smith”), there is no XML name available for subfield
matching.
￿ Without the datasubf option, two XML-INTO operations would be needed to get
the data from that XML element.
– One XML-INTO would get the type and id values
– One XML-INTO would get the value “John Smith”
– The allowextra=yes option would be needed for both XML-INTOs
© 2011 IBM Corporation
IBM Power Systems
60
IBM
Confidenti
al
RPG XML-INTO: datasubf example
<emp type=“regular” id=“13573”>John Smith</emp>
RPG coding to get the information with one XML-INTO operation:
D emp ds
D id 7p 0
D type 10a
D
value
100a
/free
XML-INTO emp %xml(‘emp.xml’:
: ‘
datasubf=value
doc=file’);
// emp.id = 13573
// emp.type = ‘regular’
// emp.value = ‘John Smith’
31
© 2011 IBM Corporation
IBM Power Systems
61
IBM
Confidenti
al
RPG XML-INTO: new option countprefix
The new countprefix
option enables RPG programmers to get more information about an
XML document using XML-INTO.
Problem solved by countprefix:
￿ When an XML element has a variable number repeating elements, it matches an RPG
array. The RPG programmer has to code the maximum elements for the RPG array, but
the XML document will usually have fewer elements.
￿ Without the countprefix option,
– The allowmissing=yes option would be required, also allowing other necessary data to
be missing
– The RPG programmer would have to figure out how many XML elements there were
by looking for some default value.
© 2011 IBM Corporation
IBM Power Systems
62
IBM
Confidenti
al
RPG XML-INTO: countprefix
The countprefix
option gives the prefix for the subfields to receive the count of the number of
XML elements used to fill the RPG array.
<team>
<
manager
>Jack Spratt</manager>
<
emp
>John Smith</emp>
<
emp
>Mary Jones</emp>
</team>
The RPG data structure.
D team DS
D
manager
25A
D
emp
25A dim(100)
D
num
emp
10i 0
No "numemp" tag in the XML for subfield "numemp".