Title: PowerBuilder 9'0 New Features
1(No Transcript)
2PowerBuilder 9.0 New Features
- RAD Java Server PagesTM (JSPTM) Authoring
- PowerBuilder Native Interface (PBNI)
- EJB Client Support
3RAD JSP
- Creating JSP Web Applications with PowerBuilder
4Introduction to JSP Technology
- JSP is
- A technology for delivering dynamic content
- Based upon Java Servlet technology
- JavaServer Pages
- Contain standard HTML
- Can contain Custom tags
- Can contain JSP elements
- JSP Actions
- JSP Directives
- Scripting Elements
- At run time, are compiled into Servlets
5JSP Authoring in PowerBuilder
- New PowerBuilder Target Type (JSP Target)
- Builds upon the existing Web Targets User
Interface - New Wizard - JSP Target
- Extensions to the Page Editor
- System Tree Additions
- Deployment Changes
- EAServers JSP Container
- Apache Tomcat
- Command Line Deployment
6JSP Authoring in PowerBuilder 9.0
- PowerBuilder 9 provides a powerful object model
for - Data transfer between the web client and the
application server - HTML generation
- JavaScript generation for server scripts
7JSP Authoring in PowerBuilder 9.0
- Wizard for
- Creating JSPs that call Web Services
- WYSIWYG editing of JSP pages
- Full access to the page source through the editor
8PBNI
- Using the PowerBuilder Native Interface to Extend
Your Applications
9Definition
- PBNI, the PowerBuilder Native Interface, is a
standard interface for writing PB extensions,
including PB non-visual extension, PB visual
extensions, and PB marshaler extensions, and for
embedding the PBVM into external C applications.
10Extending PowerScript
- PowerBuilder can call external C functions from
PowerScript - But there are some limitations with external
functions - It is not possible to declare an external
function that requires a callback function. E.g.
BOOL EnumWindows(WNDENUMPROC lpEnumFunc, LPARAM
lParam) - Some C data types cannot be mapped to PB data
types, such as double. - An external function cannot callback into the
PBVM. - Using external functions is not object-oriented.
11PBNI is a better solution
- To solve these limitations, PBNI has been
implemented in PB90 - Using PBNI, you get the following benefits
- The data passed between PowerScript and PB
extensions are in PBs native data types - PB extensions can callback into the PBVM to
perform various jobs, such as creating an object,
invoking a PowerScript function, triggering an
event, accessing a variable, accessing an array
item, and so on - Once the PBD file representing a PB extension is
included in a PB target, the classes implemented
by the PB extension can be used just like normal
NVOs or custom user objects
12What can be done with PBNI?
- With PBNI, you can
- Write PB non-visual extensions and use them in PB
just as normal NVOs - Write PB visual extensions and use them just as
custom user objects - Write PB marshaler extensions to call external
components and use them in PB just like what you
do with Jaguar components - Embed the PBVM in external C applications to
call PowerScript functions
13Using a PB extension
- Add the PBD file in the library list of the PB
target - Put the DLL file in the directory that is in the
PATH - Using the native class as a normal NVO or custom
user object - PBNI works on both Windows and Unix platforms
14PBNI Visual Extension
15EJB Clients
- Accessing Enterprise Java Beans from a
PowerBuilder Client
16J2EE Example
J2EE Server
EJB Container
Home Interface
Home Object
Enterprise Information System
Client
bean
Remote Interface
Services Provided by Server to bean
Naming Transactions Security .
17Take advantage of EJB Client Support
- EJB Client support makes PowerBuilder glue with
any application server - J2EE compliant - Development cycle with EJB client is much shorter
than using Java(short time-to-market) - Reuse the source code written in PowerBuilder
18Overview of EJB Client Implementation
- EJB Client PowerBuilder Native Interface(PBNI)
implementation - PowerBuilder Java VM Service
- Creates and manages a Java Virtual Machine(VM)
within its own process space and communicate with
Java objects - PowerBuilder proxy Objects
19EJB Client PBNI implementation
- EJB Client provides a bridge from PowerBuilder
into EJB
EJB Client PBEJBCLIENT90.DLL PBEJBCLIENT90.PBD PB
EJBCLIENT90.JAR
Java VM
PowerBuilder VM
JNI
PBNI
EJB
NVO
Java Object
NVO
JNI (Java native interface) http//java.sun.com/j
2se/1.4/docs/guide/jni/
20EJB Client PBNI Objects
- JavaVM
- load or attach to a Java VM
- work with Java interface and class hierarchies
- EJBConnection
- connect to the J2EE server
- locate EJB via JNDI
- instantiate other Java classes
- EJBTransaction
- Manage the transaction
21JVM Service in PB IDE
- Sun JDK 1.4 is installed within
shared/PowerBuilder directory by PowerBuilder as
default - Modify this default setting using JDK Location
dialog - It is accessible from the Java tab of the Systems
Options Dialog access from PowerBuilders Tools
Menu, click the Set JDK Location button
22EJB Proxy Object
- EJB proxy object is a way to delegate requests to
and from the underlying Java classes - Each EJB proxy is inherited from nonvisualobject
or exception class like other PowerBuilder
proxies - Proxy includes all of the public methods defined
on its associated Java class
23Generates EJB proxies
- PowerBuilder provides two methods to generate
proxy object - Within the development environment
- A standalone command-line application
- Relies on the Javap utility provided with the
JDK. - Fully qualified name of an EJBs remote interface
is required as parameter - Assumes that the home interface has the same name
followed by Home - An additional PB structure is generated as well,
that records the correspondence of the original
Java class to the resulting proxy object name
24(No Transcript)